diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 4849175..a536e6f 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -7,6 +7,7 @@ import "config.proto"; import "connection_status.proto"; import "mesh.proto"; import "module_config.proto"; +import "device_ui.proto"; option csharp_namespace = "Meshtastic.Protobufs"; option go_package = "github.com/meshtastic/go/generated"; @@ -76,6 +77,11 @@ message AdminMessage { * */ SESSIONKEY_CONFIG = 8; + + /* + * device-ui config + */ + DEVICEUI_CONFIG = 9; } /* @@ -329,6 +335,21 @@ message AdminMessage { */ fixed32 set_time_only = 43; + /* + * Tell the node to send the stored ui data. + */ + bool get_ui_config_request = 44; + + /* + * Reply stored device ui data. + */ + DeviceUIConfig get_ui_config_response = 45; + + /* + * Tell the node to store UI data persistently. + */ + DeviceUIConfig store_ui_config = 46; + /* * Begins an edit transaction for config, module config, owner, and channel settings changes * This will delay the standard *implicit* save to the file system and subsequent reboot behavior until committed (commit_edit_settings) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 0ad0b26..aaf340b 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package meshtastic; +import "meshtastic/device_ui.proto"; + option csharp_namespace = "Meshtastic.Protobufs"; option go_package = "github.com/meshtastic/go/generated"; option java_outer_classname = "ConfigProtos"; @@ -126,6 +128,17 @@ message Config { * but takes it step further by also ignoring messages from nodenums not in the node's known list (NodeDB) */ KNOWN_ONLY = 3; + + /* + * Only permitted for SENSOR, TRACKER and TAK_TRACKER roles, this will inhibit all rebroadcasts, not unlike CLIENT_MUTE role. + */ + NONE = 4; + + /* + * Ignores packets from non-standard portnums such as: TAK, RangeTest, PaxCounter, etc. + * Only rebroadcasts packets with standard portnums: NodeInfo, Text, Position, Telemetry, and Routing. + */ + CORE_PORTNUMS_ONLY = 5; } /* @@ -802,6 +815,21 @@ message Config { * Singapore 923mhz */ SG_923 = 18; + + /* + * Philippines 433mhz + */ + PH_433 = 19; + + /* + * Philippines 868mhz + */ + PH_868 = 20; + + /* + * Philippines 915mhz + */ + PH_915 = 21; } /* @@ -1074,5 +1102,6 @@ message Config { BluetoothConfig bluetooth = 7; SecurityConfig security = 8; SessionkeyConfig sessionkey = 9; + DeviceUIConfig device_ui = 10; } } diff --git a/meshtastic/device_only/deviceonly.options b/meshtastic/device_only/deviceonly.options index 6f53317..82dffcf 100644 --- a/meshtastic/device_only/deviceonly.options +++ b/meshtastic/device_only/deviceonly.options @@ -6,10 +6,6 @@ *ChannelFile.channels max_count:8 -*OEMStore.oem_text max_size:40 -*OEMStore.oem_icon_bits max_size:2048 -*OEMStore.oem_aes_key max_size:32 - *DeviceState.node_remote_hardware_pins max_count:12 *NodeInfoLite.channel int_size:8 diff --git a/meshtastic/device_only/deviceonly.proto b/meshtastic/device_only/deviceonly.proto index ce777df..3aab61f 100644 --- a/meshtastic/device_only/deviceonly.proto +++ b/meshtastic/device_only/deviceonly.proto @@ -150,27 +150,6 @@ message NodeInfoLite { bool is_favorite = 10; } -/* - * Font sizes for the device screen - */ -enum ScreenFonts { - /* - * TODO: REPLACE - */ - FONT_SMALL = 0; - - /* - * TODO: REPLACE - */ - FONT_MEDIUM = 1; - - /* - * TODO: REPLACE - */ - FONT_LARGE = 2; -} - - /* * This message is never sent over the wire, but it is used for serializing DB * state to flash in the device code @@ -254,49 +233,3 @@ message ChannelFile { */ uint32 version = 2; } - -/* - * This can be used for customizing the firmware distribution. If populated, - * show a secondary bootup screen with custom logo and text for 2.5 seconds. - */ -message OEMStore { - /* - * The Logo width in Px - */ - uint32 oem_icon_width = 1; - - /* - * The Logo height in Px - */ - uint32 oem_icon_height = 2; - - /* - * The Logo in XBM bytechar format - */ - bytes oem_icon_bits = 3; - - /* - * Use this font for the OEM text. - */ - ScreenFonts oem_font = 4; - - /* - * Use this font for the OEM text. - */ - string oem_text = 5; - - /* - * The default device encryption key, 16 or 32 byte - */ - bytes oem_aes_key = 6; - - /* - * A Preset LocalConfig to apply during factory reset - */ - LocalConfig oem_local_config = 7; - - /* - * A Preset LocalModuleConfig to apply during factory reset - */ - LocalModuleConfig oem_local_module_config = 8; -} diff --git a/meshtastic/device_ui.options b/meshtastic/device_ui.options new file mode 100644 index 0000000..65be467 --- /dev/null +++ b/meshtastic/device_ui.options @@ -0,0 +1,6 @@ +*DeviceUIConfig.screen_brightness int_size:8 +*DeviceUIConfig.screen_timeout int_size:16 +*DeviceUIConfig.ring_tone_id int_size:8 +*NodeFilter.node_name max_size:16 +*NodeFilter.hops_away int_size:8 +*NodeHighlight.node_name max_size:16 diff --git a/meshtastic/device_ui.proto b/meshtastic/device_ui.proto new file mode 100644 index 0000000..38481d2 --- /dev/null +++ b/meshtastic/device_ui.proto @@ -0,0 +1,227 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "DeviceUIProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * Protobuf structures for device-ui persistency + */ + +message DeviceUIConfig { + /* + * A version integer used to invalidate saved files when we make incompatible changes. + */ + uint32 version = 1; + + /* + * TFT display brightness 1..255 + */ + uint32 screen_brightness = 2; + + /* + * Screen timeout 0..900 + */ + uint32 screen_timeout = 3; + + /* + * Screen/Settings lock enabled + */ + bool screen_lock = 4; + bool settings_lock = 5; + uint32 pin_code = 6; + + /* + * Color theme + */ + Theme theme = 7; + + /* + * Audible message, banner and ring tone + */ + bool alert_enabled = 8; + bool banner_enabled = 9; + uint32 ring_tone_id = 10; + + /* + * Localization + */ + Language language = 11; + + /* + * Node list filter + */ + NodeFilter node_filter = 12; + + /* + * Node list highlightening + */ + NodeHighlight node_highlight = 13; +} + + +message NodeFilter { + /* + * Filter unknown nodes + */ + bool unknown_switch = 1; + + /* + * Filter offline nodes + */ + bool offline_switch = 2; + + /* + * Filter nodes w/o public key + */ + bool public_key_switch = 3; + + /* + * Filter based on hops away + */ + int32 hops_away = 4; + + /* + * Filter nodes w/o position + */ + bool position_switch = 5; + + /* + * Filter nodes by matching name string + */ + string node_name = 6; + +} + +message NodeHighlight { + /* + * Hightlight nodes w/ active chat + */ + bool chat_switch = 1; + + /* + * Highlight nodes w/ position + */ + bool position_switch = 2; + + /* + * Highlight nodes w/ telemetry data + */ + bool telemetry_switch = 3; + + /* + * Highlight nodes w/ iaq data + */ + bool iaq_switch = 4; + + /* + * Highlight nodes by matching name string + */ + string node_name = 5; + +} + +enum Theme { + /* + * Dark + */ + DARK = 0; + /* + * Light + */ + LIGHT = 1; + /* + * Red + */ + RED = 2; +} + +/* + * Localization + */ +enum Language { + /* + * English + */ + ENGLISH = 0; + + /* + * French + */ + FRENCH = 1; + + /* + * German + */ + GERMAN = 2; + + /* + * Italian + */ + ITALIAN = 3; + + /* + * Portuguese + */ + PORTUGUESE = 4; + + /* + * Spanish + */ + SPANISH = 5; + + /* + * Swedish + */ + SWEDISH = 6; + + /* + * Finnish + */ + FINNISH = 7; + + /* + * Polish + */ + POLISH = 8; + + /* + * Turkish + */ + TURKISH = 9; + + /* + * Serbian + */ + SERBIAN = 10; + + /* + * Russian + */ + RUSSIAN = 11; + + /* + * Dutch + */ + DUTCH = 12; + + /* + * Greek + */ + GREEK = 13; + + /* + * Simplified Chinese (experimental) + */ + SIMPLIFIED_CHINESE = 30; + + /* + * Traditional Chinese (experimental) + */ + TRADITIONAL_CHINESE = 31; + } + diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index cb85daa..4e335d2 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -25,6 +25,7 @@ # Big enough for 1.2.28.568032c-d *MyNodeInfo.firmware_version max_size:18 +*MyNodeInfo.device_id max_size:16 *MyNodeInfo.air_period_tx max_count:8 *MyNodeInfo.air_period_rx max_count:8 diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 9f35056..b7b9e90 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -8,6 +8,7 @@ import "module_config.proto"; import "portnums.proto"; import "telemetry.proto"; import "xmodem.proto"; +import "device_ui.proto"; option csharp_namespace = "Meshtastic.Protobufs"; option go_package = "github.com/meshtastic/go/generated"; @@ -1456,6 +1457,11 @@ message MyNodeInfo { * Phone/PC apps should compare this to their build number and if too low tell the user they must update their app */ uint32 min_app_version = 11; + + /* + * Unique hardware identifier for this device + */ + bytes device_id = 12; } /* @@ -1640,6 +1646,11 @@ message FromRadio { * Notification message to the client */ ClientNotification clientNotification = 16; + + /* + * Persistent data for device-ui + */ + DeviceUIConfig deviceuiConfig = 17; } } diff --git a/meshtastic/rtttl.options b/meshtastic/rtttl.options index 1ae0c2f..171e426 100644 --- a/meshtastic/rtttl.options +++ b/meshtastic/rtttl.options @@ -1 +1 @@ -*RTTTLConfig.ringtone max_size:230 +*RTTTLConfig.ringtone max_size:231 diff --git a/meshtastic/telemetry.proto b/meshtastic/telemetry.proto index c3b896b..5dd810b 100644 --- a/meshtastic/telemetry.proto +++ b/meshtastic/telemetry.proto @@ -228,6 +228,11 @@ message AirQualityMetrics { * 10.0um Particle Count */ optional uint32 particles_100um = 12; + + /* + * 10.0um Particle Count + */ + optional uint32 co2 = 13; } /* @@ -512,9 +517,14 @@ enum TelemetrySensorType { MAX30102 = 30; /* - * MLX90614 non-contact IR temperature sensor. + * MLX90614 non-contact IR temperature sensor */ MLX90614 = 31; + + /* + * SCD40/SCD41 CO2, humidity, temperature sensor + */ + SCD4X = 32; } /*