From 552e6364627f99f658fec2642cb4e0c4add1b3a2 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 3 Apr 2024 06:48:23 -0500 Subject: [PATCH 1/2] Added TD-LORAC module --- meshtastic/mesh.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index d59c8b2..ade29d8 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -504,6 +504,12 @@ enum HardwareModel { */ UNPHONE = 59; + /* + * Teledatics TD-LORAC NRF52840 based M.2 LoRA module + * Compatible with the TD-WRLS development board + */ + TD_LORAC = 60; + /* * ------------------------------------------------------------------------------------------------------------------------------------------ * 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. From e5590e7875f77b7cb1fd4c3f2b799f8137e9d24c Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 3 Apr 2024 06:52:50 -0500 Subject: [PATCH 2/2] Reorder device-only to fix nanopb generator issue in firmware --- meshtastic/deviceonly.proto | 220 ++++++++++++++++++------------------ 1 file changed, 111 insertions(+), 109 deletions(-) diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index 2929559..eef59a7 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -16,6 +16,117 @@ option java_package = "com.geeksville.mesh"; option swift_prefix = ""; option (nanopb_fileopt).include = ""; + +/* + * Position with static location information only for NodeDBLite + */ +message PositionLite { + /* + * The new preferred location encoding, multiply by 1e-7 to get degrees + * in floating point + */ + sfixed32 latitude_i = 1; + + /* + * TODO: REPLACE + */ + sfixed32 longitude_i = 2; + + /* + * In meters above MSL (but see issue #359) + */ + int32 altitude = 3; + + /* + * This is usually not sent over the mesh (to save space), but it is sent + * from the phone so that the local device can set its RTC If it is sent over + * the mesh (because there are devices on the mesh without GPS), it will only + * be sent by devices which has a hardware GPS clock. + * seconds since 1970 + */ + fixed32 time = 4; + + /* + * TODO: REPLACE + */ + Position.LocSource location_source = 5; +} + +message NodeInfoLite { + /* + * The node number + */ + uint32 num = 1; + + /* + * The user info for this node + */ + User user = 2; + + /* + * This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true. + * Position.time now indicates the last time we received a POSITION from that node. + */ + PositionLite position = 3; + + /* + * Returns the Signal-to-noise ratio (SNR) of the last received message, + * as measured by the receiver. Return SNR of the last received message in dB + */ + float snr = 4; + + /* + * Set to indicate the last time we received a packet from this node + */ + fixed32 last_heard = 5; + /* + * The latest device metrics for the node. + */ + DeviceMetrics device_metrics = 6; + + /* + * local channel index we heard that node on. Only populated if its not the default channel. + */ + uint32 channel = 7; + + /* + * True if we witnessed the node over MQTT instead of LoRA transport + */ + bool via_mqtt = 8; + + /* + * Number of hops away from us this node is (0 if adjacent) + */ + uint32 hops_away = 9; + + /* + * True if node is in our favorites list + * Persists between NodeDB internal clean ups + */ + 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 @@ -83,95 +194,6 @@ message DeviceState { repeated NodeInfoLite node_db_lite = 14 [(nanopb).callback_datatype = "std::vector"]; } -message NodeInfoLite { - /* - * The node number - */ - uint32 num = 1; - - /* - * The user info for this node - */ - User user = 2; - - /* - * This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true. - * Position.time now indicates the last time we received a POSITION from that node. - */ - PositionLite position = 3; - - /* - * Returns the Signal-to-noise ratio (SNR) of the last received message, - * as measured by the receiver. Return SNR of the last received message in dB - */ - float snr = 4; - - /* - * Set to indicate the last time we received a packet from this node - */ - fixed32 last_heard = 5; - /* - * The latest device metrics for the node. - */ - DeviceMetrics device_metrics = 6; - - /* - * local channel index we heard that node on. Only populated if its not the default channel. - */ - uint32 channel = 7; - - /* - * True if we witnessed the node over MQTT instead of LoRA transport - */ - bool via_mqtt = 8; - - /* - * Number of hops away from us this node is (0 if adjacent) - */ - uint32 hops_away = 9; - - /* - * True if node is in our favorites list - * Persists between NodeDB internal clean ups - */ - bool is_favorite = 10; -} - -/* - * Position with static location information only for NodeDBLite - */ -message PositionLite { - /* - * The new preferred location encoding, multiply by 1e-7 to get degrees - * in floating point - */ - sfixed32 latitude_i = 1; - - /* - * TODO: REPLACE - */ - sfixed32 longitude_i = 2; - - /* - * In meters above MSL (but see issue #359) - */ - int32 altitude = 3; - - /* - * This is usually not sent over the mesh (to save space), but it is sent - * from the phone so that the local device can set its RTC If it is sent over - * the mesh (because there are devices on the mesh without GPS), it will only - * be sent by devices which has a hardware GPS clock. - * seconds since 1970 - */ - fixed32 time = 4; - - /* - * TODO: REPLACE - */ - Position.LocSource location_source = 5; -} - /* * The on-disk saved channels */ @@ -189,26 +211,6 @@ message ChannelFile { uint32 version = 2; } -/* - * TODO: REPLACE - */ -enum ScreenFonts { - /* - * TODO: REPLACE - */ - FONT_SMALL = 0; - - /* - * TODO: REPLACE - */ - FONT_MEDIUM = 1; - - /* - * TODO: REPLACE - */ - FONT_LARGE = 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.