From eb42f6d262400fb32f8c242985af1acf12d9e7a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Sun, 2 Mar 2025 19:32:07 +0100 Subject: [PATCH] Indicator protos (#653) --- meshtastic/interdevice.options | 1 + meshtastic/interdevice.proto | 44 ++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 meshtastic/interdevice.options create mode 100644 meshtastic/interdevice.proto diff --git a/meshtastic/interdevice.options b/meshtastic/interdevice.options new file mode 100644 index 0000000..97df282 --- /dev/null +++ b/meshtastic/interdevice.options @@ -0,0 +1 @@ +*InterdeviceMessage.nmea max_size:1024 diff --git a/meshtastic/interdevice.proto b/meshtastic/interdevice.proto new file mode 100644 index 0000000..5b890b2 --- /dev/null +++ b/meshtastic/interdevice.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "InterdeviceProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +// encapsulate up to 1k of NMEA string data + +enum MessageType { + ACK = 0; + COLLECT_INTERVAL = 160; // in ms + BEEP_ON = 161; // duration ms + BEEP_OFF = 162; // cancel prematurely + SHUTDOWN = 163; + POWER_ON = 164; + SCD41_TEMP = 176; + SCD41_HUMIDITY = 177; + SCD41_CO2 = 178; + AHT20_TEMP = 179; + AHT20_HUMIDITY = 180; + TVOC_INDEX = 181; +} + +message SensorData { + // The message type + MessageType type = 1; + // The sensor data, either as a float or an uint32 + oneof data { + float float_value = 2; + uint32 uint32_value = 3; + } +} + +message InterdeviceMessage { + // The message data + oneof data { + string nmea = 1; + SensorData sensor = 2; + } +} \ No newline at end of file