-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement MQTT-based control interface #51
Conversation
// to re-establish them once we reconnect. | ||
Err(minimq::Error::Disconnected) => self.subscribed = false, | ||
|
||
Err(e) => panic!("Unexpected error: {:?}", e), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been observing a spurious error here whenever the MQTT broker is disconnected minimq::Error::Network(Spi(5))
- need to find the root cause before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now tracked in minimq
, since the bug is related to minimq's management of W5500 errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to decide whether to settle the tune request state thing before merging or address it later. Either is fine with me.
@jordens I've done a minor refactor to include the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to bikeshed the state names a bit (and the should_enable
might be done as a separate state) but I don't have a clearly optimal set of names currently. I think this is fine for now.
This PR adds a control interface to booster over MQTT. Currently, the following topics are used:
booster/enable
- Enable a specific RF channelbooster/disable
- Disable a specific RF channelbooster/thresholds
- Configure interlock thresholds for a specific RF channelbooster/tune
- Tune the RF bias current of an enabled channelThis closes #7 by implementing the RF bias current algorithm.
This closes #8 by allowing channel tuning over the MQTT control interface.
This also closes #50 by implementing a fix to the getter function.
TODO:
mqtt_control.rs
to place structs and requests/responses near top