mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 02:32:23 +00:00
Send channels over phoneapi on want config (#1780)
* Send channels * Doh! * Adjust comments * Missed a spot * Consolidate * Skipped disabled ones * Fixed bounding * Change order * comment out disabled check for build artefact * Remove loop * Off by one * Probably should start at zero * Zero * Oops * enable dubug log * Reset to index zero Co-authored-by: Sacha Weatherstone <sachaw100@hotmail.com>
This commit is contained in:
@@ -16,13 +16,13 @@
|
||||
* Eventually there should be once instance of this class for each live connection (because it has a bit of state
|
||||
* for that connection)
|
||||
*/
|
||||
class PhoneAPI
|
||||
: public Observer<uint32_t> // FIXME, we shouldn't be inheriting from Observer, instead use CallbackObserver as a member
|
||||
class PhoneAPI : public Observer<uint32_t> // FIXME, we shouldn't be inheriting from Observer, instead use CallbackObserver as a member
|
||||
{
|
||||
enum State {
|
||||
STATE_SEND_NOTHING, // Initial state, don't send anything until the client starts asking for config
|
||||
STATE_SEND_MY_INFO, // send our my info record
|
||||
STATE_SEND_NODEINFO, // states progress in this order as the device sends to to the client
|
||||
STATE_SEND_CHANNELS, // Send all channels
|
||||
STATE_SEND_CONFIG, // Replacement for the old Radioconfig
|
||||
STATE_SEND_MODULECONFIG, // Send Module specific config
|
||||
STATE_SEND_COMPLETE_ID,
|
||||
@@ -31,7 +31,7 @@ class PhoneAPI
|
||||
|
||||
State state = STATE_SEND_NOTHING;
|
||||
|
||||
int8_t config_state = Config_device_tag;
|
||||
uint8_t config_state = 0;
|
||||
|
||||
/**
|
||||
* Each packet sent to the phone has an incrementing count
|
||||
|
||||
Reference in New Issue
Block a user