Skip to content

Comments

Reuse node to prevent overwriting channel settings#664

Merged
ianmcorvidae merged 1 commit intomeshtastic:masterfrom
lysol:master
Sep 3, 2024
Merged

Reuse node to prevent overwriting channel settings#664
ianmcorvidae merged 1 commit intomeshtastic:masterfrom
lysol:master

Conversation

@lysol
Copy link
Contributor

@lysol lysol commented Sep 3, 2024

Hi!

I noticed that I'm unable to use any --ch-set settings over the admin channel (using --dest). The core issue is that the repeated use of interface.getNode fetches all the channels again, overwriting the channels on the node object that had just been retrieved and updated to change the appropriate settings. This means that downlink_enabled, uplink_enabled, and so on couldn't actually be updated using remote admin. I've confirmed this change allowed me to change MQTT uplink/downlink on a remote node on a tall rooftop.

I attempted to use requestChannels in getNode but the repeated usage of getNode itself blows away the channels on the object, regardless.

@CLAassistant
Copy link

CLAassistant commented Sep 3, 2024

CLA assistant check
All committers have signed the CLA.

@lysol lysol marked this pull request as ready for review September 3, 2024 22:48
Copy link
Contributor

@ianmcorvidae ianmcorvidae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me. Should also remove a full cycle of requesting channels from these commands, not that they were working before anyway 😅

@ianmcorvidae
Copy link
Contributor

(setting CI to run in case it finds anything that needs updating, but other than if it does, ready to merge I'd say)

@codecov
Copy link

codecov bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.68%. Comparing base (bcce568) to head (aed4f25).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #664      +/-   ##
==========================================
+ Coverage   61.67%   61.68%   +0.01%     
==========================================
  Files          24       24              
  Lines        3593     3594       +1     
==========================================
+ Hits         2216     2217       +1     
  Misses       1377     1377              
Flag Coverage Δ
unittests 61.68% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ianmcorvidae ianmcorvidae merged commit b4bd956 into meshtastic:master Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants