Use consistant naming + wifiConfig rename

pull/198/head
Sacha Weatherstone 2022-09-07 11:04:18 +09:30
rodzic f2cf4cf0ed
commit 59e3b65b5d
11 zmienionych plików z 96 dodań i 189 usunięć

Wyświetl plik

@ -1,4 +1,4 @@
*AdminMessage.variant anonymous_oneof:true
*AdminMessage.payload_variant anonymous_oneof:true
*AdminMessage.set_canned_message_module_messages max_size:201
*AdminMessage.get_canned_message_module_messages_response max_size:201

Wyświetl plik

@ -104,7 +104,7 @@ message AdminMessage {
/*
* TODO: REPLACE
*/
oneof variant {
oneof payload_variant {
/*
* Set the owner for this node

Wyświetl plik

@ -18,26 +18,26 @@ message Config {
/*
* Client device role
*/
Client = 0;
CLIENT = 0;
/*
* Client Mute device role
* Same as a client except packets will not hop over this node, does not contribute to routing packets for mesh.
*/
ClientMute = 1;
CLIENT_MUTE = 1;
/*
* Router device role.
* Mesh packets will prefer to be routed over this node. This node will not be used by client apps.
* The wifi/ble radios and the oled screen will be put to sleep.
*/
Router = 2;
ROUTER = 2;
/*
* Router Client device role
* Mesh packets will prefer to be routed over this node. The Router Client can be used as both a Router and an app connected Client.
*/
RouterClient = 3;
ROUTER_CLIENT = 3;
}
@ -84,61 +84,61 @@ message Config {
/*
* Required for compilation
*/
POS_UNDEFINED = 0x0000;
UNSET = 0x0000;
/*
* Include an altitude value (if available)
*/
POS_ALTITUDE = 0x0001;
ALTITUDE = 0x0001;
/*
* Altitude value is MSL
*/
POS_ALT_MSL = 0x0002;
ALTITUDE_MSL = 0x0002;
/*
* Include geoidal separation
*/
POS_GEO_SEP = 0x0004;
GEOIDAL_SEPERATION = 0x0004;
/*
* Include the DOP value ; PDOP used by default, see below
*/
POS_DOP = 0x0008;
DOP = 0x0008;
/*
* If POS_DOP set, send separate HDOP / VDOP values instead of PDOP
*/
POS_HVDOP = 0x0010;
HVDOP = 0x0010;
/*
* Include number of "satellites in view"
*/
POS_SATINVIEW = 0x0020;
SATINVIEW = 0x0020;
/*
* Include a sequence number incremented per packet
*/
POS_SEQ_NOS = 0x0040;
SEQ_NO = 0x0040;
/*
* Include positional timestamp (from GPS solution)
*/
POS_TIMESTAMP = 0x0080;
TIMESTAMP = 0x0080;
/*
* Include positional heading
* Intended for use with vehicle not walking speeds
* walking speeds are likely to be error prone like the compass
*/
POS_HEADING = 0x0100;
HEADING = 0x0100;
/*
* Include positional speed
* Intended for use with vehicle not walking speeds
* walking speeds are likely to be error prone like the compass
*/
POS_SPEED = 0x0200;
SPEED = 0x0200;
}
/*
@ -193,37 +193,6 @@ message Config {
*/
message PowerConfig {
/*
* Sets the charge control current of devices with a battery charger that can be configured
* **TBEAM 1.1 Only**
*/
enum ChargeCurrent {
MAUnset = 0;
MA100 = 1;
MA190 = 2;
MA280 = 3;
MA360 = 4;
MA450 = 5;
MA550 = 6;
MA630 = 7;
MA700 = 8;
MA780 = 9;
MA880 = 10;
MA960 = 11;
MA1000 = 12;
MA1080 = 13;
MA1160 = 14;
MA1240 = 15;
MA1320 = 16;
}
/*
* Sets the current of the battery charger
* TBEAM 1.1 Only
*/
ChargeCurrent charge_current = 1;
/*
* If set, we are powered from a low-current source (i.e. solar), so even if it looks like we have power flowing in
* we should try to minimize power consumption as much as possible.
@ -286,48 +255,48 @@ message Config {
}
/*
* WiFi Config
* Network Config
*/
message WiFiConfig {
message NetworkConfig {
enum WiFiMode {
/*
* This mode is used to connect to an external WiFi network
*/
Client = 0;
CLIENT = 0;
/*
* In this mode the node will operate as an AP (and DHCP server)
*/
AccessPoint = 1;
ACCESS_POINT = 1;
/*
* If set, the node AP will broadcast as a hidden SSID
*/
AccessPointHidden = 2;
ACCESS_POINT_HIDDEN = 2;
}
/*
* Enable WiFi (disables Bluetooth)
*/
bool enabled = 1;
bool wifi_enabled = 1;
/*
* If set, this node will try to join the specified wifi network and
* acquire an address via DHCP
*/
WiFiMode mode = 2;
WiFiMode wifi_mode = 2;
/*
* If set, this node will try to join the specified wifi network and
* acquire an address via DHCP
*/
string ssid = 3;
string wifi_ssid = 3;
/*
* If set, will be use to authenticate to the named wifi
*/
string psk = 4;
string wifi_psk = 4;
}
/*
@ -343,38 +312,38 @@ message Config {
* GPS coordinates are displayed in the normal decimal degrees format:
* DD.DDDDDD DDD.DDDDDD
*/
GpsFormatDec = 0;
DEC = 0;
/*
* GPS coordinates are displayed in the degrees minutes seconds format:
* DD°MM'SS"C DDD°MM'SS"C, where C is the compass point representing the locations quadrant
*/
GpsFormatDMS = 1;
DMS = 1;
/*
* Universal Transverse Mercator format:
* ZZB EEEEEE NNNNNNN, where Z is zone, B is band, E is easting, N is northing
*/
GpsFormatUTM = 2;
UTM = 2;
/*
* Military Grid Reference System format:
* ZZB CD EEEEE NNNNN, where Z is zone, B is band, C is the east 100k square, D is the north 100k square,
* E is easting, N is northing
*/
GpsFormatMGRS = 3;
MGRS = 3;
/*
* Open Location Code (aka Plus Codes).
*/
GpsFormatOLC = 4;
OLC = 4;
/*
* Ordnance Survey Grid Reference (the National Grid System of the UK).
* Format: AB EEEEE NNNNN, where A is the east 100k square, B is the north 100k square,
* E is the easting, N is the northing
*/
GpsFormatOSGR = 5;
OSGR = 5;
}
/*
@ -411,7 +380,7 @@ message Config {
/*
* Region is not set
*/
Unset = 0;
UNSET = 0;
/*
* United States
@ -421,12 +390,12 @@ message Config {
/*
* European Union 433mhz
*/
EU433 = 2;
EU_433 = 2;
/*
* European Union 433mhz
*/
EU868 = 3;
EU_868 = 3;
/*
* China
@ -466,7 +435,7 @@ message Config {
/*
* New Zealand 865mhz
*/
NZ865 = 11;
NZ_865 = 11;
/*
* Thailand
@ -483,37 +452,37 @@ message Config {
/*
* Long Range - Fast
*/
LongFast = 0;
LONG_FAST = 0;
/*
* Long Range - Slow
*/
LongSlow = 1;
LONG_SLOW = 1;
/*
* Very Long Range - Slow
*/
VLongSlow = 2;
VERY_LONG_SLOW = 2;
/*
* Medium Range - Slow
*/
MedSlow = 3;
MEDIUM_SLOW = 3;
/*
* Medium Range - Fast
*/
MedFast = 4;
MEDIUM_FAST = 4;
/*
* Short Range - Slow
*/
ShortSlow = 5;
SHORT_SLOW = 5;
/*
* Short Range - Fast
*/
ShortFast = 6;
SHORT_FAST = 6;
}
/*
@ -591,17 +560,17 @@ message Config {
/*
* Device generates a random pin that will be shown on the screen of the device for pairing
*/
RandomPin = 0;
RANDOM_PIN = 0;
/*
* Device requires a specified fixed pin for pairing
*/
FixedPin = 1;
FIXED_PIN = 1;
/*
* Device requires no pin for pairing
*/
NoPin = 2;
NO_PIN = 2;
}
/*
@ -624,7 +593,7 @@ message Config {
/*
* Payload Variant
*/
oneof payloadVariant {
oneof payload_variant {
DeviceConfig device = 1;
PositionConfig position = 2;

Wyświetl plik

@ -18,11 +18,6 @@ option java_outer_classname = "DeviceOnly";
*/
message DeviceState {
/*
* Was secondary_channels before 1.2
*/
reserved 12;
/*
* Read only settings/info about this node
*/

Wyświetl plik

@ -13,7 +13,7 @@
# outside of this envelope
*Data.payload max_size:237
*Data.payload_compressed max_size:237
*Data.payloadVariant anonymous_oneof:true
*Data.payload_variant anonymous_oneof:true
# Big enough for 1.2.28.568032c-d
*MyNodeInfo.firmware_version max_size:18
@ -26,13 +26,13 @@
# Note: the actual limit (because of header bytes) on the size of encrypted payloads is 251 bytes, but I use 256
# here because we might need to fill with zeros for padding to encryption block size (16 bytes per block)
*MeshPacket.encrypted max_size:256
*MeshPacket.payloadVariant anonymous_oneof:true
*MeshPacket.payload_variant anonymous_oneof:true
*MeshPacket.hop_limit int_size:8
*MeshPacket.channel int_size:8
*ToRadio.payloadVariant anonymous_oneof:true
*ToRadio.payload_variant anonymous_oneof:true
*FromRadio.payloadVariant anonymous_oneof:true
*FromRadio.payload_variant anonymous_oneof:true
*Routing.variant anonymous_oneof:true

Wyświetl plik

@ -54,27 +54,22 @@ message Position {
/*
* TODO: REPLACE
*/
LOCSRC_UNSPECIFIED = 0;
UNSET = 0;
/*
* TODO: REPLACE
*/
LOCSRC_MANUAL_ENTRY = 1;
MANUAL = 1;
/*
* TODO: REPLACE
*/
LOCSRC_GPS_INTERNAL = 2;
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
*/
GPS_EXTERNAL = 3;
}
/*
@ -91,27 +86,27 @@ message Position {
/*
* TODO: REPLACE
*/
ALTSRC_UNSPECIFIED = 0;
UNSET = 0;
/*
* TODO: REPLACE
*/
ALTSRC_MANUAL_ENTRY = 1;
MANUAL = 1;
/*
* TODO: REPLACE
*/
ALTSRC_GPS_INTERNAL = 2;
GPS_INTERNAL = 2;
/*
* TODO: REPLACE
*/
ALTSRC_GPS_EXTERNAL = 3;
GPS_EXTERNAL = 3;
/*
* TODO: REPLACE
*/
ALTSRC_BAROMETRIC = 4;
BAROMETRIC = 4;
}
/*
@ -213,11 +208,6 @@ message Position {
* detect lost updates if needed
*/
uint32 pos_seq_number = 41;
/*
* END precision positioning elements
* TODO: REMOVE/INTEGRATE
*/
}
/*
@ -246,7 +236,7 @@ enum HardwareModel {
/*
* TODO: REPLACE
*/
TLORA_V2_1_1p6 = 3;
TLORA_V2_1_1P6 = 3;
/*
* TODO: REPLACE
@ -262,7 +252,7 @@ enum HardwareModel {
/*
* TODO: REPLACE
*/
TBEAM0p7 = 6;
TBEAM_V0P7 = 6;
/*
* TODO: REPLACE
@ -272,7 +262,7 @@ enum HardwareModel {
/*
* TODO: REPLACE
*/
TLORA_V1_1p3 = 8;
TLORA_V1_1P3 = 8;
/*
* TODO: REPLACE
@ -640,7 +630,7 @@ message Waypoint {
/*
* A packet envelope sent/received over the mesh
* only payloadVariant is sent in the payload portion of the LORA packet.
* only payload_variant is sent in the payload portion of the LORA packet.
* The other fields are either not sent at all, or sent in the special 16 byte LORA header.
*/
message MeshPacket {
@ -748,7 +738,7 @@ message MeshPacket {
* Therefore channel_index 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
* contains the 'channel hash' instead of the index.
* This 'trick' is only used while the payloadVariant is an 'encrypted'.
* This 'trick' is only used while the payload_variant is an 'encrypted'.
*/
uint32 channel = 3;
@ -761,7 +751,7 @@ message MeshPacket {
* The numeric IDs for these fields were selected to keep backwards compatibility with old applications.
*/
oneof payloadVariant {
oneof payload_variant {
/*
* TODO: REPLACE
@ -851,7 +841,7 @@ enum Constants {
* First enum must be zero, and we are just using this enum to
* pass int constants between two very different environments
*/
Unused = 0;
UNSET = 0;
/*
* From mesh.options
@ -951,63 +941,63 @@ enum CriticalErrorCode {
/*
* TODO: REPLACE
*/
None = 0;
NONE = 0;
/*
* A software bug was detected while trying to send lora
*/
TxWatchdog = 1;
TX_WATCHDOG = 1;
/*
* A software bug was detected on entry to sleep
*/
SleepEnterWait = 2;
SLEEP_ENTER_WAIT = 2;
/*
* No Lora radio hardware could be found
*/
NoRadio = 3;
NO_RADIO = 3;
/*
* Not normally used
*/
Unspecified = 4;
UNSPECIFIED = 4;
/*
* We failed while configuring a UBlox GPS
*/
UBloxInitFailed = 5;
UBLOX_UNIT_FAILED = 5;
/*
* This board was expected to have a power management chip and it is missing or broken
*/
NoAXP192 = 6;
NO_AXP192 = 6;
/*
* The channel tried to set a radio setting which is not supported by this chipset,
* radio comms settings are now undefined.
*/
InvalidRadioSetting = 7;
INVALID_RADIO_SETTING = 7;
/*
* Radio transmit hardware failure. We sent data to the radio chip, but it didn't
* reply with an interrupt.
*/
TransmitFailed = 8;
TRANSMIT_FAILED = 8;
/*
* We detected that the main CPU voltage dropped below the minumum acceptable value
*/
Brownout = 9;
BROWNOUT = 9;
/* Selftest of SX1262 radio chip failed */
SX1262Failure = 10;
SX1262_FAILURE = 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
*/
RadioSpiBug = 11;
RADIO_SPI_BUG = 11;
}
/*
@ -1203,7 +1193,7 @@ message FromRadio {
/*
* Log levels, chosen to match python logging conventions.
*/
oneof payloadVariant {
oneof payload_variant {
/*
* Log levels, chosen to match python logging conventions.
@ -1292,7 +1282,7 @@ message ToRadio {
/*
* Log levels, chosen to match python logging conventions.
*/
oneof payloadVariant {
oneof payload_variant {
/*
* Send this packet on the mesh

Wyświetl plik

@ -65,7 +65,7 @@ message ModuleConfig {
* TODO: REPLACE
*/
enum Serial_Baud {
BAUD_Default = 0;
Default = 0;
BAUD_110 = 1;
BAUD_300 = 2;
BAUD_600 = 3;
@ -87,9 +87,9 @@ message ModuleConfig {
* TODO: REPLACE
*/
enum Serial_Mode {
MODE_Default = 0;
MODE_SIMPLE = 1;
MODE_PROTO = 2;
DEFAULT = 0;
SIMPLE = 1;
PROTO = 2;
};
/*
@ -270,42 +270,42 @@ message ModuleConfig {
/*
* TODO: REPLACE
*/
KEY_NONE = 0;
NONE = 0;
/*
* TODO: REPLACE
*/
KEY_UP = 17;
UP = 17;
/*
* TODO: REPLACE
*/
KEY_DOWN = 18;
DOWN = 18;
/*
* TODO: REPLACE
*/
KEY_LEFT = 19;
LEFT = 19;
/*
* TODO: REPLACE
*/
KEY_RIGHT = 20;
RIGHT = 20;
/*
* '\n'
*/
KEY_SELECT = 10;
SELECT = 10;
/*
* TODO: REPLACE
*/
KEY_BACK = 27;
BACK = 27;
/*
* TODO: REPLACE
*/
KEY_CANCEL = 24;
CANCEL = 24;
}
/*
@ -369,7 +369,7 @@ message ModuleConfig {
/*
* TODO: REPLACE
*/
oneof payloadVariant {
oneof payload_variant {
/*
* TODO: REPLACE

Wyświetl plik

@ -1,36 +0,0 @@
syntax = "proto3";
/*
* This file documents protobufs that are being considered but are not yet in use
*/
/*
* Placeholder for data we will eventually set during initial programming.
* This will allow us to stop having a load for each region.
*/
message ManufacturingData {
/*
* center frequency for the radio hardware that was stuffed
*/
uint32 fradioFreq = 1;
/*
* TBEAM, HELTEC, etc...
*/
string hw_model = 2;
/*
* Hardware version number
*/
string hw_version = 3;
/*
* This code is written during manfacturing time and allows users to confirm that
* the initial manufacturing tests succeeded.
* 0 means no test performed.
* 1 means all tests passed
* negative numbers indicate particular error codes
*/
sint32 selftest_result = 4;
}

Wyświetl plik

@ -35,16 +35,6 @@ enum PortNum {
*/
TEXT_MESSAGE_APP = 1;
/*
* A message receive acknowledgment, sent in cleartext - allows radio to
* 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 new packet type/port number stuff?
* @exclude
* CLEAR_READACK = 2;
* TODO: REMOVE/INTEGRATE
*/
/*
* Reserved for built-in GPIO/example app.
* See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number
@ -75,7 +65,6 @@ enum PortNum {
*/
ADMIN_APP = 6;
/*
* Compressed TEXT_MESSAGE payloads.
*/

Wyświetl plik

@ -59,7 +59,7 @@ message HardwareMessage {
/*
* What type of HardwareMessage is this?
*/
Type typ = 1;
Type type = 1;
/*
* What gpios are we changing. Not used for all MessageTypes, see MessageType for details

Wyświetl plik

@ -99,7 +99,7 @@ enum TelemetrySensorType {
/*
* No external telemetry sensor explicitly set
*/
NotSet = 0;
UNSET = 0;
/*
* High accuracy temperature, pressure, humidity