@@ -118,6 +118,13 @@ typedef enum _meshtastic_TelemetrySensorType {
118118 meshtastic_TelemetrySensorType_VL53L0X = 50
119119} meshtastic_TelemetrySensorType ;
120120
121+ typedef enum _meshtastic_VL53L0XState_RangingMode {
122+ meshtastic_VL53L0XState_RangingMode_Default = 0 ,
123+ meshtastic_VL53L0XState_RangingMode_LongRange = 1 ,
124+ meshtastic_VL53L0XState_RangingMode_HighSpeed = 2 ,
125+ meshtastic_VL53L0XState_RangingMode_HighAccuracy = 3
126+ } meshtastic_VL53L0XState_RangingMode ;
127+
121128/* Struct definitions */
122129/* Key native device metrics such as battery level */
123130typedef struct _meshtastic_DeviceMetrics {
@@ -486,6 +493,11 @@ typedef struct _meshtastic_SEN5XState {
486493 uint64_t voc_state_array ;
487494} meshtastic_SEN5XState ;
488495
496+ typedef struct _meshtastic_VL53L0XState {
497+ /* Current Ranging Mode */
498+ meshtastic_VL53L0XState_RangingMode mode ;
499+ } meshtastic_VL53L0XState ;
500+
489501
490502#ifdef __cplusplus
491503extern "C" {
@@ -496,6 +508,10 @@ extern "C" {
496508#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_VL53L0X
497509#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_VL53L0X+1))
498510
511+ #define _meshtastic_VL53L0XState_RangingMode_MIN meshtastic_VL53L0XState_RangingMode_Default
512+ #define _meshtastic_VL53L0XState_RangingMode_MAX meshtastic_VL53L0XState_RangingMode_HighAccuracy
513+ #define _meshtastic_VL53L0XState_RangingMode_ARRAYSIZE ((meshtastic_VL53L0XState_RangingMode)(meshtastic_VL53L0XState_RangingMode_HighAccuracy+1))
514+
499515
500516
501517
@@ -507,6 +523,8 @@ extern "C" {
507523
508524
509525
526+ #define meshtastic_VL53L0XState_mode_ENUMTYPE meshtastic_VL53L0XState_RangingMode
527+
510528
511529/* Initializer values for message structs */
512530#define meshtastic_DeviceMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0}
@@ -520,6 +538,7 @@ extern "C" {
520538#define meshtastic_Telemetry_init_default {0, 0, {meshtastic_DeviceMetrics_init_default}}
521539#define meshtastic_Nau7802Config_init_default {0, 0}
522540#define meshtastic_SEN5XState_init_default {0, 0, 0, false, 0, false, 0, false, 0}
541+ #define meshtastic_VL53L0XState_init_default {_meshtastic_VL53L0XState_RangingMode_MIN}
523542#define meshtastic_DeviceMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0}
524543#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}
525544#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}
@@ -531,6 +550,7 @@ extern "C" {
531550#define meshtastic_Telemetry_init_zero {0, 0, {meshtastic_DeviceMetrics_init_zero}}
532551#define meshtastic_Nau7802Config_init_zero {0, 0}
533552#define meshtastic_SEN5XState_init_zero {0, 0, 0, false, 0, false, 0, false, 0}
553+ #define meshtastic_VL53L0XState_init_zero {_meshtastic_VL53L0XState_RangingMode_MIN}
534554
535555/* Field tags (for use in manual encoding/decoding) */
536556#define meshtastic_DeviceMetrics_battery_level_tag 1
@@ -652,6 +672,7 @@ extern "C" {
652672#define meshtastic_SEN5XState_voc_state_time_tag 4
653673#define meshtastic_SEN5XState_voc_state_valid_tag 5
654674#define meshtastic_SEN5XState_voc_state_array_tag 6
675+ #define meshtastic_VL53L0XState_mode_tag 1
655676
656677/* Struct field encoding specification for nanopb */
657678#define meshtastic_DeviceMetrics_FIELDLIST (X , a ) \
@@ -825,6 +846,11 @@ X(a, STATIC, OPTIONAL, FIXED64, voc_state_array, 6)
825846#define meshtastic_SEN5XState_CALLBACK NULL
826847#define meshtastic_SEN5XState_DEFAULT NULL
827848
849+ #define meshtastic_VL53L0XState_FIELDLIST (X , a ) \
850+ X(a, STATIC, SINGULAR, UENUM, mode, 1)
851+ #define meshtastic_VL53L0XState_CALLBACK NULL
852+ #define meshtastic_VL53L0XState_DEFAULT NULL
853+
828854extern const pb_msgdesc_t meshtastic_DeviceMetrics_msg ;
829855extern const pb_msgdesc_t meshtastic_EnvironmentMetrics_msg ;
830856extern const pb_msgdesc_t meshtastic_PowerMetrics_msg ;
@@ -836,6 +862,7 @@ extern const pb_msgdesc_t meshtastic_HostMetrics_msg;
836862extern const pb_msgdesc_t meshtastic_Telemetry_msg ;
837863extern const pb_msgdesc_t meshtastic_Nau7802Config_msg ;
838864extern const pb_msgdesc_t meshtastic_SEN5XState_msg ;
865+ extern const pb_msgdesc_t meshtastic_VL53L0XState_msg ;
839866
840867/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
841868#define meshtastic_DeviceMetrics_fields &meshtastic_DeviceMetrics_msg
@@ -849,6 +876,7 @@ extern const pb_msgdesc_t meshtastic_SEN5XState_msg;
849876#define meshtastic_Telemetry_fields &meshtastic_Telemetry_msg
850877#define meshtastic_Nau7802Config_fields &meshtastic_Nau7802Config_msg
851878#define meshtastic_SEN5XState_fields &meshtastic_SEN5XState_msg
879+ #define meshtastic_VL53L0XState_fields &meshtastic_VL53L0XState_msg
852880
853881/* Maximum encoded size of messages (where known) */
854882#define MESHTASTIC_MESHTASTIC_TELEMETRY_PB_H_MAX_SIZE meshtastic_Telemetry_size
@@ -863,6 +891,7 @@ extern const pb_msgdesc_t meshtastic_SEN5XState_msg;
863891#define meshtastic_SEN5XState_size 27
864892#define meshtastic_Telemetry_size 272
865893#define meshtastic_TrafficManagementStats_size 42
894+ #define meshtastic_VL53L0XState_size 2
866895
867896#ifdef __cplusplus
868897} /* extern "C" */
0 commit comments