move secondary_channels out of radioconfig

This commit is contained in:
Kevin Hester 2020-12-17 10:52:31 +08:00
parent 3d0bcc2afa
commit 75078afe43
3 changed files with 16 additions and 8 deletions

View file

@ -156,6 +156,9 @@ the receive queue and use the preferences store for the other stuff
| rx_text_message | [MeshPacket](#MeshPacket) | | We keep the last received text message (only) stored in the device flash, so we can show it on the screen. Might be null |
| no_save | [bool](#bool) | | Used only during development. Indicates developer is testing and changes should never be saved to flash. |
| did_gps_reset | [bool](#bool) | | Some GPSes seem to have bogus settings from the factory, so we always do one factory reset |
| secondary_channels | [ChannelSettings](#ChannelSettings) | repeated | Secondary channels are only used for encryption/decryption/authentication purposes. Their radio settings (freq etc) are ignored, only psk is used.
Note: this is not kept inside of RadioConfig because that would make ToRadio/FromRadio worse case > 512 bytes (to big for BLE) |
@ -182,6 +185,7 @@ FIFO will be populated.
| debug_string | [DebugString](#DebugString) | | set to send debug console output over our protobuf stream |
| config_complete_id | [uint32](#uint32) | | sent as true once the device has finished sending all of the responses to want_config recipient should check if this ID matches our original request nonce, if not, it means your config responses haven't started yet |
| rebooted | [bool](#bool) | | Sent to tell clients the radio has just rebooted. Set to true if present. Not used on all transports, currently just used for the serial console. |
| secondary_channel | [ChannelSettings](#ChannelSettings) | | One of the secondary channels, they are all sent during config download |
@ -297,7 +301,6 @@ set for behavior of their node
| ----- | ---- | ----- | ----------- |
| preferences | [RadioConfig.UserPreferences](#RadioConfig.UserPreferences) | | |
| channel_settings | [ChannelSettings](#ChannelSettings) | | |
| secondary_channels | [ChannelSettings](#ChannelSettings) | repeated | Secondary channels are only used for encryption/decryption/authentication purposes. Their radio settings (freq etc) are ignored, only psk is used. |

View file

@ -13,6 +13,8 @@
# FIXME - max_count is actually 32 but we save/load this as one long string of preencoded MeshPacket bytes - not a big array in RAM
*DeviceState.receive_queue max_count:1
*DeviceState.secondary_channels max_count:4
*RouteDiscovery.route max_count:8
# FIXME, max out based on total SubPacket size And do fragmentation and reassembly (for larger payloads) at the Android layer, not the esp32 layer.
@ -27,8 +29,6 @@
*ChannelSettings.psk max_size:32
*ChannelSettings.name max_size:12
*RadioConfig.secondary_channels max_count:4
*MyNodeInfo.firmware_version max_size:12
*MyNodeInfo.hw_model max_size:16
*MyNodeInfo.region max_size:12

View file

@ -606,11 +606,6 @@ message RadioConfig {
UserPreferences preferences = 1;
ChannelSettings channel_settings = 2;
/** Secondary channels are only used for encryption/decryption/authentication purposes. Their radio settings (freq etc)
are ignored, only psk is used.
*/
repeated ChannelSettings secondary_channels = 3;
}
/**
@ -801,6 +796,13 @@ message DeviceState {
// Some GPSes seem to have bogus settings from the factory, so we always do
// one factory reset
bool did_gps_reset = 11;
/** Secondary channels are only used for encryption/decryption/authentication purposes. Their radio settings (freq etc)
are ignored, only psk is used.
Note: this is not kept inside of RadioConfig because that would make ToRadio/FromRadio worse case > 512 bytes (to big for BLE)
*/
repeated ChannelSettings secondary_channels = 12;
}
/// Debug output from the device
@ -847,6 +849,9 @@ message FromRadio {
// present. Not used on all transports, currently just used for the serial
// console.
bool rebooted = 9;
// One of the secondary channels, they are all sent during config download
ChannelSettings secondary_channel = 10;
}
}