Fix comment formatting

pull/17/head
Sacha Weatherstone 2021-03-07 19:28:48 +11:00
rodzic 7c025b9a4d
commit ae5119b8fb
8 zmienionych plików z 247 dodań i 212 usunięć

Wyświetl plik

@ -9,11 +9,11 @@ import "channel.proto";
option java_outer_classname = "AdminProtos"; option java_outer_classname = "AdminProtos";
/* This message is handled by the Admin plugin and is responsible for all settings/channel read/write operations. This message /*
is used to do settings operations to both remote AND local nodes. * This message is handled by the Admin plugin and is responsible for all settings/channel read/write operations. This message
* is used to do settings operations to both remote AND local nodes.
(Prior to 1.2 these operations were done via special ToRadio operations) * (Prior to 1.2 these operations were done via special ToRadio operations)
*/ */
message AdminMessage { message AdminMessage {
oneof variant { oneof variant {

Wyświetl plik

@ -30,12 +30,11 @@ message ServiceEnvelope {
string gateway_id = 3; string gateway_id = 3;
} }
/* This is the most compact possible representation for a set of channels. It includes only one PRIMARY channel (which must be first) and /*
any SECONDARY channels. No DISABLED channels are included. * This is the most compact possible representation for a set of channels. It includes only one PRIMARY channel (which must be first) and
* any SECONDARY channels. No DISABLED channels are included.
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 * 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
as a (long) URL */
*/
message ChannelSet { message ChannelSet {
repeated ChannelSettings settings = 1; repeated ChannelSettings settings = 1;
} }

Wyświetl plik

@ -88,13 +88,11 @@ message ChannelSettings {
/* /*
* Note: This is the 'old' mechanism for specifying channel parameters. * Note: This is the 'old' mechanism for specifying channel parameters.
* Either modem_config or bandwidth/spreading/coding will be specified - NOT * Either modem_config or bandwidth/spreading/coding will be specified - NOT BOTH.
* BOTH. As a heuristic: If bandwidth is specified, do not use modem_config. * As a heuristic: If bandwidth is specified, do not use modem_config.
* Because protobufs take ZERO space when the value is zero this works out * Because protobufs take ZERO space when the value is zero this works out nicely.
* nicely. * This value is replaced by bandwidth/spread_factor/coding_rate.
* This value is replaced by bandwidth/spread_factor/coding_rate. If you'd * If you'd like to experiment with other options add them to MeshRadio.cpp in the device code.
* like to experiment with other options add them to MeshRadio.cpp in the
* device code.
*/ */
ModemConfig modem_config = 3; ModemConfig modem_config = 3;
@ -140,9 +138,9 @@ message ChannelSettings {
* A special shorthand is used for 1 byte long psks. * A special shorthand is used for 1 byte long psks.
* These psks should be treated as only minimally secure, * These psks should be treated as only minimally secure,
* because they are listed in this source code. Those bytes are mapped using the following scheme: * because they are listed in this source code. Those bytes are mapped using the following scheme:
* 0 = No crypto * `0` = No crypto
* 1 = The special default channel key: {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0xbf} * `1` = The special default channel key: {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0xbf}
* 2 through 10 = The default channel key, except with 1 through 9 added to the last byte * `2` through 10 = The default channel key, except with 1 through 9 added to the last byte
*/ */
bytes psk = 4; bytes psk = 4;
@ -181,36 +179,48 @@ message ChannelSettings {
bool downlink_enabled = 17; bool downlink_enabled = 17;
} }
/* A pair of a channel number, mode and the (sharable) settings for that channel */ /*
* A pair of a channel number, mode and the (sharable) settings for that channel
*/
message Channel { message Channel {
/* How this channel is being used (or not). /*
* How this channel is being used (or not).
Note: this field is an enum to give us options for the future. In particular, someday *
we might make a 'SCANNING' option. SCANNING channels could have different frequencies and the radio would * Note: this field is an enum to give us options for the future. In particular, someday
occasionally check that freq to see if anything is being transmitted. * we might make a 'SCANNING' option. SCANNING channels could have different frequencies and the radio would
* occasionally check that freq to see if anything is being transmitted.
For devices that have multiple physical radios attached, we could keep multiple PRIMARY/SCANNING channels active at once to allow *
cross band routing as needed. If a device has only a single radio (the common case) only one channel can be PRIMARY at a time * For devices that have multiple physical radios attached, we could keep multiple PRIMARY/SCANNING channels active at once to allow
(but any number of SECONDARY channels can't be sent received on that common frequency) * cross band routing as needed. If a device has only a single radio (the common case) only one channel can be PRIMARY at a time
* (but any number of SECONDARY channels can't be sent received on that common frequency)
*/ */
enum Role { enum Role {
/* This channel is not in use right now */ /*
* This channel is not in use right now
*/
DISABLED = 0; DISABLED = 0;
/* This channel is used to set the frequency for the radio - all other enabled channels must be SECONDARY */ /*
* This channel is used to set the frequency for the radio - all other enabled channels must be SECONDARY
*/
PRIMARY = 1; PRIMARY = 1;
/* Secondary channels are only used for encryption/decryption/authentication purposes. Their radio settings (freq etc) /*
* Secondary channels are only used for encryption/decryption/authentication purposes. Their radio settings (freq etc)
* are ignored, only psk is used. * are ignored, only psk is used.
*/ */
SECONDARY = 2; SECONDARY = 2;
} }
/* The index of this channel in the channel table (from 0 to MAX_NUM_CHANNELS-1) */ /*
* The index of this channel in the channel table (from 0 to MAX_NUM_CHANNELS-1)
*/
uint32 index = 1; uint32 index = 1;
/* The new settings, or NULL to disable that channel */ /*
* The new settings, or NULL to disable that channel
*/
ChannelSettings settings = 2; ChannelSettings settings = 2;
Role role = 3; Role role = 3;

Wyświetl plik

@ -18,7 +18,9 @@ option java_outer_classname = "DeviceOnly";
*/ */
message DeviceState { message DeviceState {
// Was secondary_channels before 1.2 /*
* Was secondary_channels before 1.2
*/
reserved 12; reserved 12;
RadioConfig radio = 1; RadioConfig radio = 1;

Wyświetl plik

@ -30,8 +30,10 @@ option java_outer_classname = "MeshProtos";
* a gps position * a gps position
*/ */
message 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 */ * The old (pre 1.2) position encoding sent lat/lon as sint32s in field 7,8.
* Do not use to prevent confusing old apps
*/
reserved 7, 8; reserved 7, 8;
/* /*
@ -42,12 +44,15 @@ message Position {
sfixed32 longitude_i = 2; sfixed32 longitude_i = 2;
/* 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 * This is a special 'small' position update for lat/lon.
automatically backwards compatible way later. Note: ONLY microlatlon OR latitude_i, longitude_i are populated in any particular * It encodes a signed 16 bit latitude in the upper 2 bytes, and a signed longitude in the lower 16 bits.
position. A microdelta is always relative to the last received full position. * It is not currently implemented, but can be added in an automatically backwards compatible way later.
* Note: ONLY microlatlon OR latitude_i, longitude_i are populated in any particular position.
fixed32 microlatlon = 3; */ * A microdelta is always relative to the last received full position.
*
* fixed32 microlatlon = 3;
*/
/* /*
* In meters above MSL * In meters above MSL
@ -134,8 +139,9 @@ message RouteDiscovery {
/* A Routing control Data packet handled by the routing plugin /*
*/ *A Routing control Data packet handled by the routing plugin
*/
message Routing { message Routing {
/* /*
@ -144,7 +150,9 @@ message Routing {
*/ */
enum Error { enum Error {
/* This message is not a failure */ /*
* This message is not a failure
*/
NONE = 0; NONE = 0;
/* /*
@ -169,10 +177,14 @@ message Routing {
*/ */
MAX_RETRANSMIT = 5; MAX_RETRANSMIT = 5;
/* No suitable channel was found for sending this packet (i.e. was requested channel index disabled?) */ /*
* No suitable channel was found for sending this packet (i.e. was requested channel index disabled?)
*/
NO_CHANNEL = 6; NO_CHANNEL = 6;
/* The packet was too big for sending (exceeds interface MTU after encoding) */ /*
* The packet was too big for sending (exceeds interface MTU after encoding)
*/
TOO_LARGE = 7; TOO_LARGE = 7;
} }
@ -193,25 +205,29 @@ message Routing {
*/ */
Error error_reason = 3; Error error_reason = 3;
/* Deprecated - this has been replced with error_reason == NONE && request_id != 0 /*
* Deprecated - this has been replced with error_reason == NONE && request_id != 0
* This is an ack. * This is an ack.
* This packet is a requested acknoledgement indicating that we have received * This packet is a requested acknoledgement indicating that we have received
* the specified message ID. This packet type can be used both for immediate * the specified message ID. This packet type can be used both for immediate
* (0 hops) messages or can be routed through multiple hops if dest is set. * (0 hops) messages or can be routed through multiple hops if dest is set.
* Note: As an optimization, recipients can _also_ populate a field in payload * Note: As an optimization, recipients can _also_ populate a field in payload
* if they think the recipient would appreciate that extra state. * if they think the recipient would appreciate that extra state.
*
fixed32 success_id = 4; * fixed32 success_id = 4;
*/ */
/* Deprecated - this has been replced with error_reason !== NONE && request_id != 0 /*
* Deprecated - this has been replced with error_reason !== NONE && request_id != 0
* This is a nak, we failed to deliver this message. * This is a nak, we failed to deliver this message.
fixed32 fail_id = 5; *
* fixed32 fail_id = 5;
*/ */
} }
} }
/* (Formerly called SubPacket) /*
* (Formerly called SubPacket)
* The payload portion fo a packet, this is the actual bytes that are sent * The payload portion fo a packet, this is the actual bytes that are sent
* inside a radio packet (because from/to are broken out by the comms library) * inside a radio packet (because from/to are broken out by the comms library)
*/ */
@ -264,48 +280,59 @@ message Data {
*/ */
message MeshPacket { message MeshPacket {
/* The priority of this message for sending. Higher priorities are sent first /*
(when managing the transmit queue). * The priority of this message for sending. Higher priorities are sent first
This field is never sent over the air, it is only used internally inside of a local device node. * (when managing the transmit queue).
API clients (either on the local node or connected directly to the node) * This field is never sent over the air, it is only used internally inside of a local device node.
can set this parameter if necessary. * API clients (either on the local node or connected directly to the node)
* can set this parameter if necessary.
(values must be <= 127 to keep protobuf field to one byte in size. *
* (values must be <= 127 to keep protobuf field to one byte in size.
Detailed background on this field: *
* Detailed background on this field:
I noticed a funny side effect of lora being so slow: Usually when making *
a protocol there isnt much need to use message priority to change the order * I noticed a funny side effect of lora being so slow: Usually when making
of transmission (because interfaces are fairly fast). * a protocol there isnt much need to use message priority to change the order
But for lora where packets can take a few seconds each, it is very important * of transmission (because interfaces are fairly fast).
to make sure that critical packets are sent ASAP. * But for lora where packets can take a few seconds each, it is very important
In the case of meshtastic that means we want to send protocol acks as soon as possible * to make sure that critical packets are sent ASAP.
(to prevent unneeded retransmissions), we want routing messages to be sent next, * In the case of meshtastic that means we want to send protocol acks as soon as possible
then messages marked as reliable and finally background packets like periodic position updates. * (to prevent unneeded retransmissions), we want routing messages to be sent next,
* then messages marked as reliable and finally background packets like periodic position updates.
So I bit the bullet and implemented a new (internal - not sent over the air) *
field in MeshPacket called priority. * So I bit the bullet and implemented a new (internal - not sent over the air)
And the transmission queue in the router object is now a priority queue. * field in MeshPacket called priority.
* And the transmission queue in the router object is now a priority queue.
*/ */
enum Priority { enum Priority {
/* Treated as Priority.DEFAULT */ /*
* Treated as Priority.DEFAULT
*/
UNSET = 0; UNSET = 0;
MIN = 1; MIN = 1;
/* Background position updates are sent with very low priority - /*
* if the link is super congested they might not go out at all */ * Background position updates are sent with very low priority -
* if the link is super congested they might not go out at all
*/
BACKGROUND = 10; BACKGROUND = 10;
/* This priority is used for most messages that don't have a priority set */ /*
* This priority is used for most messages that don't have a priority set
*/
DEFAULT = 64; DEFAULT = 64;
/* If priority is unset but the message is marked as want_ack, /*
* assume it is important and use a slightly higher priority */ * If priority is unset but the message is marked as want_ack,
* assume it is important and use a slightly higher priority
*/
RELIABLE = 70; RELIABLE = 70;
/* Ack/naks are sent with very high priority to ensure that retransmission /*
* stops as soon as possible */ * Ack/naks are sent with very high priority to ensure that retransmission
* stops as soon as possible
*/
ACK = 120; ACK = 120;
MAX = 127; MAX = 127;
@ -330,7 +357,6 @@ message MeshPacket {
* was sent/received on. If unset, packet was on the primary channel. * was sent/received on. If unset, packet was on the primary channel.
* A particular node might know only a subset of channels in use on the mesh. Therefore channel_index * A particular node might know only a subset of channels in use on the mesh. Therefore channel_index
* is inherently a local concept and meaningless to send between nodes. * is inherently a local concept and meaningless to send between nodes.
*
* Very briefly, while sending and receiving deep inside the device Router code, this field instead * Very briefly, while sending and receiving deep inside the device Router code, this field instead
* contains the 'channel hash' instead of the index. This 'trick' is only used while the payloadVariant is * contains the 'channel hash' instead of the index. This 'trick' is only used while the payloadVariant is
* an 'encrypted'. * an 'encrypted'.
@ -401,8 +427,9 @@ message MeshPacket {
*/ */
bool want_ack = 11; bool want_ack = 11;
/* The priority of this message for sending. /*
See MeshPacket.Priority description for more details. * The priority of this message for sending.
* See MeshPacket.Priority description for more details.
*/ */
Priority priority = 12; Priority priority = 12;
} }
@ -482,23 +509,21 @@ message NodeInfo {
* transmitter, the receiver or both. \return The estimated center frequency * transmitter, the receiver or both. \return The estimated center frequency
* offset in Hz of the last received message. * offset in Hz of the last received message.
* int32 frequency_error = 6; * int32 frequency_error = 6;
*
* enum RouteState { * enum RouteState {
* Invalid = 0; * Invalid = 0;
* Discovering = 1; * Discovering = 1;
* Valid = 2; * Valid = 2;
* } * }
*
* Not needed? * Not needed?
* RouteState route = 4; * RouteState route = 4;
*
* Our current preferred node node for routing - might be the same as num if * 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. * we are adjacent Or zero if we don't yet know a route to this node.
*/ */
uint32 next_hop = 5; uint32 next_hop = 5;
} }
/** Error codes for critical errors /*
* Error codes for critical errors
* *
* The device might report these fault codes on the screen. * The device might report these fault codes on the screen.
* If you encounter a fault code, please post on the meshtastic.discourse.group * If you encounter a fault code, please post on the meshtastic.discourse.group
@ -579,11 +604,13 @@ message MyNodeInfo {
*/ */
uint32 num_bands = 3; uint32 num_bands = 3;
/* The maximum number of 'software' channels that can be set on this node. /*
* The maximum number of 'software' channels that can be set on this node.
*/ */
uint32 max_channels = 15; uint32 max_channels = 15;
/* Deprecated! ONLY USED IN DEVICE CODE (for upgrading old 1.0 firmwares) DO NOT READ ELSEWHERE. /*
* Deprecated! ONLY USED IN DEVICE CODE (for upgrading old 1.0 firmwares) DO NOT READ ELSEWHERE.
* The region code for my radio (US, CN, etc...) * The region code for my radio (US, CN, etc...)
* Note: This string is deprecated. The 1.0 builds populate it based on the * Note: This string is deprecated. The 1.0 builds populate it based on the
* flashed firmware name. But for newer builds this string will be unpopulated * flashed firmware name. But for newer builds this string will be unpopulated
@ -644,7 +671,8 @@ message MyNodeInfo {
*/ */
} }
/* Debug output from the device. /*
* Debug output from the device.
* *
* To minimize the size of records inside the device code, if a time/source/level is not set * To minimize the size of records inside the device code, if a time/source/level is not set
* on the message it is assumed to be a continuation of the previously sent message. * on the message it is assumed to be a continuation of the previously sent message.
@ -692,9 +720,14 @@ message LogRecord {
*/ */
message FromRadio { message FromRadio {
/* In the <1.2 versions packet had ID 2, to prevent confusing old apps with our new packets, we've changed */ /*
* In the <1.2 versions packet had ID 2, to prevent confusing old apps with our new packets, we've changed
*/
reserved 2; reserved 2;
/* In the <1.2 versions nodeinfo had ID 4, to prevent confusing old apps with our new packets, we've changed */
/*
* In the <1.2 versions nodeinfo had ID 4, to prevent confusing old apps with our new packets, we've changed
*/
reserved 6; reserved 6;
/* /*
@ -748,8 +781,9 @@ message FromRadio {
*/ */
message ToRadio { message ToRadio {
/* In the <1.2 versions packet had ID 2, to prevent confusing old apps with our new packets, we've changed. /*
101-103 were used for set_radio, set_owner, set_channel * In the <1.2 versions packet had ID 2, to prevent confusing old apps with our new packets, we've changed.
* 101-103 were used for set_radio, set_owner, set_channel
*/ */
reserved 1, 101, 102, 103; reserved 1, 101, 102, 103;

Wyświetl plik

@ -42,14 +42,10 @@ enum PortNum {
/* /*
* A message receive acknowledgment, sent in cleartext - allows radio to * A message receive acknowledgment, sent in cleartext - allows radio to
* show user that a message has been read by the recipient, optional * show user that a message has been read by the recipient, optional
*
* Note: this concept has been removed for now. Once READACK is implemented, use the * Note: this concept has been removed for now. Once READACK is implemented, use the
* new packet type/port number stuff? * new packet type/port number stuff?
*
* @exclude * @exclude
*
* CLEAR_READACK = 2; * CLEAR_READACK = 2;
*
* Reserved for built-in GPIO/example app. * Reserved for built-in GPIO/example app.
* See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number * See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number
*/ */
@ -69,10 +65,14 @@ enum PortNum {
*/ */
NODEINFO_APP = 4; NODEINFO_APP = 4;
/* Protocol control packets for mesh protocol use, payload is a Routing protobuf */ /*
* Protocol control packets for mesh protocol use, payload is a Routing protobuf
*/
ROUTING_APP = 5; ROUTING_APP = 5;
/* Admin control packets, payload is a AdminMessage protobuf */ /*
* Admin control packets, payload is a AdminMessage protobuf
*/
ADMIN_APP = 6; ADMIN_APP = 6;
/* /*
@ -86,35 +86,30 @@ enum PortNum {
*/ */
IP_TUNNEL_APP = 33; IP_TUNNEL_APP = 33;
/** Provides a hardware serial interface to send and receive from the Meshtastic network. /*
Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic * Provides a hardware serial interface to send and receive from the Meshtastic network.
network is forwarded to the RX pin while sending a packet to TX will go out to the Mesh * Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic
network. Maximum packet size of 240 bytes. * network is forwarded to the RX pin while sending a packet to TX will go out to the Mesh network.
* Maximum packet size of 240 bytes.
Plugin is disabled by default can be turned on by setting SERIALPLUGIN_ENABLED = 1 in * Plugin is disabled by default can be turned on by setting SERIALPLUGIN_ENABLED = 1 in SerialPlugh.cpp.
SerialPlugh.cpp. * Maintained by Jm Casler (MC Hamster) : jm@casler.org
Maintained by Jm Casler (MC Hamster) : jm@casler.org
*/ */
SERIAL_APP = 64; SERIAL_APP = 64;
/* /*
* STORE_FORWARD_APP (Work in Progress) * STORE_FORWARD_APP (Work in Progress)
*
* Maintained by Jm Casler (MC Hamster) : jm@casler.org * Maintained by Jm Casler (MC Hamster) : jm@casler.org
*/ */
STORE_FORWARD_APP = 65; STORE_FORWARD_APP = 65;
/* /*
* STORE_FORWARD_APP (Work in Progress) * STORE_FORWARD_APP (Work in Progress)
*
* Maintained by Jm Casler (MC Hamster) : jm@casler.org * Maintained by Jm Casler (MC Hamster) : jm@casler.org
*/ */
RANGE_TEST_APP = 66; RANGE_TEST_APP = 66;
/* /*
* Provides a format to send and receive environmental data from the Meshtastic network. * Provides a format to send and receive environmental data from the Meshtastic network.
*
* Maintained by Charles Crossan (crossan007) : crossan007@gmail.com * Maintained by Charles Crossan (crossan007) : crossan007@gmail.com
*/ */
ENVIRONMENTAL_MEASUREMENT_APP = 67; ENVIRONMENTAL_MEASUREMENT_APP = 67;
@ -131,6 +126,8 @@ enum PortNum {
*/ */
ATAK_FORWARDER = 257; ATAK_FORWARDER = 257;
/** Currently we limit port nums to no higher than this value */ /*
* Currently we limit port nums to no higher than this value
*/
MAX = 511; MAX = 511;
} }

Wyświetl plik

@ -88,7 +88,6 @@ enum GpsOperation {
/* /*
* Note: This mode was removed, because it is identical go GpsOpMobile with a gps_update_rate of once per day * Note: This mode was removed, because it is identical go GpsOpMobile with a gps_update_rate of once per day
*
* This node is mostly stationary, we should try to get location only once per day, * This node is mostly stationary, we should try to get location only once per day,
* Once we have that position we should turn the GPS to sleep mode * Once we have that position we should turn the GPS to sleep mode
* This is the recommended configuration for stationary 'router' nodes * This is the recommended configuration for stationary 'router' nodes
@ -159,9 +158,7 @@ message RadioConfig {
/* /*
* If we miss this many owner messages from a node, we declare the node * If we miss this many owner messages from a node, we declare the node
* offline (defaults to 3 - to allow for some lost packets) (FIXME not yet used) * offline (defaults to 3 - to allow for some lost packets) (FIXME not yet used)
*/ *
/*
* uint32 num_missed_to_fail = 3; * uint32 num_missed_to_fail = 3;
*/ */
@ -221,7 +218,8 @@ message RadioConfig {
*/ */
uint32 min_wake_secs = 11; uint32 min_wake_secs = 11;
/* If set, this node will try to join the specified wifi network and /*
* If set, this node will try to join the specified wifi network and
* acquire an address via DHCP * acquire an address via DHCP
*/ */
string wifi_ssid = 12; string wifi_ssid = 12;
@ -281,8 +279,8 @@ message RadioConfig {
*/ */
bool debug_log_enabled = 101; bool debug_log_enabled = 101;
/** /*
How our location is shared with other nodes (or the local phone) * How our location is shared with other nodes (or the local phone)
*/ */
LocationSharing location_share = 32; LocationSharing location_share = 32;
@ -311,21 +309,17 @@ message RadioConfig {
* If true, radio should not try to be smart about what packets to queue to * If true, radio should not try to be smart about what packets to queue to
* the phone * the phone
* bool keep_all_packets = 101; * bool keep_all_packets = 101;
* * If true, we will try to capture all the packets sent on the mesh, not just the ones destined to our node.
* If true, we will try to capture all the packets sent on the mesh, not
* just the ones destined to our node.
* bool promiscuous_mode = 102; * bool promiscuous_mode = 102;
*
* For testing it is useful sometimes to force a node to never listen to * For testing it is useful sometimes to force a node to never listen to
* particular other nodes (simulating radio out of range). All nodenums listed * particular other nodes (simulating radio out of range). All nodenums listed
* in ignore_incoming will have packets they send droped on receive (by router.cpp) * in ignore_incoming will have packets they send droped on receive (by router.cpp)
*/ */
repeated uint32 ignore_incoming = 103; repeated uint32 ignore_incoming = 103;
/** /*
Preferences for the SerialPlugin * Preferences for the SerialPlugin
* FIXME - Move this out of UserPreferences and into a section for plugin configuration.
FIXME - Move this out of UserPreferences and into a section for plugin configuration.
*/ */
bool serialplugin_enabled = 120; bool serialplugin_enabled = 120;
bool serialplugin_echo = 121; bool serialplugin_echo = 121;
@ -334,10 +328,9 @@ message RadioConfig {
uint32 serialplugin_timeout = 124; uint32 serialplugin_timeout = 124;
uint32 serialplugin_mode = 125; uint32 serialplugin_mode = 125;
/** /*
Preferences for the ExternalNotificationPlugin * Preferences for the ExternalNotificationPlugin
* FIXME - Move this out of UserPreferences and into a section for plugin configuration.
FIXME - Move this out of UserPreferences and into a section for plugin configuration.
*/ */
bool ext_notification_plugin_enabled = 126; bool ext_notification_plugin_enabled = 126;
uint32 ext_notification_plugin_output_ms = 127; uint32 ext_notification_plugin_output_ms = 127;
@ -346,28 +339,24 @@ message RadioConfig {
bool ext_notification_plugin_alert_message = 130; bool ext_notification_plugin_alert_message = 130;
bool ext_notification_plugin_alert_bell = 131; bool ext_notification_plugin_alert_bell = 131;
/** /*
Preferences for the RangeTestPlugin *Preferences for the RangeTestPlugin
* FIXME - Move this out of UserPreferences and into a section for plugin configuration.
FIXME - Move this out of UserPreferences and into a section for plugin configuration.
*/ */
bool range_test_plugin_enabled = 132; bool range_test_plugin_enabled = 132;
uint32 range_test_plugin_sender = 133; uint32 range_test_plugin_sender = 133;
bool range_test_plugin_save = 134; bool range_test_plugin_save = 134;
/** /*
Preferences for the StoreForwardPlugin * Preferences for the StoreForwardPlugin
*FIXME - Move this out of UserPreferences and into a section for plugin configuration.
FIXME - Move this out of UserPreferences and into a section for plugin configuration.
*/ */
bool store_forward_plugin_enabled = 136; bool store_forward_plugin_enabled = 136;
uint32 store_forward_plugin_records = 137; uint32 store_forward_plugin_records = 137;
/**
Preferences for the EnvironmentalMeasurement Plugin
FIXME - Move this out of UserPreferences and into a section for plugin configuration.
*/
/* /*
* Preferences for the EnvironmentalMeasurement Plugin
* FIXME - Move this out of UserPreferences and into a section for plugin configuration.
* Enable/Disable the environmental measurement plugin measurement collection * Enable/Disable the environmental measurement plugin measurement collection
*/ */
bool environmental_measurement_plugin_measurement_enabled = 140; bool environmental_measurement_plugin_measurement_enabled = 140;
@ -387,14 +376,16 @@ message RadioConfig {
* measurements to the mesh * measurements to the mesh
*/ */
uint32 environmental_measurement_plugin_update_interval = 143; uint32 environmental_measurement_plugin_update_interval = 143;
/* Sometimes we can end up with more than read_error_count_threshold /*
* failures. In this case, we will stop trying to read from the sensor * Sometimes we can end up with more than read_error_count_threshold failures.
* for a while. Wait this long until trying to read from the sensor again * In this case, we will stop trying to read from the sensor for a while.
* Wait this long until trying to read from the sensor again
*/ */
uint32 environmental_measurement_plugin_recovery_interval = 144; uint32 environmental_measurement_plugin_recovery_interval = 144;
/* We'll always read the sensor in Celsius, but sometimes we might want to /*
display the results in Farenheit as a "user preference". s * We'll always read the sensor in Celsius, but sometimes we might want to
* display the results in Farenheit as a "user preference".
*/ */
bool environmental_measurement_plugin_display_farenheit = 145; bool environmental_measurement_plugin_display_farenheit = 145;
@ -402,11 +393,13 @@ message RadioConfig {
DHT11 = 0; DHT11 = 0;
}; };
/* Specify the sensor type /*
* Specify the sensor type
*/ */
EnvironmentalMeasurementSensorType environmental_measurement_plugin_sensor_type = 146; EnvironmentalMeasurementSensorType environmental_measurement_plugin_sensor_type = 146;
/* Specify the peferred GPIO Pin for sensor readings /*
* Specify the peferred GPIO Pin for sensor readings
*/ */
uint32 environmental_measurement_plugin_sensor_pin = 147; uint32 environmental_measurement_plugin_sensor_pin = 147;

Wyświetl plik

@ -4,7 +4,8 @@ option java_package = "com.geeksville.mesh";
option java_outer_classname = "RemoteHardware"; option java_outer_classname = "RemoteHardware";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
/* A example app to show off the plugin system. This message is used for /*
* An example app to show off the plugin system. This message is used for
* REMOTE_HARDWARE_APP PortNums. * REMOTE_HARDWARE_APP PortNums.
* *
* Also provides easy remote access to any GPIO. * Also provides easy remote access to any GPIO.
@ -33,7 +34,6 @@ message HardwareMessage {
/* /*
* We are now interested in watching the gpio_mask gpios. * We are now interested in watching the gpio_mask gpios.
* If the selected gpios change, please broadcast GPIOS_CHANGED. * If the selected gpios change, please broadcast GPIOS_CHANGED.
*
* Will implicitly change the gpios requested to be INPUT gpios. * Will implicitly change the gpios requested to be INPUT gpios.
*/ */
WATCH_GPIOS = 2; WATCH_GPIOS = 2;