@@ -116,6 +116,13 @@ typedef enum _meshtastic_TelemetrySensorType {
116116 meshtastic_TelemetrySensorType_VL53L0X = 50
117117} meshtastic_TelemetrySensorType ;
118118
119+ typedef enum _meshtastic_VL53L0XState_RangingMode {
120+ meshtastic_VL53L0XState_RangingMode_Default = 0 ,
121+ meshtastic_VL53L0XState_RangingMode_LongRange = 1 ,
122+ meshtastic_VL53L0XState_RangingMode_HighSpeed = 2 ,
123+ meshtastic_VL53L0XState_RangingMode_HighAccuracy = 3
124+ } meshtastic_VL53L0XState_RangingMode ;
125+
119126/* Struct definitions */
120127/* Key native device metrics such as battery level */
121128typedef struct _meshtastic_DeviceMetrics {
@@ -484,6 +491,11 @@ typedef struct _meshtastic_SEN5XState {
484491 uint64_t voc_state_array ;
485492} meshtastic_SEN5XState ;
486493
494+ typedef struct _meshtastic_VL53L0XState {
495+ /* Current Ranging Mode */
496+ meshtastic_VL53L0XState_RangingMode mode ;
497+ } meshtastic_VL53L0XState ;
498+
487499
488500#ifdef __cplusplus
489501extern "C" {
@@ -494,6 +506,10 @@ extern "C" {
494506#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_VL53L0X
495507#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_VL53L0X+1))
496508
509+ #define _meshtastic_VL53L0XState_RangingMode_MIN meshtastic_VL53L0XState_RangingMode_Default
510+ #define _meshtastic_VL53L0XState_RangingMode_MAX meshtastic_VL53L0XState_RangingMode_HighAccuracy
511+ #define _meshtastic_VL53L0XState_RangingMode_ARRAYSIZE ((meshtastic_VL53L0XState_RangingMode)(meshtastic_VL53L0XState_RangingMode_HighAccuracy+1))
512+
497513
498514
499515
@@ -505,6 +521,8 @@ extern "C" {
505521
506522
507523
524+ #define meshtastic_VL53L0XState_mode_ENUMTYPE meshtastic_VL53L0XState_RangingMode
525+
508526
509527/* Initializer values for message structs */
510528#define meshtastic_DeviceMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0}
@@ -518,6 +536,7 @@ extern "C" {
518536#define meshtastic_Telemetry_init_default {0, 0, {meshtastic_DeviceMetrics_init_default}}
519537#define meshtastic_Nau7802Config_init_default {0, 0}
520538#define meshtastic_SEN5XState_init_default {0, 0, 0, false, 0, false, 0, false, 0}
539+ #define meshtastic_VL53L0XState_init_default {_meshtastic_VL53L0XState_RangingMode_MIN}
521540#define meshtastic_DeviceMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0}
522541#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}
523542#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}
@@ -529,6 +548,7 @@ extern "C" {
529548#define meshtastic_Telemetry_init_zero {0, 0, {meshtastic_DeviceMetrics_init_zero}}
530549#define meshtastic_Nau7802Config_init_zero {0, 0}
531550#define meshtastic_SEN5XState_init_zero {0, 0, 0, false, 0, false, 0, false, 0}
551+ #define meshtastic_VL53L0XState_init_zero {_meshtastic_VL53L0XState_RangingMode_MIN}
532552
533553/* Field tags (for use in manual encoding/decoding) */
534554#define meshtastic_DeviceMetrics_battery_level_tag 1
@@ -650,6 +670,7 @@ extern "C" {
650670#define meshtastic_SEN5XState_voc_state_time_tag 4
651671#define meshtastic_SEN5XState_voc_state_valid_tag 5
652672#define meshtastic_SEN5XState_voc_state_array_tag 6
673+ #define meshtastic_VL53L0XState_mode_tag 1
653674
654675/* Struct field encoding specification for nanopb */
655676#define meshtastic_DeviceMetrics_FIELDLIST (X , a ) \
@@ -823,6 +844,11 @@ X(a, STATIC, OPTIONAL, FIXED64, voc_state_array, 6)
823844#define meshtastic_SEN5XState_CALLBACK NULL
824845#define meshtastic_SEN5XState_DEFAULT NULL
825846
847+ #define meshtastic_VL53L0XState_FIELDLIST (X , a ) \
848+ X(a, STATIC, SINGULAR, UENUM, mode, 1)
849+ #define meshtastic_VL53L0XState_CALLBACK NULL
850+ #define meshtastic_VL53L0XState_DEFAULT NULL
851+
826852extern const pb_msgdesc_t meshtastic_DeviceMetrics_msg ;
827853extern const pb_msgdesc_t meshtastic_EnvironmentMetrics_msg ;
828854extern const pb_msgdesc_t meshtastic_PowerMetrics_msg ;
@@ -834,6 +860,7 @@ extern const pb_msgdesc_t meshtastic_HostMetrics_msg;
834860extern const pb_msgdesc_t meshtastic_Telemetry_msg ;
835861extern const pb_msgdesc_t meshtastic_Nau7802Config_msg ;
836862extern const pb_msgdesc_t meshtastic_SEN5XState_msg ;
863+ extern const pb_msgdesc_t meshtastic_VL53L0XState_msg ;
837864
838865/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
839866#define meshtastic_DeviceMetrics_fields &meshtastic_DeviceMetrics_msg
@@ -847,6 +874,7 @@ extern const pb_msgdesc_t meshtastic_SEN5XState_msg;
847874#define meshtastic_Telemetry_fields &meshtastic_Telemetry_msg
848875#define meshtastic_Nau7802Config_fields &meshtastic_Nau7802Config_msg
849876#define meshtastic_SEN5XState_fields &meshtastic_SEN5XState_msg
877+ #define meshtastic_VL53L0XState_fields &meshtastic_VL53L0XState_msg
850878
851879/* Maximum encoded size of messages (where known) */
852880#define MESHTASTIC_MESHTASTIC_TELEMETRY_PB_H_MAX_SIZE meshtastic_Telemetry_size
@@ -861,6 +889,7 @@ extern const pb_msgdesc_t meshtastic_SEN5XState_msg;
861889#define meshtastic_SEN5XState_size 27
862890#define meshtastic_Telemetry_size 272
863891#define meshtastic_TrafficManagementStats_size 42
892+ #define meshtastic_VL53L0XState_size 2
864893
865894#ifdef __cplusplus
866895} /* extern "C" */
0 commit comments