mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-04 03:18:10 +10:00
Update protobufs (#11406)
Co-authored-by: caveman99 <25002+caveman99@users.noreply.github.com>
This commit is contained in:
co-authored by
caveman99
parent
e8dae921bd
commit
c6a20811b2
+1
-1
Submodule protobufs updated: cd290ba246...84bfb0fdb3
@@ -30,7 +30,7 @@ PB_BIND(meshtastic_SharedContact, meshtastic_SharedContact, AUTO)
|
||||
PB_BIND(meshtastic_KeyVerificationAdmin, meshtastic_KeyVerificationAdmin, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_SensorConfig, meshtastic_SensorConfig, AUTO)
|
||||
PB_BIND(meshtastic_SensorConfig, meshtastic_SensorConfig, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_SCD4X_config, meshtastic_SCD4X_config, AUTO)
|
||||
@@ -39,12 +39,18 @@ PB_BIND(meshtastic_SCD4X_config, meshtastic_SCD4X_config, AUTO)
|
||||
PB_BIND(meshtastic_SEN5X_config, meshtastic_SEN5X_config, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_SEN6X_config, meshtastic_SEN6X_config, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_SCD30_config, meshtastic_SCD30_config, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_SHTXX_config, meshtastic_SHTXX_config, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_DS248X_config, meshtastic_DS248X_config, AUTO)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ typedef struct _meshtastic_LockdownAuth {
|
||||
token at unlock time: the client-supplied boots_remaining when
|
||||
non-zero, otherwise the firmware default (TOKEN_DEFAULT_BOOTS).
|
||||
Note that boots_remaining == 0 in this message means "use firmware
|
||||
default", NOT "zero boots" - a client computing the ceiling for
|
||||
default", NOT "zero boots" — a client computing the ceiling for
|
||||
display should mirror that resolution rather than multiplying the
|
||||
raw request value.
|
||||
|
||||
@@ -196,7 +196,7 @@ typedef struct _meshtastic_LockdownAuth {
|
||||
|
||||
Uses millis() (CPU uptime), not wall-clock time, so the cap is
|
||||
immune to GPS spoofing, RTC backup-battery removal, and Faraday
|
||||
cage isolation - none of those move the uptime counter. The only
|
||||
cage isolation — none of those move the uptime counter. The only
|
||||
way to reset the session clock is a reboot, which costs a boot
|
||||
from the on-flash, HMAC-bound counter. */
|
||||
uint32_t max_session_seconds;
|
||||
@@ -213,7 +213,7 @@ typedef struct _meshtastic_LockdownAuth {
|
||||
|
||||
NOT reversed by this operation: APPROTECT. Once the debug port
|
||||
lockout has been burned (on silicon where it is effective) it is
|
||||
permanent - disabling lockdown decrypts your data and removes the
|
||||
permanent — disabling lockdown decrypts your data and removes the
|
||||
access gates, but the SWD/JTAG port stays locked for the life of
|
||||
the device (recoverable only via a full chip erase over a debug
|
||||
probe, which destroys all data). Clients should make this
|
||||
@@ -303,8 +303,38 @@ typedef struct _meshtastic_SEN5X_config {
|
||||
/* One-shot mode (true for low power - one-shot mode, false for normal - continuous mode) */
|
||||
bool has_set_one_shot_mode;
|
||||
bool set_one_shot_mode;
|
||||
/* Trigger a fan cleaning cycle */
|
||||
bool has_start_fan_cleaning;
|
||||
bool start_fan_cleaning;
|
||||
} meshtastic_SEN5X_config;
|
||||
|
||||
typedef struct _meshtastic_SEN6X_config {
|
||||
/* Reference temperature in degC */
|
||||
bool has_set_temperature;
|
||||
float set_temperature;
|
||||
/* One-shot mode (true for low power - one-shot mode, false for normal - continuous mode) */
|
||||
bool has_set_one_shot_mode;
|
||||
bool set_one_shot_mode;
|
||||
/* Trigger a fan cleaning cycle */
|
||||
bool has_start_fan_cleaning;
|
||||
bool start_fan_cleaning;
|
||||
/* Set Automatic self-calibration enabled (CO2-capable variants only: SEN63C, SEN66, SEN69C) */
|
||||
bool has_set_asc;
|
||||
bool set_asc;
|
||||
/* Recalibration target CO2 concentration in ppm (FRC only), CO2-capable variants only */
|
||||
bool has_set_target_co2_conc;
|
||||
uint32_t set_target_co2_conc;
|
||||
/* Altitude of sensor in meters above sea level. 0 - 3000m (overrides ambient pressure), CO2-capable variants only */
|
||||
bool has_set_altitude;
|
||||
uint32_t set_altitude;
|
||||
/* Sensor ambient pressure in Pa. 70000 - 120000 Pa (overrides altitude), CO2-capable variants only */
|
||||
bool has_set_ambient_pressure;
|
||||
uint32_t set_ambient_pressure;
|
||||
/* Perform a factory reset of the CO2 sensor's calibration, CO2-capable variants only */
|
||||
bool has_factory_reset;
|
||||
bool factory_reset;
|
||||
} meshtastic_SEN6X_config;
|
||||
|
||||
typedef struct _meshtastic_SCD30_config {
|
||||
/* Set Automatic self-calibration enabled */
|
||||
bool has_set_asc;
|
||||
@@ -332,6 +362,12 @@ typedef struct _meshtastic_SHTXX_config {
|
||||
uint32_t set_accuracy;
|
||||
} meshtastic_SHTXX_config;
|
||||
|
||||
typedef struct _meshtastic_DS248X_config {
|
||||
/* Main channel for temperature reporting (0-7) */
|
||||
bool has_main_temperature_channel;
|
||||
uint32_t main_temperature_channel;
|
||||
} meshtastic_DS248X_config;
|
||||
|
||||
typedef struct _meshtastic_SensorConfig {
|
||||
/* SCD4X CO2 Sensor configuration */
|
||||
bool has_scd4x_config;
|
||||
@@ -345,6 +381,12 @@ typedef struct _meshtastic_SensorConfig {
|
||||
/* SHTXX temperature and relative humidity sensor configuration */
|
||||
bool has_shtxx_config;
|
||||
meshtastic_SHTXX_config shtxx_config;
|
||||
/* DS248X-800 temperature sensor configuration */
|
||||
bool has_ds248x_config;
|
||||
meshtastic_DS248X_config ds248x_config;
|
||||
/* SEN6X PM/RHT/VOC/NOx/CO2/HCHO Sensor configuration */
|
||||
bool has_sen6x_config;
|
||||
meshtastic_SEN6X_config sen6x_config;
|
||||
} meshtastic_SensorConfig;
|
||||
|
||||
typedef PB_BYTES_ARRAY_T(8) meshtastic_AdminMessage_session_passkey_t;
|
||||
@@ -544,6 +586,8 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_AdminMessage_init_default {0, {0}, {0, {0}}}
|
||||
#define meshtastic_AdminMessage_InputEvent_init_default {0, 0, 0, 0}
|
||||
@@ -553,11 +597,13 @@ extern "C" {
|
||||
#define meshtastic_NodeRemoteHardwarePinsResponse_init_default {0, {meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default}}
|
||||
#define meshtastic_SharedContact_init_default {0, false, meshtastic_User_init_default, 0, 0}
|
||||
#define meshtastic_KeyVerificationAdmin_init_default {_meshtastic_KeyVerificationAdmin_MessageType_MIN, 0, 0, false, 0}
|
||||
#define meshtastic_SensorConfig_init_default {false, meshtastic_SCD4X_config_init_default, false, meshtastic_SEN5X_config_init_default, false, meshtastic_SCD30_config_init_default, false, meshtastic_SHTXX_config_init_default}
|
||||
#define meshtastic_SensorConfig_init_default {false, meshtastic_SCD4X_config_init_default, false, meshtastic_SEN5X_config_init_default, false, meshtastic_SCD30_config_init_default, false, meshtastic_SHTXX_config_init_default, false, meshtastic_DS248X_config_init_default, false, meshtastic_SEN6X_config_init_default}
|
||||
#define meshtastic_SCD4X_config_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_SEN5X_config_init_default {false, 0, false, 0}
|
||||
#define meshtastic_SEN5X_config_init_default {false, 0, false, 0, false, 0}
|
||||
#define meshtastic_SEN6X_config_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_SCD30_config_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_SHTXX_config_init_default {false, 0}
|
||||
#define meshtastic_DS248X_config_init_default {false, 0}
|
||||
#define meshtastic_AdminMessage_init_zero {0, {0}, {0, {0}}}
|
||||
#define meshtastic_AdminMessage_InputEvent_init_zero {0, 0, 0, 0}
|
||||
#define meshtastic_AdminMessage_OTAEvent_init_zero {_meshtastic_OTAMode_MIN, {0, {0}}}
|
||||
@@ -566,11 +612,13 @@ extern "C" {
|
||||
#define meshtastic_NodeRemoteHardwarePinsResponse_init_zero {0, {meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero}}
|
||||
#define meshtastic_SharedContact_init_zero {0, false, meshtastic_User_init_zero, 0, 0}
|
||||
#define meshtastic_KeyVerificationAdmin_init_zero {_meshtastic_KeyVerificationAdmin_MessageType_MIN, 0, 0, false, 0}
|
||||
#define meshtastic_SensorConfig_init_zero {false, meshtastic_SCD4X_config_init_zero, false, meshtastic_SEN5X_config_init_zero, false, meshtastic_SCD30_config_init_zero, false, meshtastic_SHTXX_config_init_zero}
|
||||
#define meshtastic_SensorConfig_init_zero {false, meshtastic_SCD4X_config_init_zero, false, meshtastic_SEN5X_config_init_zero, false, meshtastic_SCD30_config_init_zero, false, meshtastic_SHTXX_config_init_zero, false, meshtastic_DS248X_config_init_zero, false, meshtastic_SEN6X_config_init_zero}
|
||||
#define meshtastic_SCD4X_config_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_SEN5X_config_init_zero {false, 0, false, 0}
|
||||
#define meshtastic_SEN5X_config_init_zero {false, 0, false, 0, false, 0}
|
||||
#define meshtastic_SEN6X_config_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_SCD30_config_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_SHTXX_config_init_zero {false, 0}
|
||||
#define meshtastic_DS248X_config_init_zero {false, 0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_AdminMessage_InputEvent_event_code_tag 1
|
||||
@@ -608,6 +656,15 @@ extern "C" {
|
||||
#define meshtastic_SCD4X_config_set_power_mode_tag 7
|
||||
#define meshtastic_SEN5X_config_set_temperature_tag 1
|
||||
#define meshtastic_SEN5X_config_set_one_shot_mode_tag 2
|
||||
#define meshtastic_SEN5X_config_start_fan_cleaning_tag 3
|
||||
#define meshtastic_SEN6X_config_set_temperature_tag 1
|
||||
#define meshtastic_SEN6X_config_set_one_shot_mode_tag 2
|
||||
#define meshtastic_SEN6X_config_start_fan_cleaning_tag 3
|
||||
#define meshtastic_SEN6X_config_set_asc_tag 4
|
||||
#define meshtastic_SEN6X_config_set_target_co2_conc_tag 5
|
||||
#define meshtastic_SEN6X_config_set_altitude_tag 6
|
||||
#define meshtastic_SEN6X_config_set_ambient_pressure_tag 7
|
||||
#define meshtastic_SEN6X_config_factory_reset_tag 8
|
||||
#define meshtastic_SCD30_config_set_asc_tag 1
|
||||
#define meshtastic_SCD30_config_set_target_co2_conc_tag 2
|
||||
#define meshtastic_SCD30_config_set_temperature_tag 3
|
||||
@@ -615,10 +672,13 @@ extern "C" {
|
||||
#define meshtastic_SCD30_config_set_measurement_interval_tag 5
|
||||
#define meshtastic_SCD30_config_soft_reset_tag 6
|
||||
#define meshtastic_SHTXX_config_set_accuracy_tag 1
|
||||
#define meshtastic_DS248X_config_main_temperature_channel_tag 1
|
||||
#define meshtastic_SensorConfig_scd4x_config_tag 1
|
||||
#define meshtastic_SensorConfig_sen5x_config_tag 2
|
||||
#define meshtastic_SensorConfig_scd30_config_tag 3
|
||||
#define meshtastic_SensorConfig_shtxx_config_tag 4
|
||||
#define meshtastic_SensorConfig_ds248x_config_tag 5
|
||||
#define meshtastic_SensorConfig_sen6x_config_tag 6
|
||||
#define meshtastic_AdminMessage_get_channel_request_tag 1
|
||||
#define meshtastic_AdminMessage_get_channel_response_tag 2
|
||||
#define meshtastic_AdminMessage_get_owner_request_tag 3
|
||||
@@ -824,13 +884,17 @@ X(a, STATIC, OPTIONAL, UINT32, security_number, 4)
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, scd4x_config, 1) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, sen5x_config, 2) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, scd30_config, 3) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, shtxx_config, 4)
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, shtxx_config, 4) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, ds248x_config, 5) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, sen6x_config, 6)
|
||||
#define meshtastic_SensorConfig_CALLBACK NULL
|
||||
#define meshtastic_SensorConfig_DEFAULT NULL
|
||||
#define meshtastic_SensorConfig_scd4x_config_MSGTYPE meshtastic_SCD4X_config
|
||||
#define meshtastic_SensorConfig_sen5x_config_MSGTYPE meshtastic_SEN5X_config
|
||||
#define meshtastic_SensorConfig_scd30_config_MSGTYPE meshtastic_SCD30_config
|
||||
#define meshtastic_SensorConfig_shtxx_config_MSGTYPE meshtastic_SHTXX_config
|
||||
#define meshtastic_SensorConfig_ds248x_config_MSGTYPE meshtastic_DS248X_config
|
||||
#define meshtastic_SensorConfig_sen6x_config_MSGTYPE meshtastic_SEN6X_config
|
||||
|
||||
#define meshtastic_SCD4X_config_FIELDLIST(X, a) \
|
||||
X(a, STATIC, OPTIONAL, BOOL, set_asc, 1) \
|
||||
@@ -845,10 +909,23 @@ X(a, STATIC, OPTIONAL, BOOL, set_power_mode, 7)
|
||||
|
||||
#define meshtastic_SEN5X_config_FIELDLIST(X, a) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, set_temperature, 1) \
|
||||
X(a, STATIC, OPTIONAL, BOOL, set_one_shot_mode, 2)
|
||||
X(a, STATIC, OPTIONAL, BOOL, set_one_shot_mode, 2) \
|
||||
X(a, STATIC, OPTIONAL, BOOL, start_fan_cleaning, 3)
|
||||
#define meshtastic_SEN5X_config_CALLBACK NULL
|
||||
#define meshtastic_SEN5X_config_DEFAULT NULL
|
||||
|
||||
#define meshtastic_SEN6X_config_FIELDLIST(X, a) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, set_temperature, 1) \
|
||||
X(a, STATIC, OPTIONAL, BOOL, set_one_shot_mode, 2) \
|
||||
X(a, STATIC, OPTIONAL, BOOL, start_fan_cleaning, 3) \
|
||||
X(a, STATIC, OPTIONAL, BOOL, set_asc, 4) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, set_target_co2_conc, 5) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, set_altitude, 6) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, set_ambient_pressure, 7) \
|
||||
X(a, STATIC, OPTIONAL, BOOL, factory_reset, 8)
|
||||
#define meshtastic_SEN6X_config_CALLBACK NULL
|
||||
#define meshtastic_SEN6X_config_DEFAULT NULL
|
||||
|
||||
#define meshtastic_SCD30_config_FIELDLIST(X, a) \
|
||||
X(a, STATIC, OPTIONAL, BOOL, set_asc, 1) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, set_target_co2_conc, 2) \
|
||||
@@ -864,6 +941,11 @@ X(a, STATIC, OPTIONAL, UINT32, set_accuracy, 1)
|
||||
#define meshtastic_SHTXX_config_CALLBACK NULL
|
||||
#define meshtastic_SHTXX_config_DEFAULT NULL
|
||||
|
||||
#define meshtastic_DS248X_config_FIELDLIST(X, a) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, main_temperature_channel, 1)
|
||||
#define meshtastic_DS248X_config_CALLBACK NULL
|
||||
#define meshtastic_DS248X_config_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_AdminMessage_msg;
|
||||
extern const pb_msgdesc_t meshtastic_AdminMessage_InputEvent_msg;
|
||||
extern const pb_msgdesc_t meshtastic_AdminMessage_OTAEvent_msg;
|
||||
@@ -875,8 +957,10 @@ extern const pb_msgdesc_t meshtastic_KeyVerificationAdmin_msg;
|
||||
extern const pb_msgdesc_t meshtastic_SensorConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_SCD4X_config_msg;
|
||||
extern const pb_msgdesc_t meshtastic_SEN5X_config_msg;
|
||||
extern const pb_msgdesc_t meshtastic_SEN6X_config_msg;
|
||||
extern const pb_msgdesc_t meshtastic_SCD30_config_msg;
|
||||
extern const pb_msgdesc_t meshtastic_SHTXX_config_msg;
|
||||
extern const pb_msgdesc_t meshtastic_DS248X_config_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_AdminMessage_fields &meshtastic_AdminMessage_msg
|
||||
@@ -890,23 +974,27 @@ extern const pb_msgdesc_t meshtastic_SHTXX_config_msg;
|
||||
#define meshtastic_SensorConfig_fields &meshtastic_SensorConfig_msg
|
||||
#define meshtastic_SCD4X_config_fields &meshtastic_SCD4X_config_msg
|
||||
#define meshtastic_SEN5X_config_fields &meshtastic_SEN5X_config_msg
|
||||
#define meshtastic_SEN6X_config_fields &meshtastic_SEN6X_config_msg
|
||||
#define meshtastic_SCD30_config_fields &meshtastic_SCD30_config_msg
|
||||
#define meshtastic_SHTXX_config_fields &meshtastic_SHTXX_config_msg
|
||||
#define meshtastic_DS248X_config_fields &meshtastic_DS248X_config_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_ADMIN_PB_H_MAX_SIZE meshtastic_AdminMessage_size
|
||||
#define meshtastic_AdminMessage_InputEvent_size 14
|
||||
#define meshtastic_AdminMessage_OTAEvent_size 36
|
||||
#define meshtastic_AdminMessage_size 511
|
||||
#define meshtastic_DS248X_config_size 6
|
||||
#define meshtastic_HamParameters_size 47
|
||||
#define meshtastic_KeyVerificationAdmin_size 25
|
||||
#define meshtastic_LockdownAuth_size 56
|
||||
#define meshtastic_NodeRemoteHardwarePinsResponse_size 496
|
||||
#define meshtastic_SCD30_config_size 27
|
||||
#define meshtastic_SCD4X_config_size 29
|
||||
#define meshtastic_SEN5X_config_size 7
|
||||
#define meshtastic_SEN5X_config_size 9
|
||||
#define meshtastic_SEN6X_config_size 31
|
||||
#define meshtastic_SHTXX_config_size 6
|
||||
#define meshtastic_SensorConfig_size 77
|
||||
#define meshtastic_SensorConfig_size 120
|
||||
#define meshtastic_SharedContact_size 127
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -332,7 +332,7 @@ typedef enum _meshtastic_CotType {
|
||||
/* y-: TAKTALK room/membership broadcast. Payload carried via the
|
||||
TakTalkRoomData typed variant (sender_callsign, room_id, room_name,
|
||||
participants). The CoT type literally has a trailing dash and no
|
||||
second atom - not a typo. */
|
||||
second atom — not a typo. */
|
||||
meshtastic_CotType_CotType_y = 126
|
||||
} meshtastic_CotType;
|
||||
|
||||
@@ -380,7 +380,7 @@ typedef enum _meshtastic_DrawnShape_Kind {
|
||||
/* u-r-b-bullseye: Bullseye ring with range rings and bearing reference */
|
||||
meshtastic_DrawnShape_Kind_Kind_Bullseye = 7,
|
||||
/* u-d-c-e: Ellipse with distinct major/minor axes (same storage as
|
||||
Kind_Circle - uses major_cm/minor_cm/angle_deg - but receivers
|
||||
Kind_Circle — uses major_cm/minor_cm/angle_deg — but receivers
|
||||
render it as a non-circular ellipse rather than a round circle). */
|
||||
meshtastic_DrawnShape_Kind_Kind_Ellipse = 8,
|
||||
/* u-d-v: 2D vehicle outline drawn on the map. Vertices carry the
|
||||
@@ -400,7 +400,7 @@ typedef enum _meshtastic_DrawnShape_Kind {
|
||||
end of parse; builder uses it to decide which of <strokeColor> /
|
||||
<fillColor> to emit in the reconstructed XML. */
|
||||
typedef enum _meshtastic_DrawnShape_StyleMode {
|
||||
/* Unspecified - receiver infers from which color fields are non-zero. */
|
||||
/* Unspecified — receiver infers from which color fields are non-zero. */
|
||||
meshtastic_DrawnShape_StyleMode_StyleMode_Unspecified = 0,
|
||||
/* Stroke only. No <fillColor> in the source XML. Used for polylines,
|
||||
ranging lines, bullseye rings. */
|
||||
@@ -417,7 +417,7 @@ typedef enum _meshtastic_DrawnShape_StyleMode {
|
||||
alone is ambiguous (e.g. a-u-G could be a 2525 symbol or a custom icon
|
||||
depending on the iconset path). */
|
||||
typedef enum _meshtastic_Marker_Kind {
|
||||
/* Unspecified - fall back to TAKPacketV2.cot_type_id */
|
||||
/* Unspecified — fall back to TAKPacketV2.cot_type_id */
|
||||
meshtastic_Marker_Kind_Kind_Unspecified = 0,
|
||||
/* b-m-p-s-m: Spot map marker */
|
||||
meshtastic_Marker_Kind_Kind_Spot = 1,
|
||||
@@ -680,10 +680,10 @@ typedef struct _meshtastic_AircraftTrack {
|
||||
hundred meters of the anchor has per-vertex deltas in the ±10^4 range.
|
||||
Under sint32+zigzag those encode as 2 bytes each (tag+varint), versus the
|
||||
4 bytes that sfixed32 would always require. At 32 vertices that is ~128
|
||||
bytes of savings - the difference between fitting under the LoRa MTU or
|
||||
bytes of savings — the difference between fitting under the LoRa MTU or
|
||||
not. Absolute coordinates (values ~10^9) would cost sint32 varint 5 bytes
|
||||
per field, which is why TAKPacketV2's top-level latitude_i / longitude_i
|
||||
stay sfixed32 - only small values win with sint32. */
|
||||
stay sfixed32 — only small values win with sint32. */
|
||||
typedef struct _meshtastic_CotGeoPoint {
|
||||
/* Latitude delta from TAKPacketV2.latitude_i, in 1e-7 degree units.
|
||||
Add to the enclosing event's latitude_i to recover the absolute latitude. */
|
||||
@@ -791,7 +791,7 @@ typedef struct _meshtastic_Marker {
|
||||
|
||||
Covers CoT type u-rb-a. The anchor position is on
|
||||
TAKPacketV2.latitude_i/longitude_i; the target endpoint is carried as a
|
||||
CotGeoPoint - same delta-from-anchor encoding used by DrawnShape.vertices
|
||||
CotGeoPoint — same delta-from-anchor encoding used by DrawnShape.vertices
|
||||
so a self-anchored RAB (common case) encodes in zero bytes. */
|
||||
typedef struct _meshtastic_RangeAndBearing {
|
||||
/* Target/anchor endpoint (delta-encoded from TAKPacketV2.latitude_i/longitude_i). */
|
||||
@@ -899,12 +899,12 @@ typedef struct _meshtastic_CasevacReport {
|
||||
same as the envelope callsign but ATAK sometimes carries a distinct
|
||||
ops-number here. */
|
||||
pb_callback_t title;
|
||||
/* Primary medline free-text - the single most clinically important line
|
||||
/* Primary medline free-text — the single most clinically important line
|
||||
on a MEDLINE form (e.g. "2 urgent litter patients, smoke on approach").
|
||||
MUST be preserved under MTU pressure as long as any casevac is sent. */
|
||||
pb_callback_t medline_remarks;
|
||||
/* Line 3 (newer ATAK format): patient counts by precedence level.
|
||||
Coexists with the enum-style `precedence` field (tag 1) - older ATAK
|
||||
Coexists with the enum-style `precedence` field (tag 1) — older ATAK
|
||||
emits a single enum, newer ATAK emits these counts, and both can be
|
||||
set simultaneously. Senders populate whichever style(s) the source
|
||||
XML had; receivers prefer counts when non-zero. */
|
||||
@@ -946,19 +946,19 @@ typedef struct _meshtastic_CasevacReport {
|
||||
(e.g. "Primary HLZ is soccer field"). */
|
||||
pb_callback_t hlz_remarks;
|
||||
/* Per-patient clinical records. Each entry is one patient's ZMIST card
|
||||
(Zap number / Mechanism / Injuries / Signs / Treatment). Repeatable -
|
||||
(Zap number / Mechanism / Injuries / Signs / Treatment). Repeatable —
|
||||
a mass-casualty event can carry 1-6 entries in practice, limited by
|
||||
the 237 B LoRa MTU. */
|
||||
pb_callback_t zmist;
|
||||
} meshtastic_CasevacReport;
|
||||
|
||||
/* Per-patient clinical summary record - one entry per patient in a CASEVAC.
|
||||
/* Per-patient clinical summary record — one entry per patient in a CASEVAC.
|
||||
Maps directly to ATAK's <zMist> child element inside <zMistsMap>.
|
||||
All fields are optional free-text; senders populate what they have. */
|
||||
typedef struct _meshtastic_ZMistEntry {
|
||||
/* Patient identifier / sequence label (e.g. "ZMIST-1", "ZMIST-2"). */
|
||||
pb_callback_t title;
|
||||
/* Zap number - unique patient tracking ID (often a terse code like
|
||||
/* Zap number — unique patient tracking ID (often a terse code like
|
||||
"Gunshot" or a serial). */
|
||||
pb_callback_t z;
|
||||
/* Mechanism of injury (e.g. "Penetrating trauma", "Blast injury"). */
|
||||
@@ -997,7 +997,7 @@ typedef struct _meshtastic_EmergencyAlert {
|
||||
creation time; the fields below carry structured metadata the raw-detail
|
||||
fallback currently loses.
|
||||
|
||||
Fields are deliberately lean - this variant is closer to the MTU ceiling
|
||||
Fields are deliberately lean — this variant is closer to the MTU ceiling
|
||||
than the others, so every string is capped in options. */
|
||||
typedef struct _meshtastic_TaskRequest {
|
||||
/* Short tag for the task category (e.g. "engage", "observe", "recon",
|
||||
@@ -1017,7 +1017,7 @@ typedef struct _meshtastic_TaskRequest {
|
||||
|
||||
/* Weather annotation from <environment> CoT detail element.
|
||||
|
||||
Attaches to any TAKPacketV2 regardless of payload_variant - an Aircraft,
|
||||
Attaches to any TAKPacketV2 regardless of payload_variant — an Aircraft,
|
||||
PLI, or Marker can all carry observed conditions at the emitting station.
|
||||
ATAK-CIV ships an XSD for <environment> but no dedicated handler, so the
|
||||
element round-trips through the generic detail pipeline; this message
|
||||
@@ -1026,7 +1026,7 @@ typedef struct _meshtastic_TaskRequest {
|
||||
Target wire cost: ~6-8 bytes compressed with a fully populated instance.
|
||||
|
||||
Named `TAKEnvironment` (not just `Environment`) because the bare name
|
||||
collides with `SwiftUI.Environment` - every SwiftUI view in a consuming
|
||||
collides with `SwiftUI.Environment` — every SwiftUI view in a consuming
|
||||
iOS app uses the `@Environment` property wrapper, and importing the
|
||||
generated proto module would make `Environment` ambiguous in every one
|
||||
of those files. The `TAK` prefix matches the convention used by the
|
||||
@@ -1055,7 +1055,7 @@ typedef struct _meshtastic_TAKEnvironment {
|
||||
The receiving ATAK client restores those from its own defaults, same as
|
||||
every other CoT carried over Meshtastic today.
|
||||
|
||||
Attaches to any TAKPacketV2 - a PLI with a sensor on the operator's head,
|
||||
Attaches to any TAKPacketV2 — a PLI with a sensor on the operator's head,
|
||||
an Aircraft with a FLIR turret, a Marker dropped on a UAV.
|
||||
Target wire cost: ~7-14 bytes compressed (dominated by model string). */
|
||||
typedef struct _meshtastic_SensorFov {
|
||||
@@ -1065,30 +1065,30 @@ typedef struct _meshtastic_SensorFov {
|
||||
SensorDetailHandler default (270°) and save varint bytes over centi-deg. */
|
||||
uint32_t azimuth_deg;
|
||||
/* Maximum range of the cone in meters.
|
||||
Optional - if unset, receivers should use the ATAK-CIV default of 100m. */
|
||||
Optional — if unset, receivers should use the ATAK-CIV default of 100m. */
|
||||
bool has_range_m;
|
||||
uint32_t range_m;
|
||||
/* Horizontal field of view in whole degrees (cone's angular width).
|
||||
ATAK-CIV default is 45°. */
|
||||
uint32_t fov_horizontal_deg;
|
||||
/* Vertical field of view in whole degrees. ATAK-CIV default is 45°.
|
||||
Optional - a value of 0 means "not set / use horizontal FOV". */
|
||||
Optional — a value of 0 means "not set / use horizontal FOV". */
|
||||
uint32_t fov_vertical_deg;
|
||||
/* Elevation angle in whole degrees. Positive = up, negative = down.
|
||||
Range -90 to +90. sint32 for varint efficiency on small negatives. */
|
||||
int32_t elevation_deg;
|
||||
/* Roll (camera tilt) in whole degrees, -180 to +180.
|
||||
Optional - use 0 if the sensor doesn't track roll. */
|
||||
Optional — use 0 if the sensor doesn't track roll. */
|
||||
int32_t roll_deg;
|
||||
/* Free-form device model identifier, e.g. "FLIR-Boson-640", "SEEK".
|
||||
Optional - empty string means "unknown model" (ATAK-CIV default). */
|
||||
Optional — empty string means "unknown model" (ATAK-CIV default). */
|
||||
pb_callback_t model;
|
||||
} meshtastic_SensorFov;
|
||||
|
||||
/* TAKTALK chat message payload (CoT type m-t-t).
|
||||
|
||||
TAKTALK is an ATAK plugin for voice + text team messaging. The voice
|
||||
audio stream goes over UDP/RTP and is NOT carried by the mesh - only
|
||||
audio stream goes over UDP/RTP and is NOT carried by the mesh — only
|
||||
the text envelope (this message) is. `from_voice` marks messages sent
|
||||
via push-to-talk speech-to-text so receivers can render a mic icon
|
||||
next to the text.
|
||||
@@ -1122,7 +1122,7 @@ typedef struct _meshtastic_TakTalkMessage {
|
||||
Announces a TAKTALK chatroom's friendly name and roster so peers can
|
||||
resolve room UUIDs (used in TakTalkMessage.chatroom_id and
|
||||
GeoChat.room_id) to a display name and participant list. Not a chat
|
||||
message itself - these events are emitted by TAKTALK when rooms are
|
||||
message itself — these events are emitted by TAKTALK when rooms are
|
||||
created or memberships change. */
|
||||
typedef struct _meshtastic_TakTalkRoomData {
|
||||
/* Callsign of the device broadcasting the room state (typically the
|
||||
@@ -1161,7 +1161,7 @@ typedef struct _meshtastic_Marti {
|
||||
primary-vs-cc distinction the same way ATAK does.
|
||||
|
||||
If dest_callsign is [TAKPacketV2.callsign] (self-addressed, unusual but
|
||||
legal - e.g. ATAK echoing back to its own room), the builder still emits
|
||||
legal — e.g. ATAK echoing back to its own room), the builder still emits
|
||||
the element so loopback shapes round-trip cleanly. */
|
||||
pb_callback_t dest_callsign;
|
||||
} meshtastic_Marti;
|
||||
|
||||
@@ -24,7 +24,7 @@ PB_BIND(meshtastic_NodePositionEntry, meshtastic_NodePositionEntry, AUTO)
|
||||
PB_BIND(meshtastic_NodeTelemetryEntry, meshtastic_NodeTelemetryEntry, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_NodeEnvironmentEntry, meshtastic_NodeEnvironmentEntry, AUTO)
|
||||
PB_BIND(meshtastic_NodeEnvironmentEntry, meshtastic_NodeEnvironmentEntry, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_NodeStatusEntry, meshtastic_NodeStatusEntry, AUTO)
|
||||
|
||||
@@ -458,7 +458,7 @@ extern const pb_msgdesc_t meshtastic_BackupPreferences_msg;
|
||||
#define meshtastic_BackupPreferences_size 2740
|
||||
#define meshtastic_ChannelFile_size 718
|
||||
#define meshtastic_DeviceState_size 1944
|
||||
#define meshtastic_NodeEnvironmentEntry_size 170
|
||||
#define meshtastic_NodeEnvironmentEntry_size 218
|
||||
#define meshtastic_NodeInfoLite_size 112
|
||||
#define meshtastic_NodePositionEntry_size 42
|
||||
#define meshtastic_NodeStatusEntry_size 89
|
||||
|
||||
@@ -1112,10 +1112,8 @@ typedef struct _meshtastic_MeshPacket {
|
||||
meshtastic_MeshPacket_Priority priority;
|
||||
/* rssi of received packet. Only sent to phone for dispay purposes.
|
||||
Explicit presence: rssi 0 is a legitimate reading on some radios (SX126x can report exactly
|
||||
0 dBm; SX127x's formula can even go positive), so implicit-presence proto3 made an unset
|
||||
value indistinguishable from a measured one. has_rx_rssi disambiguates; a replayed packet
|
||||
built from history the device never restored an RSSI for should leave this field absent
|
||||
rather than emitting 0. */
|
||||
0 dBm; SX127x's formula can even go positive). has_rx_rssi disambiguates; a replayed packet
|
||||
built from history should leave this field absent rather than emitting 0. */
|
||||
bool has_rx_rssi;
|
||||
int32_t rx_rssi;
|
||||
/* Describe if this message is delayed */
|
||||
@@ -1269,15 +1267,15 @@ typedef struct _meshtastic_LockdownStatus {
|
||||
/* Current lockdown state being reported. */
|
||||
meshtastic_LockdownStatus_State state;
|
||||
/* For LOCKED: machine-readable reason. Known values:
|
||||
"needs_auth" - storage already unlocked, client must auth
|
||||
"token_missing" - no boot token on flash
|
||||
"token_expired" - boot token wall-clock TTL elapsed
|
||||
"token_boots_zero" - boot token boot-count TTL exhausted
|
||||
"token_hmac_fail" - token tampered or wrong device
|
||||
"token_dek_fail" - token DEK decrypt failed
|
||||
"token_wrong_size" - token file corrupted
|
||||
"token_bad_magic" - token file corrupted
|
||||
"not_provisioned" - should generally use NEEDS_PROVISION state instead
|
||||
"needs_auth" — storage already unlocked, client must auth
|
||||
"token_missing" — no boot token on flash
|
||||
"token_expired" — boot token wall-clock TTL elapsed
|
||||
"token_boots_zero" — boot token boot-count TTL exhausted
|
||||
"token_hmac_fail" — token tampered or wrong device
|
||||
"token_dek_fail" — token DEK decrypt failed
|
||||
"token_wrong_size" — token file corrupted
|
||||
"token_bad_magic" — token file corrupted
|
||||
"not_provisioned" — should generally use NEEDS_PROVISION state instead
|
||||
Other values may be added; clients should treat unknown values as
|
||||
"locked, ask for passphrase". */
|
||||
char lock_reason[32];
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/* Payload for MESH_BEACON_APP packets.
|
||||
Periodically broadcast by nodes in beacon mode.
|
||||
Listeners deliver the text message to the local inbox and cache any offered
|
||||
channel/preset for the client app to act on - the firmware never auto-applies them. */
|
||||
channel/preset for the client app to act on — the firmware never auto-applies them. */
|
||||
typedef struct _meshtastic_MeshBeacon {
|
||||
/* Human-readable beacon message. Max 100 bytes enforced by firmware on send. */
|
||||
char message[101];
|
||||
|
||||
@@ -497,7 +497,7 @@ typedef struct _meshtastic_ModuleConfig_MeshBeaconConfig {
|
||||
/* Single-target TX channel: channel settings (name + PSK) to send beacons on.
|
||||
If unset, beacons go out on the primary channel. Used only when broadcast_targets is empty.
|
||||
NOTE: the single-target path embeds the ChannelSettings inline here, whereas a
|
||||
broadcast_targets entry references a channel-table slot by channel_index instead - see
|
||||
broadcast_targets entry references a channel-table slot by channel_index instead — see
|
||||
BroadcastTarget. The two paths are equal, first-class options; only this representation differs. */
|
||||
bool has_broadcast_on_channel;
|
||||
meshtastic_ChannelSettings broadcast_on_channel;
|
||||
@@ -514,7 +514,7 @@ typedef struct _meshtastic_ModuleConfig_MeshBeaconConfig {
|
||||
each temporarily switching the radio to that entry's preset/region/channel.
|
||||
When empty, the broadcaster uses the scalar broadcast_on_preset / broadcast_on_region /
|
||||
broadcast_on_channel fields instead (the single-target path).
|
||||
Single- and multi-target are equal, first-class options - neither is preferred or
|
||||
Single- and multi-target are equal, first-class options — neither is preferred or
|
||||
deprecated. They differ only in how the TX channel is named: broadcast_on_channel embeds a
|
||||
ChannelSettings inline, while a target references an existing channel-table slot by
|
||||
channel_index (see BroadcastTarget). */
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
PB_BIND(meshtastic_DeviceMetrics, meshtastic_DeviceMetrics, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_EnvironmentMetrics, meshtastic_EnvironmentMetrics, AUTO)
|
||||
PB_BIND(meshtastic_EnvironmentMetrics, meshtastic_EnvironmentMetrics, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_PowerMetrics, meshtastic_PowerMetrics, AUTO)
|
||||
@@ -39,6 +39,9 @@ PB_BIND(meshtastic_Nau7802Config, meshtastic_Nau7802Config, AUTO)
|
||||
PB_BIND(meshtastic_SEN5XState, meshtastic_SEN5XState, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_SEN6XState, meshtastic_SEN6XState, AUTO)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -123,7 +123,9 @@ typedef enum _meshtastic_TelemetrySensorType {
|
||||
/* SPA06 pressure and temperature */
|
||||
meshtastic_TelemetrySensorType_SPA06 = 54,
|
||||
/* HM330X PM SENSOR */
|
||||
meshtastic_TelemetrySensorType_HM330X = 55
|
||||
meshtastic_TelemetrySensorType_HM330X = 55,
|
||||
/* Sensirion SEN6X PM/RHT/VOC/NOx/CO2/HCHO sensor family (SEN62, SEN63C, SEN65, SEN66, SEN68, SEN69C) */
|
||||
meshtastic_TelemetrySensorType_SEN6X = 56
|
||||
} meshtastic_TelemetrySensorType;
|
||||
|
||||
/* Struct definitions */
|
||||
@@ -216,9 +218,54 @@ typedef struct _meshtastic_EnvironmentMetrics {
|
||||
/* Soil temperature measured (*C) */
|
||||
bool has_soil_temperature;
|
||||
float soil_temperature;
|
||||
/* One-wire temperature (*C) */
|
||||
pb_size_t one_wire_temperature_count;
|
||||
float one_wire_temperature[8];
|
||||
/* Multi-channel ADC Voltage Channel 0 (V) */
|
||||
bool has_adc_voltage_ch0;
|
||||
float adc_voltage_ch0;
|
||||
/* Multi-channel ADC Voltage Channel 1 (V) */
|
||||
bool has_adc_voltage_ch1;
|
||||
float adc_voltage_ch1;
|
||||
/* Multi-channel ADC Voltage Channel 2 (V) */
|
||||
bool has_adc_voltage_ch2;
|
||||
float adc_voltage_ch2;
|
||||
/* Multi-channel ADC Voltage Channel 3 (V) */
|
||||
bool has_adc_voltage_ch3;
|
||||
float adc_voltage_ch3;
|
||||
/* Multi-channel ADC Voltage Channel 4 (V) */
|
||||
bool has_adc_voltage_ch4;
|
||||
float adc_voltage_ch4;
|
||||
/* Multi-channel ADC Voltage Channel 5 (V) */
|
||||
bool has_adc_voltage_ch5;
|
||||
float adc_voltage_ch5;
|
||||
/* Multi-channel ADC Voltage Channel 6 (V) */
|
||||
bool has_adc_voltage_ch6;
|
||||
float adc_voltage_ch6;
|
||||
/* Multi-channel ADC Voltage Channel 7 (V) */
|
||||
bool has_adc_voltage_ch7;
|
||||
float adc_voltage_ch7;
|
||||
/* Multi-channel One-Wire Temperature Channel 0 (*C) */
|
||||
bool has_one_wire_temperature_ch0;
|
||||
float one_wire_temperature_ch0;
|
||||
/* Multi-channel One-Wire Temperature Channel 1 (*C) */
|
||||
bool has_one_wire_temperature_ch1;
|
||||
float one_wire_temperature_ch1;
|
||||
/* Multi-channel One-Wire Temperature Channel 2 (*C) */
|
||||
bool has_one_wire_temperature_ch2;
|
||||
float one_wire_temperature_ch2;
|
||||
/* Multi-channel One-Wire Temperature Channel 3 (*C) */
|
||||
bool has_one_wire_temperature_ch3;
|
||||
float one_wire_temperature_ch3;
|
||||
/* Multi-channel One-Wire Temperature Channel 4 (*C) */
|
||||
bool has_one_wire_temperature_ch4;
|
||||
float one_wire_temperature_ch4;
|
||||
/* Multi-channel One-Wire Temperature Channel 5 (*C) */
|
||||
bool has_one_wire_temperature_ch5;
|
||||
float one_wire_temperature_ch5;
|
||||
/* Multi-channel One-Wire Temperature Channel 6 (*C) */
|
||||
bool has_one_wire_temperature_ch6;
|
||||
float one_wire_temperature_ch6;
|
||||
/* Multi-channel One-Wire Temperature Channel 7 (*C) */
|
||||
bool has_one_wire_temperature_ch7;
|
||||
float one_wire_temperature_ch7;
|
||||
} meshtastic_EnvironmentMetrics;
|
||||
|
||||
/* Power Metrics (voltage / current / etc) */
|
||||
@@ -241,34 +288,34 @@ typedef struct _meshtastic_PowerMetrics {
|
||||
/* Current (Ch3) */
|
||||
bool has_ch3_current;
|
||||
float ch3_current;
|
||||
/* Voltage (Ch4) */
|
||||
/* Voltage (Ch4) - TODO Remove */
|
||||
bool has_ch4_voltage;
|
||||
float ch4_voltage;
|
||||
/* Current (Ch4) */
|
||||
/* Current (Ch4) - TODO Remove */
|
||||
bool has_ch4_current;
|
||||
float ch4_current;
|
||||
/* Voltage (Ch5) */
|
||||
/* Voltage (Ch5) - TODO Remove */
|
||||
bool has_ch5_voltage;
|
||||
float ch5_voltage;
|
||||
/* Current (Ch5) */
|
||||
/* Current (Ch5) - TODO Remove */
|
||||
bool has_ch5_current;
|
||||
float ch5_current;
|
||||
/* Voltage (Ch6) */
|
||||
/* Voltage (Ch6) - TODO Remove */
|
||||
bool has_ch6_voltage;
|
||||
float ch6_voltage;
|
||||
/* Current (Ch6) */
|
||||
/* Current (Ch6) - TODO Remove */
|
||||
bool has_ch6_current;
|
||||
float ch6_current;
|
||||
/* Voltage (Ch7) */
|
||||
/* Voltage (Ch7) - TODO Remove */
|
||||
bool has_ch7_voltage;
|
||||
float ch7_voltage;
|
||||
/* Current (Ch7) */
|
||||
/* Current (Ch7) - TODO Remove */
|
||||
bool has_ch7_current;
|
||||
float ch7_current;
|
||||
/* Voltage (Ch8) */
|
||||
/* Voltage (Ch8) - TODO Remove */
|
||||
bool has_ch8_voltage;
|
||||
float ch8_voltage;
|
||||
/* Current (Ch8) */
|
||||
/* Current (Ch8) - TODO Remove */
|
||||
bool has_ch8_current;
|
||||
float ch8_current;
|
||||
} meshtastic_PowerMetrics;
|
||||
@@ -350,6 +397,12 @@ typedef struct _meshtastic_AirQualityMetrics {
|
||||
/* Typical Particle Size in um */
|
||||
bool has_particles_tps;
|
||||
float particles_tps;
|
||||
/* Raw PM sensor device status/error register bitmask, as defined by the sensor's own datasheet
|
||||
(currently populated by the SEN6X family: bit 4 fan error, bit 6 RH&T error, bit 7 gas/VOC-NOx
|
||||
error, bit 9 CO2 error (SEN66), bit 10 HCHO error, bit 11 PM error, bit 12 CO2 error (SEN63C/SEN69C),
|
||||
bit 21 fan speed warning) */
|
||||
bool has_pm_status_flags;
|
||||
uint32_t pm_status_flags;
|
||||
} meshtastic_AirQualityMetrics;
|
||||
|
||||
/* Local device mesh statistics */
|
||||
@@ -478,7 +531,7 @@ typedef struct _meshtastic_Nau7802Config {
|
||||
float calibrationFactor;
|
||||
} meshtastic_Nau7802Config;
|
||||
|
||||
/* SEN5X State, for saving to flash */
|
||||
/* SEN5X State, for saving to flash (to be merged with SEN6XState) */
|
||||
typedef struct _meshtastic_SEN5XState {
|
||||
/* Last cleaning time for SEN5X */
|
||||
uint32_t last_cleaning_time;
|
||||
@@ -497,6 +550,25 @@ typedef struct _meshtastic_SEN5XState {
|
||||
uint64_t voc_state_array;
|
||||
} meshtastic_SEN5XState;
|
||||
|
||||
/* SEN6X State, for saving to flash */
|
||||
typedef struct _meshtastic_SEN6XState {
|
||||
/* Last cleaning time for SEN6X */
|
||||
uint32_t last_cleaning_time;
|
||||
/* Last cleaning time for SEN6X - valid flag */
|
||||
bool last_cleaning_valid;
|
||||
/* Config flag for one-shot mode (see admin.proto) */
|
||||
bool one_shot_mode;
|
||||
/* Last VOC state time, for models with a VOC sensor (SEN65, SEN66, SEN68, SEN69C) */
|
||||
bool has_voc_state_time;
|
||||
uint32_t voc_state_time;
|
||||
/* Last VOC state validity flag, for models with a VOC sensor (SEN65, SEN66, SEN68, SEN69C) */
|
||||
bool has_voc_state_valid;
|
||||
bool voc_state_valid;
|
||||
/* VOC state array (8x uint8t), for models with a VOC sensor (SEN65, SEN66, SEN68, SEN69C) */
|
||||
bool has_voc_state_array;
|
||||
uint64_t voc_state_array;
|
||||
} meshtastic_SEN6XState;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -504,8 +576,9 @@ extern "C" {
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_TelemetrySensorType_MIN meshtastic_TelemetrySensorType_SENSOR_UNSET
|
||||
#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_HM330X
|
||||
#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_HM330X+1))
|
||||
#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_SEN6X
|
||||
#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_SEN6X+1))
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -521,9 +594,9 @@ extern "C" {
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_DeviceMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_EnvironmentMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
||||
#define meshtastic_EnvironmentMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_PowerMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_AirQualityMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_AirQualityMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_LocalStats_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_TrafficManagementStats_init_default {0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_HealthMetrics_init_default {false, 0, false, 0, false, 0}
|
||||
@@ -531,10 +604,11 @@ extern "C" {
|
||||
#define meshtastic_Telemetry_init_default {0, 0, {meshtastic_DeviceMetrics_init_default}}
|
||||
#define meshtastic_Nau7802Config_init_default {0, 0}
|
||||
#define meshtastic_SEN5XState_init_default {0, 0, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_SEN6XState_init_default {0, 0, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_DeviceMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_EnvironmentMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
||||
#define meshtastic_EnvironmentMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_PowerMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_AirQualityMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_AirQualityMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_LocalStats_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_TrafficManagementStats_init_zero {0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_HealthMetrics_init_zero {false, 0, false, 0, false, 0}
|
||||
@@ -542,6 +616,7 @@ extern "C" {
|
||||
#define meshtastic_Telemetry_init_zero {0, 0, {meshtastic_DeviceMetrics_init_zero}}
|
||||
#define meshtastic_Nau7802Config_init_zero {0, 0}
|
||||
#define meshtastic_SEN5XState_init_zero {0, 0, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_SEN6XState_init_zero {0, 0, 0, false, 0, false, 0, false, 0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_DeviceMetrics_battery_level_tag 1
|
||||
@@ -571,7 +646,22 @@ extern "C" {
|
||||
#define meshtastic_EnvironmentMetrics_rainfall_24h_tag 20
|
||||
#define meshtastic_EnvironmentMetrics_soil_moisture_tag 21
|
||||
#define meshtastic_EnvironmentMetrics_soil_temperature_tag 22
|
||||
#define meshtastic_EnvironmentMetrics_one_wire_temperature_tag 23
|
||||
#define meshtastic_EnvironmentMetrics_adc_voltage_ch0_tag 24
|
||||
#define meshtastic_EnvironmentMetrics_adc_voltage_ch1_tag 25
|
||||
#define meshtastic_EnvironmentMetrics_adc_voltage_ch2_tag 26
|
||||
#define meshtastic_EnvironmentMetrics_adc_voltage_ch3_tag 27
|
||||
#define meshtastic_EnvironmentMetrics_adc_voltage_ch4_tag 28
|
||||
#define meshtastic_EnvironmentMetrics_adc_voltage_ch5_tag 29
|
||||
#define meshtastic_EnvironmentMetrics_adc_voltage_ch6_tag 30
|
||||
#define meshtastic_EnvironmentMetrics_adc_voltage_ch7_tag 31
|
||||
#define meshtastic_EnvironmentMetrics_one_wire_temperature_ch0_tag 32
|
||||
#define meshtastic_EnvironmentMetrics_one_wire_temperature_ch1_tag 33
|
||||
#define meshtastic_EnvironmentMetrics_one_wire_temperature_ch2_tag 34
|
||||
#define meshtastic_EnvironmentMetrics_one_wire_temperature_ch3_tag 35
|
||||
#define meshtastic_EnvironmentMetrics_one_wire_temperature_ch4_tag 36
|
||||
#define meshtastic_EnvironmentMetrics_one_wire_temperature_ch5_tag 37
|
||||
#define meshtastic_EnvironmentMetrics_one_wire_temperature_ch6_tag 38
|
||||
#define meshtastic_EnvironmentMetrics_one_wire_temperature_ch7_tag 39
|
||||
#define meshtastic_PowerMetrics_ch1_voltage_tag 1
|
||||
#define meshtastic_PowerMetrics_ch1_current_tag 2
|
||||
#define meshtastic_PowerMetrics_ch2_voltage_tag 3
|
||||
@@ -613,6 +703,7 @@ extern "C" {
|
||||
#define meshtastic_AirQualityMetrics_pm_voc_idx_tag 23
|
||||
#define meshtastic_AirQualityMetrics_pm_nox_idx_tag 24
|
||||
#define meshtastic_AirQualityMetrics_particles_tps_tag 25
|
||||
#define meshtastic_AirQualityMetrics_pm_status_flags_tag 26
|
||||
#define meshtastic_LocalStats_uptime_seconds_tag 1
|
||||
#define meshtastic_LocalStats_channel_utilization_tag 2
|
||||
#define meshtastic_LocalStats_air_util_tx_tag 3
|
||||
@@ -664,6 +755,12 @@ extern "C" {
|
||||
#define meshtastic_SEN5XState_voc_state_time_tag 4
|
||||
#define meshtastic_SEN5XState_voc_state_valid_tag 5
|
||||
#define meshtastic_SEN5XState_voc_state_array_tag 6
|
||||
#define meshtastic_SEN6XState_last_cleaning_time_tag 1
|
||||
#define meshtastic_SEN6XState_last_cleaning_valid_tag 2
|
||||
#define meshtastic_SEN6XState_one_shot_mode_tag 3
|
||||
#define meshtastic_SEN6XState_voc_state_time_tag 4
|
||||
#define meshtastic_SEN6XState_voc_state_valid_tag 5
|
||||
#define meshtastic_SEN6XState_voc_state_array_tag 6
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_DeviceMetrics_FIELDLIST(X, a) \
|
||||
@@ -698,7 +795,22 @@ X(a, STATIC, OPTIONAL, FLOAT, rainfall_1h, 19) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, rainfall_24h, 20) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, soil_moisture, 21) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, soil_temperature, 22) \
|
||||
X(a, STATIC, REPEATED, FLOAT, one_wire_temperature, 23)
|
||||
X(a, STATIC, OPTIONAL, FLOAT, adc_voltage_ch0, 24) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, adc_voltage_ch1, 25) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, adc_voltage_ch2, 26) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, adc_voltage_ch3, 27) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, adc_voltage_ch4, 28) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, adc_voltage_ch5, 29) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, adc_voltage_ch6, 30) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, adc_voltage_ch7, 31) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, one_wire_temperature_ch0, 32) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, one_wire_temperature_ch1, 33) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, one_wire_temperature_ch2, 34) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, one_wire_temperature_ch3, 35) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, one_wire_temperature_ch4, 36) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, one_wire_temperature_ch5, 37) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, one_wire_temperature_ch6, 38) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, one_wire_temperature_ch7, 39)
|
||||
#define meshtastic_EnvironmentMetrics_CALLBACK NULL
|
||||
#define meshtastic_EnvironmentMetrics_DEFAULT NULL
|
||||
|
||||
@@ -747,7 +859,8 @@ X(a, STATIC, OPTIONAL, FLOAT, pm_temperature, 21) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, pm_humidity, 22) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, pm_voc_idx, 23) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, pm_nox_idx, 24) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, particles_tps, 25)
|
||||
X(a, STATIC, OPTIONAL, FLOAT, particles_tps, 25) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, pm_status_flags, 26)
|
||||
#define meshtastic_AirQualityMetrics_CALLBACK NULL
|
||||
#define meshtastic_AirQualityMetrics_DEFAULT NULL
|
||||
|
||||
@@ -838,6 +951,16 @@ X(a, STATIC, OPTIONAL, FIXED64, voc_state_array, 6)
|
||||
#define meshtastic_SEN5XState_CALLBACK NULL
|
||||
#define meshtastic_SEN5XState_DEFAULT NULL
|
||||
|
||||
#define meshtastic_SEN6XState_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, last_cleaning_time, 1) \
|
||||
X(a, STATIC, SINGULAR, BOOL, last_cleaning_valid, 2) \
|
||||
X(a, STATIC, SINGULAR, BOOL, one_shot_mode, 3) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, voc_state_time, 4) \
|
||||
X(a, STATIC, OPTIONAL, BOOL, voc_state_valid, 5) \
|
||||
X(a, STATIC, OPTIONAL, FIXED64, voc_state_array, 6)
|
||||
#define meshtastic_SEN6XState_CALLBACK NULL
|
||||
#define meshtastic_SEN6XState_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_DeviceMetrics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_EnvironmentMetrics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_PowerMetrics_msg;
|
||||
@@ -849,6 +972,7 @@ extern const pb_msgdesc_t meshtastic_HostMetrics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Telemetry_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Nau7802Config_msg;
|
||||
extern const pb_msgdesc_t meshtastic_SEN5XState_msg;
|
||||
extern const pb_msgdesc_t meshtastic_SEN6XState_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_DeviceMetrics_fields &meshtastic_DeviceMetrics_msg
|
||||
@@ -862,18 +986,20 @@ extern const pb_msgdesc_t meshtastic_SEN5XState_msg;
|
||||
#define meshtastic_Telemetry_fields &meshtastic_Telemetry_msg
|
||||
#define meshtastic_Nau7802Config_fields &meshtastic_Nau7802Config_msg
|
||||
#define meshtastic_SEN5XState_fields &meshtastic_SEN5XState_msg
|
||||
#define meshtastic_SEN6XState_fields &meshtastic_SEN6XState_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_TELEMETRY_PB_H_MAX_SIZE meshtastic_Telemetry_size
|
||||
#define meshtastic_AirQualityMetrics_size 150
|
||||
#define meshtastic_AirQualityMetrics_size 157
|
||||
#define meshtastic_DeviceMetrics_size 27
|
||||
#define meshtastic_EnvironmentMetrics_size 161
|
||||
#define meshtastic_EnvironmentMetrics_size 209
|
||||
#define meshtastic_HealthMetrics_size 11
|
||||
#define meshtastic_HostMetrics_size 264
|
||||
#define meshtastic_LocalStats_size 87
|
||||
#define meshtastic_Nau7802Config_size 16
|
||||
#define meshtastic_PowerMetrics_size 81
|
||||
#define meshtastic_SEN5XState_size 27
|
||||
#define meshtastic_SEN6XState_size 27
|
||||
#define meshtastic_Telemetry_size 272
|
||||
#define meshtastic_TrafficManagementStats_size 42
|
||||
|
||||
|
||||
Reference in New Issue
Block a user