From d421a978885d4771d6507a043f00b354a067d631 Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Mon, 21 Feb 2022 18:48:42 +1100 Subject: [PATCH 1/2] Comment fixes --- admin.proto | 41 +++- apponly.proto | 4 + cannedmessages.proto | 5 + channel.proto | 11 ++ deviceonly.proto | 5 +- environmental_measurement.proto | 27 ++- mesh.proto | 283 +++++++++++++++++++++++++-- mqtt.proto | 1 + portnums.proto | 1 + radioconfig.proto | 336 +++++++++++++++++++++++++++++--- remote_hardware.proto | 4 + storeforward.proto | 31 ++- 12 files changed, 698 insertions(+), 51 deletions(-) diff --git a/admin.proto b/admin.proto index 2ba4e2a..930812c 100644 --- a/admin.proto +++ b/admin.proto @@ -18,6 +18,9 @@ option java_outer_classname = "AdminProtos"; */ message AdminMessage { + /* + * TODO: REPLACE + */ oneof variant { /* @@ -43,6 +46,10 @@ message AdminMessage { * Send the current RadioConfig in the response to this message. */ bool get_radio_request = 4; + + /* + * TODO: REPLACE + */ RadioConfig get_radio_response = 5; /* @@ -50,12 +57,20 @@ message AdminMessage { * NOTE: This field is sent with the channel index + 1 (to ensure we never try to send 'zero' - which protobufs treats as not present) */ uint32 get_channel_request = 6; + + /* + * TODO: REPLACE + */ Channel get_channel_response = 7; /* * Send the current owner data in the response to this message. */ bool get_owner_request = 8; + + /* + * TODO: REPLACE + */ User get_owner_response = 9; /* @@ -65,6 +80,10 @@ message AdminMessage { * These messages are optional when changing the local node. */ bool confirm_set_channel = 32; + + /* + * TODO: REPLACE + */ bool confirm_set_radio = 33; /* @@ -82,30 +101,50 @@ message AdminMessage { * Get the Canned Message Plugin message part1 in the response to this message. */ bool get_canned_message_plugin_part1_request = 36; + + /* + * TODO: REPLACE + */ CannedMessagePluginMessagePart1 get_canned_message_plugin_part1_response = 37; /* * Get the Canned Message Plugin message part2 in the response to this message. */ bool get_canned_message_plugin_part2_request = 38; + + /* + * TODO: REPLACE + */ CannedMessagePluginMessagePart2 get_canned_message_plugin_part2_response = 39; /* * Get the Canned Message Plugin message part3 in the response to this message. */ bool get_canned_message_plugin_part3_request = 40; + + /* + * TODO: REPLACE + */ CannedMessagePluginMessagePart3 get_canned_message_plugin_part3_response = 41; /* * Get the Canned Message Plugin message part4 in the response to this message. */ bool get_canned_message_plugin_part4_request = 42; + + /* + * TODO: REPLACE + */ CannedMessagePluginMessagePart4 get_canned_message_plugin_part4_response = 43; /* * Get the Canned Message Plugin message part5 in the response to this message. */ bool get_canned_message_plugin_part5_request = 44; + + /* + * TODO: REPLACE + */ CannedMessagePluginMessagePart5 get_canned_message_plugin_part5_response = 45; /* @@ -138,4 +177,4 @@ message AdminMessage { */ int32 shutdown_seconds = 51; } -} // AdminMessage +} diff --git a/apponly.proto b/apponly.proto index 719a429..cee5af7 100644 --- a/apponly.proto +++ b/apponly.proto @@ -16,5 +16,9 @@ option java_outer_classname = "AppOnlyProtos"; * This abstraction is used only on the the 'app side' of the world (ie python, javascript and android etc) to show a group of Channels as a (long) URL */ message ChannelSet { + + /* + * TODO: REPLACE + */ repeated ChannelSettings settings = 1; } \ No newline at end of file diff --git a/cannedmessages.proto b/cannedmessages.proto index 8a249da..85babc5 100644 --- a/cannedmessages.proto +++ b/cannedmessages.proto @@ -28,6 +28,7 @@ option go_package = "github.com/meshtastic/gomeshproto"; * Canned message plugin part 1 */ message CannedMessagePluginMessagePart1 { + /* * Predefined messages for canned message plugin separated by '|' characters. * This is part 1. @@ -39,6 +40,7 @@ message CannedMessagePluginMessagePart1 { * Canned message plugin part 2 */ message CannedMessagePluginMessagePart2 { + /* * Predefined messages for canned message plugin separated by '|' characters. * This is part 2. @@ -50,6 +52,7 @@ message CannedMessagePluginMessagePart2 { * Canned message plugin part 3 */ message CannedMessagePluginMessagePart3 { + /* * Predefined messages for canned message plugin separated by '|' characters. * This is part 3. @@ -61,6 +64,7 @@ message CannedMessagePluginMessagePart3 { * Canned message plugin part 4 */ message CannedMessagePluginMessagePart4 { + /* * Predefined messages for canned message plugin separated by '|' characters. * This is part 4. @@ -72,6 +76,7 @@ message CannedMessagePluginMessagePart4 { * Canned message plugin part 5 */ message CannedMessagePluginMessagePart5 { + /* * Predefined messages for canned message plugin separated by '|' characters. * This is part 5. diff --git a/channel.proto b/channel.proto index 4b98846..5dc480f 100644 --- a/channel.proto +++ b/channel.proto @@ -65,30 +65,37 @@ message ChannelSettings { enum ModemConfig { /* + * TODO: REPLACE */ VLongSlow = 0; /* + * TODO: REPLACE */ LongSlow = 1; /* + * TODO: REPLACE */ LongFast = 2; /* + * TODO: REPLACE */ MidSlow = 3; /* + * TODO: REPLACE */ MidFast = 4; /* + * TODO: REPLACE */ ShortSlow = 5; /* + * TODO: REPLACE */ ShortFast = 6; } @@ -215,6 +222,7 @@ message Channel { * (but any number of SECONDARY channels can't be sent received on that common frequency) */ enum Role { + /* * This channel is not in use right now */ @@ -244,5 +252,8 @@ message Channel { */ ChannelSettings settings = 2; + /* + * TODO: REPLACE + */ Role role = 3; } diff --git a/deviceonly.proto b/deviceonly.proto index 62263d1..2c06d50 100644 --- a/deviceonly.proto +++ b/deviceonly.proto @@ -6,7 +6,6 @@ option go_package = "github.com/meshtastic/gomeshproto"; import "channel.proto"; import "mesh.proto"; -import "radioconfig.proto"; option java_outer_classname = "DeviceOnly"; @@ -35,6 +34,9 @@ message DeviceState { */ User owner = 3; + /* + * TODO: REPLACE + */ repeated NodeInfo node_db = 4; /* @@ -103,6 +105,7 @@ message DeviceState { * The on-disk saved channels */ message ChannelFile { + /* * The channels our node knows about */ diff --git a/environmental_measurement.proto b/environmental_measurement.proto index 04b6848..ba972f4 100644 --- a/environmental_measurement.proto +++ b/environmental_measurement.proto @@ -1,13 +1,38 @@ syntax = "proto3"; option go_package = "github.com/meshtastic/gomeshproto"; +/* + * TODO: REPLACE + */ message EnvironmentalMeasurement { + /* + * TODO: REPLACE + */ float temperature = 1; + + /* + * TODO: REPLACE + */ float relative_humidity = 2; + + /* + * TODO: REPLACE + */ float barometric_pressure = 3; + + /* + * TODO: REPLACE + */ float gas_resistance = 4; + + /* + * TODO: REPLACE + */ float voltage = 5; + + /* + * TODO: REPLACE + */ float current = 6; - } diff --git a/mesh.proto b/mesh.proto index 8508e78..1e1ef48 100644 --- a/mesh.proto +++ b/mesh.proto @@ -31,6 +31,7 @@ option java_outer_classname = "MeshProtos"; * a gps position */ message Position { + /* * The old (pre 1.2) position encoding sent lat/lon as sint32s in field 7,8. * Do not use to prevent confusing old apps @@ -43,9 +44,13 @@ message Position { */ sfixed32 latitude_i = 1; + /* + * TODO: REPLACE + */ sfixed32 longitude_i = 2; /* + * TODO: REMOTE/INTEGRATE * This is a special 'small' position update for lat/lon. * It encodes a signed 16 bit latitude in the upper 2 bytes, and a signed longitude in the lower 16 bits. * It is not currently implemented, but can be added in an automatically backwards compatible way later. @@ -77,22 +82,43 @@ message Position { /* * Precision positioning elements - optional and usually not included * ------------------------------------------------------------------ + * TODO: REMOVE/INTEGRATE */ /* * How the location was acquired: manual, onboard GPS, external (EUD) GPS */ enum LocSource { + + /* + * TODO: REPLACE + */ LOCSRC_UNSPECIFIED = 0; + + /* + * TODO: REPLACE + */ LOCSRC_MANUAL_ENTRY = 1; + + /* + * TODO: REPLACE + */ LOCSRC_GPS_INTERNAL = 2; + + /* + * TODO: REPLACE + */ LOCSRC_GPS_EXTERNAL = 3; /* * More location sources can be added here when available: * GSM, radio beacons (BLE etc), location fingerprinting etc + * TODO: REMOVE/INTEGRATE */ } + /* + * TODO: REPLACE + */ LocSource location_source = 10; /* @@ -100,13 +126,36 @@ message Position { * Default: same as location_source if present */ enum AltSource { + + /* + * TODO: REPLACE + */ ALTSRC_UNSPECIFIED = 0; + + /* + * TODO: REPLACE + */ ALTSRC_MANUAL_ENTRY = 1; + + /* + * TODO: REPLACE + */ ALTSRC_GPS_INTERNAL = 2; + + /* + * TODO: REPLACE + */ ALTSRC_GPS_EXTERNAL = 3; + + /* + * TODO: REPLACE + */ ALTSRC_BAROMETRIC = 4; } + /* + * TODO: REPLACE + */ AltSource altitude_source = 11; /* @@ -134,9 +183,18 @@ message Position { * - PDOP is sufficient for most cases * - for higher precision scenarios, HDOP and VDOP can be used instead, * in which case PDOP becomes redundant (PDOP=sqrt(HDOP^2 + VDOP^2)) + * TODO: REMOVE/INTEGRATE */ uint32 PDOP = 16; + + /* + * TODO: REPLACE + */ uint32 HDOP = 17; + + /* + * TODO: REPLACE + */ uint32 VDOP = 18; /* @@ -153,8 +211,13 @@ message Position { * - "track" is the direction of motion (measured in horizontal plane) * - "heading" is where the fuselage points (measured in horizontal plane) * - "yaw" indicates a relative rotation about the vertical axis + * TODO: REMOVE/INTEGRATE */ uint32 ground_speed = 20; + + /* + * TODO: REPLACE + */ uint32 ground_track = 21; /* @@ -193,6 +256,7 @@ message Position { /* * END precision positioning elements + * TODO: REMOVE/INTEGRATE */ } @@ -203,34 +267,97 @@ message Position { * To match the old style filenames, _ is converted to -, p is converted to . */ enum HardwareModel { + + /* + * TODO: REPLACE + */ UNSET = 0; + + /* + * TODO: REPLACE + */ TLORA_V2 = 1; + + /* + * TODO: REPLACE + */ TLORA_V1 = 2; + + /* + * TODO: REPLACE + */ TLORA_V2_1_1p6 = 3; + + /* + * TODO: REPLACE + */ TBEAM = 4; - // The original heltec WiFi_Lora_32_V2, which had battery voltage sensing hooked to GPIO 13 (see HELTEC_V2 for the new version). + /* + * The original heltec WiFi_Lora_32_V2, which had battery voltage sensing hooked to GPIO 13 + * (see HELTEC_V2 for the new version). + */ HELTEC_V2_0 = 5; + /* + * TODO: REPLACE + */ TBEAM0p7 = 6; + + /* + * TODO: REPLACE + */ T_ECHO = 7; + + /* + * TODO: REPLACE + */ TLORA_V1_1p3 = 8; + + /* + * TODO: REPLACE + */ RAK4631 = 9; - // The new version of the heltec WiFi_Lora_32_V2 board that has battery sensing hooked to GPIO 37. Sadly they did not update anything on the silkscreen to identify this board + /* + * The new version of the heltec WiFi_Lora_32_V2 board that has battery sensing hooked to GPIO 37. + * Sadly they did not update anything on the silkscreen to identify this board + */ HELTEC_V2_1 = 10; - // Ancient heltec WiFi_Lora_32 board + /* + * Ancient heltec WiFi_Lora_32 board + */ HELTEC_V1 = 11; /* * Less common/prototype boards listed here (needs one more byte over the air) */ LORA_RELAY_V1 = 32; + + /* + * TODO: REPLACE + */ NRF52840DK = 33; + + /* + * TODO: REPLACE + */ PPR = 34; + + /* + * TODO: REPLACE + */ GENIEBLOCKS = 35; + + /* + * TODO: REPLACE + */ NRF52_UNKNOWN = 36; + + /* + * TODO: REPLACE + */ PORTDUINO = 37; /* @@ -242,10 +369,12 @@ enum HardwareModel { * Custom DIY device based on @NanoVHF schematics: https://github.com/NanoVHF/Meshtastic-DIY/tree/main/Schematics */ DIY_V1 = 39; + /* * RAK WisBlock ESP32 core: https://docs.rakwireless.com/Product-Categories/WisBlock/RAK11200/Overview/ */ RAK11200 = 40; + /* * Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits. */ @@ -257,20 +386,80 @@ enum HardwareModel { * https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/blob/master/atak/ATAK/app/src/main/assets/filters/team_filters.xml */ enum Team { - CLEAR = 0; /* the default (unset) is "achromatic" (unaffiliated) */ + + /* + * the default (unset) is "achromatic" (unaffiliated) + */ + CLEAR = 0; + + /* + * TODO: REPLACE + */ CYAN = 1; + + /* + * TODO: REPLACE + */ WHITE = 2; + + /* + * TODO: REPLACE + */ YELLOW = 3; + + /* + * TODO: REPLACE + */ ORANGE = 4; + + /* + * TODO: REPLACE + */ MAGENTA = 5; + + /* + * TODO: REPLACE + */ RED = 6; + + /* + * TODO: REPLACE + */ MAROON = 7; + + /* + * TODO: REPLACE + */ PURPLE = 8; + + /* + * TODO: REPLACE + */ DARK_BLUE = 9; + + /* + * TODO: REPLACE + */ BLUE = 10; + + /* + * TODO: REPLACE + */ TEAL = 11; + + /* + * TODO: REPLACE + */ GREEN = 12; + + /* + * TODO: REPLACE + */ DARK_GREEN = 13; + + /* + * TODO: REPLACE + */ BROWN = 14; } @@ -409,6 +598,9 @@ message Routing { */ GOT_NAK = 2; + /* + * TODO: REPLACE + */ TIMEOUT = 3; /* @@ -443,13 +635,14 @@ message Routing { BAD_REQUEST = 32; /* - * The application layer service on the remote node received your request, but considered your request not authorized (i.e you did not - * send the request on the required bound channel) + * The application layer service on the remote node received your request, but considered your request not authorized + * (i.e you did not send the request on the required bound channel) */ NOT_AUTHORIZED = 33; } oneof variant { + /* * A route request going from the requester */ @@ -482,7 +675,7 @@ message Data { PortNum portnum = 1; /* - * Required + * TODO: REPLACE */ bytes payload = 2; @@ -565,11 +758,15 @@ message MeshPacket { * And the transmission queue in the router object is now a priority queue. */ enum Priority { + /* * Treated as Priority.DEFAULT */ UNSET = 0; + /* + * TODO: REPLACE + */ MIN = 1; /* @@ -595,6 +792,9 @@ message MeshPacket { */ ACK = 120; + /* + * TODO: REPLACE + */ MAX = 127; } @@ -602,6 +802,7 @@ message MeshPacket { * Identify if this is a delayed packet */ enum Delayed { + /* * If unset, the message is being sent in real time. */ @@ -653,7 +854,15 @@ message MeshPacket { */ oneof payloadVariant { + + /* + * TODO: REPLACE + */ Data decoded = 4; + + /* + * TODO: REPLACE + */ bytes encrypted = 5; } @@ -792,6 +1001,7 @@ message NodeInfo { float snr = 7; /* + * TODO: REMOVE/INTEGRATE * Returns the last measured frequency error. * The LoRa receiver estimates the frequency offset between the receiver * center frequency and that of the received LoRa signal. This function @@ -811,6 +1021,7 @@ message NodeInfo { */ /* + * TODO: REMOVE/INTEGRATE * Not currently used (till full DSR deployment?) Our current preferred node node for routing - might be the same as num if * we are adjacent Or zero if we don't yet know a route to this node. * fixed32 next_hop = 5; @@ -830,6 +1041,10 @@ message NodeInfo { * and we'll try to help. */ enum CriticalErrorCode { + + /* + * TODO: REPLACE + */ None = 0; /* @@ -882,8 +1097,10 @@ enum CriticalErrorCode { /* Selftest of SX1262 radio chip failed */ SX1262Failure = 10; - /* A (likely software but possibly hardware) failure was detected while trying to send packets. If this occurs on your board, please - post in the forum so that we can ask you to collect some information to allow fixing this bug */ + /* + * A (likely software but possibly hardware) failure was detected while trying to send packets. + * If this occurs on your board, please post in the forum so that we can ask you to collect some information to allow fixing this bug + */ RadioSpiBug = 11; } @@ -891,6 +1108,10 @@ enum CriticalErrorCode { * GroupInfo for group chats like #FoodFreaks and #CoolPeopleOnly */ message GroupInfo { + + /* + * TODO: REPLACE + */ repeated string group = 1; } @@ -1006,10 +1227,8 @@ message MyNodeInfo { */ float air_util_tx = 20; - - - /* + * TODO: REPLACE * FIXME - add more useful debugging state (queue depths etc) */ } @@ -1028,15 +1247,45 @@ message LogRecord { * Log levels, chosen to match python logging conventions. */ enum Level { + /* + * Log levels, chosen to match python logging conventions. + */ UNSET = 0; + + /* + * Log levels, chosen to match python logging conventions. + */ CRITICAL = 50; + + /* + * Log levels, chosen to match python logging conventions. + */ ERROR = 40; + + /* + * Log levels, chosen to match python logging conventions. + */ WARNING = 30; + + /* + * Log levels, chosen to match python logging conventions. + */ INFO = 20; + + /* + * Log levels, chosen to match python logging conventions. + */ DEBUG = 10; + + /* + * Log levels, chosen to match python logging conventions. + */ TRACE = 5; } + /* + * Log levels, chosen to match python logging conventions. + */ string message = 1; /* @@ -1079,8 +1328,14 @@ message FromRadio { */ uint32 num = 1; + /* + * Log levels, chosen to match python logging conventions. + */ oneof payloadVariant { + /* + * Log levels, chosen to match python logging conventions. + */ MeshPacket packet = 11; /* @@ -1134,6 +1389,7 @@ message ToRadio { * Instead of sending want_config_id as a uint32, newer clients send this structure with information about the client. */ message PeerInfo { + /* * The numeric version code for the client application, which in some cases are used to control device behavior (so the device can * make assumptions about who is using the API. @@ -1155,6 +1411,9 @@ message ToRadio { */ reserved 1, 101, 102, 103; + /* + * Log levels, chosen to match python logging conventions. + */ oneof payloadVariant { /* diff --git a/mqtt.proto b/mqtt.proto index ba114ab..f3a5660 100644 --- a/mqtt.proto +++ b/mqtt.proto @@ -12,6 +12,7 @@ option java_outer_classname = "MQTTProtos"; * This message wraps a MeshPacket with extra metadata about the sender and how it arrived. */ message ServiceEnvelope { + /* * The (probably encrypted) packet */ diff --git a/portnums.proto b/portnums.proto index 70509f1..a74d34b 100644 --- a/portnums.proto +++ b/portnums.proto @@ -48,6 +48,7 @@ enum PortNum { * Once READACK is implemented, use the new packet type/port number stuff? * @exclude * CLEAR_READACK = 2; + * TODO: REMOVE/INTEGRATE */ /* diff --git a/radioconfig.proto b/radioconfig.proto index a166341..dc9ec59 100644 --- a/radioconfig.proto +++ b/radioconfig.proto @@ -36,22 +36,65 @@ option go_package = "github.com/meshtastic/gomeshproto"; */ enum RegionCode { + /* + * TODO: REPLACE + */ Unset = 0; - US = 1; - EU433 = 2; - EU868 = 3; - CN = 4; - JP = 5; - ANZ = 6; - KR = 7; - TW = 8; - RU = 9; - IN = 10; - TH = 11; /* - * Add new regions here + * TODO: REPLACE */ + US = 1; + + /* + * TODO: REPLACE + */ + EU433 = 2; + + /* + * TODO: REPLACE + */ + EU868 = 3; + + /* + * TODO: REPLACE + */ + CN = 4; + + /* + * TODO: REPLACE + */ + JP = 5; + + /* + * TODO: REPLACE + */ + ANZ = 6; + + /* + * TODO: REPLACE + */ + KR = 7; + + /* + * TODO: REPLACE + */ + TW = 8; + + /* + * TODO: REPLACE + */ + RU = 9; + + /* + * TODO: REPLACE + */ + IN = 10; + + /* + * TODO: REPLACE + */ + TH = 11; } /* @@ -59,22 +102,90 @@ enum RegionCode { * configured. This is passed into the axp power management chip like on the tbeam. */ enum ChargeCurrent { + + /* + * TODO: REPLACE + */ MAUnset = 0; + + /* + * TODO: REPLACE + */ MA100 = 1; + + /* + * TODO: REPLACE + */ MA190 = 2; + + /* + * TODO: REPLACE + */ MA280 = 3; + + /* + * TODO: REPLACE + */ MA360 = 4; + + /* + * TODO: REPLACE + */ MA450 = 5; + + /* + * TODO: REPLACE + */ MA550 = 6; + + /* + * TODO: REPLACE + */ MA630 = 7; + + /* + * TODO: REPLACE + */ MA700 = 8; + + /* + * TODO: REPLACE + */ MA780 = 9; + + /* + * TODO: REPLACE + */ MA880 = 10; + + /* + * TODO: REPLACE + */ MA960 = 11; + + /* + * TODO: REPLACE + */ MA1000 = 12; + + /* + * TODO: REPLACE + */ MA1080 = 13; + + /* + * TODO: REPLACE + */ MA1160 = 14; + + /* + * TODO: REPLACE + */ MA1240 = 15; + + /* + * TODO: REPLACE + */ MA1320 = 16; } @@ -188,46 +299,100 @@ enum LocationSharing { * leading to longer airtime and a higher risk of packet loss */ enum PositionFlags { - /* Required for compilation */ + /* + * Required for compilation + */ POS_UNDEFINED = 0x0000; - /* Include an altitude value (if available) */ + /* + * Include an altitude value (if available) + */ POS_ALTITUDE = 0x0001; - /* Altitude value is MSL */ + /* + * Altitude value is MSL + */ POS_ALT_MSL = 0x0002; - /* Include geoidal separation */ + /* + * Include geoidal separation + */ POS_GEO_SEP = 0x0004; - /* Include the DOP value ; PDOP used by default, see below */ + /* + * Include the DOP value ; PDOP used by default, see below + */ POS_DOP = 0x0008; - /* If POS_DOP set, send separate HDOP / VDOP values instead of PDOP */ + /* + * If POS_DOP set, send separate HDOP / VDOP values instead of PDOP + */ POS_HVDOP = 0x0010; - /* Include battery level */ + /* + * Include battery level + */ POS_BATTERY = 0x0020; - /* Include number of "satellites in view" */ + /* + * Include number of "satellites in view" + */ POS_SATINVIEW = 0x0040; - /* Include a sequence number incremented per packet */ + /* + * Include a sequence number incremented per packet + */ POS_SEQ_NOS = 0x0080; - /* Include positional timestamp (from GPS solution) */ + /* + * Include positional timestamp (from GPS solution) + */ POS_TIMESTAMP = 0x0100; } +/* + * TODO: REPLACE + */ enum InputEventChar { + + /* + * TODO: REPLACE + */ KEY_NONE = 0; + + /* + * TODO: REPLACE + */ KEY_UP = 17; + + /* + * TODO: REPLACE + */ KEY_DOWN = 18; + + /* + * TODO: REPLACE + */ KEY_LEFT = 19; + + /* + * TODO: REPLACE + */ KEY_RIGHT = 20; - /* '\n' */ + + /* + * '\n' + */ KEY_SELECT = 10; + + /* + * TODO: REPLACE + */ KEY_BACK = 27; + + /* + * TODO: REPLACE + */ KEY_CANCEL = 24; } @@ -265,6 +430,7 @@ message RadioConfig { * offline (defaults to 3 - to allow for some lost packets) (FIXME not yet used) * * uint32 num_missed_to_fail = 3; + TODO: REMOVE/INTEGRATE */ /* @@ -476,10 +642,30 @@ message RadioConfig { * FIXME - Move this out of UserPreferences and into a section for plugin configuration. */ bool serialplugin_enabled = 120; + + /* + * TODO: REPLACE + */ bool serialplugin_echo = 121; + + /* + * TODO: REPLACE + */ uint32 serialplugin_rxd = 122; + + /* + * TODO: REPLACE + */ uint32 serialplugin_txd = 123; + + /* + * TODO: REPLACE + */ uint32 serialplugin_timeout = 124; + + /* + * TODO: REPLACE + */ uint32 serialplugin_mode = 125; /* @@ -487,10 +673,30 @@ message RadioConfig { * FIXME - Move this out of UserPreferences and into a section for plugin configuration. */ bool ext_notification_plugin_enabled = 126; + + /* + * TODO: REPLACE + */ uint32 ext_notification_plugin_output_ms = 127; + + /* + * TODO: REPLACE + */ uint32 ext_notification_plugin_output = 128; + + /* + * TODO: REPLACE + */ bool ext_notification_plugin_active = 129; + + /* + * TODO: REPLACE + */ bool ext_notification_plugin_alert_message = 130; + + /* + * TODO: REPLACE + */ bool ext_notification_plugin_alert_bell = 131; /* @@ -498,7 +704,15 @@ message RadioConfig { * FIXME - Move this out of UserPreferences and into a section for plugin configuration. */ bool range_test_plugin_enabled = 132; + + /* + * TODO: REPLACE + */ uint32 range_test_plugin_sender = 133; + + /* + * TODO: REPLACE + */ bool range_test_plugin_save = 134; /* @@ -506,10 +720,30 @@ message RadioConfig { *FIXME - Move this out of UserPreferences and into a section for plugin configuration. (was 136) */ bool store_forward_plugin_enabled = 148; + + /* + * TODO: REPLACE + */ bool store_forward_plugin_heartbeat = 149; + + /* + * TODO: REPLACE + */ uint32 store_forward_plugin_records = 137; + + /* + * TODO: REPLACE + */ uint32 store_forward_plugin_history_return_max = 138; + + /* + * TODO: REPLACE + */ uint32 store_forward_plugin_history_return_window = 139; + + /* + * TODO: REPLACE + */ reserved 136; /* @@ -550,15 +784,54 @@ message RadioConfig { */ bool environmental_measurement_plugin_display_farenheit = 145; + /* + * TODO: REPLACE + */ enum EnvironmentalMeasurementSensorType { + + /* + * TODO: REPLACE + */ DHT11 = 0; + + /* + * TODO: REPLACE + */ DS18B20 = 1; + + /* + * TODO: REPLACE + */ DHT12 = 2; + + /* + * TODO: REPLACE + */ DHT21 = 3; + + /* + * TODO: REPLACE + */ DHT22 = 4; + + /* + * TODO: REPLACE + */ BME280 = 5; + + /* + * TODO: REPLACE + */ BME680 = 6; + + /* + * TODO: REPLACE + */ MCP9808 = 7; + + /* + * TODO: REPLACE + */ SHTC3 = 8; }; @@ -674,11 +947,11 @@ message RadioConfig { string canned_message_plugin_allow_input_source = 171; /* - * Predefined messages for CannedMessagePlugin separated by '|' characters. - * Note: Split out the messages out to their own messages because we want to store 1,000 characters. - * and the entire message must fit within 256 bytes. - * Not sure if we should deprecate this or just remove it since we're in dev phase. - */ + * Predefined messages for CannedMessagePlugin separated by '|' characters. + * Note: Split out the messages out to their own messages because we want to store 1,000 characters. + * and the entire message must fit within 256 bytes. + * Not sure if we should deprecate this or just remove it since we're in dev phase. + */ string canned_message_plugin_messages = 172 [deprecated = true]; /* @@ -702,7 +975,10 @@ message RadioConfig { */ float adc_multiplier_override = 175; } + + /* + * TODO: REPLACE + */ UserPreferences preferences = 1; -} // RadioConfig - +} diff --git a/remote_hardware.proto b/remote_hardware.proto index f670662..54a0259 100644 --- a/remote_hardware.proto +++ b/remote_hardware.proto @@ -20,6 +20,10 @@ option go_package = "github.com/meshtastic/gomeshproto"; * (a special channel once multichannel support is included?) */ message HardwareMessage { + + /* + * TODO: REPLACE + */ enum Type { /* diff --git a/storeforward.proto b/storeforward.proto index 53c5a1b..226c965 100644 --- a/storeforward.proto +++ b/storeforward.proto @@ -5,6 +5,9 @@ option java_outer_classname = "StoreAndForwardProtos"; option optimize_for = LITE_RUNTIME; option go_package = "github.com/meshtastic/gomeshproto"; +/* + * TODO: REPLACE + */ message StoreAndForward { /* @@ -12,6 +15,7 @@ message StoreAndForward { * 101 - 199 = From Client */ enum RequestResponse { + /* * Unset/unused */ @@ -78,10 +82,11 @@ message StoreAndForward { * Client has requested that the router abort processing the client's request */ CLIENT_ABORT = 106; - } - + /* + * TODO: REPLACE + */ message Statistics { /* @@ -128,10 +133,11 @@ message StoreAndForward { * Is the heartbeat enabled on the server? */ uint32 return_window = 9; - - } + /* + * TODO: REPLACE + */ message History { /* @@ -148,9 +154,11 @@ message StoreAndForward { * The window of messages that was used to filter the history client requested */ uint32 last_request = 3; - } + /* + * TODO: REPLACE + */ message Heartbeat { /* @@ -162,15 +170,26 @@ message StoreAndForward { * If set, this is not the primary Store & Forward router on the mesh */ uint32 secondary = 2; - } + /* + * TODO: REPLACE + */ RequestResponse rr = 1; + /* + * TODO: REPLACE + */ Statistics stats = 2; + /* + * TODO: REPLACE + */ History history = 3; + /* + * TODO: REPLACE + */ Heartbeat heartbeat = 4; } From f5ac8d9c83a5818784b95eb62660854f6dc3099a Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Mon, 21 Feb 2022 19:39:32 +1100 Subject: [PATCH 2/2] Fix indentation & add proto lint extension --- .vscode/extensions.json | 2 +- mesh.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 109ee73..3dd642c 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,3 @@ { - "recommendations": ["zxh404.vscode-proto3"] + "recommendations": ["zxh404.vscode-proto3", "plex.vscode-protolint"] } diff --git a/mesh.proto b/mesh.proto index 1e1ef48..f6a03a0 100644 --- a/mesh.proto +++ b/mesh.proto @@ -723,7 +723,7 @@ message Data { * Defaults to false. If true, then what is in the payload should be treated as an emoji like giving * a message a heart or poop emoji. */ - uint32 group_id = 9; + uint32 group_id = 9; } /*