mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-23 03:00:56 +00:00
[create-pull-request] automated change (#4926)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
00f15459ec
commit
0a93261c06
@@ -71,7 +71,9 @@ typedef enum _meshtastic_TelemetrySensorType {
|
||||
/* MAX17048 1S lipo battery sensor (voltage, state of charge, time to go) */
|
||||
meshtastic_TelemetrySensorType_MAX17048 = 28,
|
||||
/* Custom I2C sensor implementation based on https://github.com/meshtastic/i2c-sensor */
|
||||
meshtastic_TelemetrySensorType_CUSTOM_SENSOR = 29
|
||||
meshtastic_TelemetrySensorType_CUSTOM_SENSOR = 29,
|
||||
/* MAX30102 Pulse Oximeter and Heart-Rate Sensor */
|
||||
meshtastic_TelemetrySensorType_MAX30102 = 30
|
||||
} meshtastic_TelemetrySensorType;
|
||||
|
||||
/* Struct definitions */
|
||||
@@ -233,6 +235,19 @@ typedef struct _meshtastic_LocalStats {
|
||||
uint16_t num_total_nodes;
|
||||
} meshtastic_LocalStats;
|
||||
|
||||
/* Health telemetry metrics */
|
||||
typedef struct _meshtastic_HealthMetrics {
|
||||
/* Heart rate (beats per minute) */
|
||||
bool has_heart_bpm;
|
||||
uint8_t heart_bpm;
|
||||
/* SpO2 (blood oxygen saturation) level */
|
||||
bool has_spO2;
|
||||
uint8_t spO2;
|
||||
/* Body temperature in degrees Celsius */
|
||||
bool has_temperature;
|
||||
float temperature;
|
||||
} meshtastic_HealthMetrics;
|
||||
|
||||
/* Types of Measurements the telemetry module is equipped to handle */
|
||||
typedef struct _meshtastic_Telemetry {
|
||||
/* Seconds since 1970 - or 0 for unknown/unset */
|
||||
@@ -249,6 +264,8 @@ typedef struct _meshtastic_Telemetry {
|
||||
meshtastic_PowerMetrics power_metrics;
|
||||
/* Local device mesh statistics */
|
||||
meshtastic_LocalStats local_stats;
|
||||
/* Health telemetry metrics */
|
||||
meshtastic_HealthMetrics health_metrics;
|
||||
} variant;
|
||||
} meshtastic_Telemetry;
|
||||
|
||||
@@ -267,8 +284,9 @@ extern "C" {
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_TelemetrySensorType_MIN meshtastic_TelemetrySensorType_SENSOR_UNSET
|
||||
#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_CUSTOM_SENSOR
|
||||
#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_CUSTOM_SENSOR+1))
|
||||
#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_MAX30102
|
||||
#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_MAX30102+1))
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -284,6 +302,7 @@ extern "C" {
|
||||
#define meshtastic_PowerMetrics_init_default {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}
|
||||
#define meshtastic_LocalStats_init_default {0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_HealthMetrics_init_default {false, 0, false, 0, false, 0}
|
||||
#define meshtastic_Telemetry_init_default {0, 0, {meshtastic_DeviceMetrics_init_default}}
|
||||
#define meshtastic_Nau7802Config_init_default {0, 0}
|
||||
#define meshtastic_DeviceMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
@@ -291,6 +310,7 @@ extern "C" {
|
||||
#define meshtastic_PowerMetrics_init_zero {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}
|
||||
#define meshtastic_LocalStats_init_zero {0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_HealthMetrics_init_zero {false, 0, false, 0, false, 0}
|
||||
#define meshtastic_Telemetry_init_zero {0, 0, {meshtastic_DeviceMetrics_init_zero}}
|
||||
#define meshtastic_Nau7802Config_init_zero {0, 0}
|
||||
|
||||
@@ -343,12 +363,16 @@ extern "C" {
|
||||
#define meshtastic_LocalStats_num_packets_rx_bad_tag 6
|
||||
#define meshtastic_LocalStats_num_online_nodes_tag 7
|
||||
#define meshtastic_LocalStats_num_total_nodes_tag 8
|
||||
#define meshtastic_HealthMetrics_heart_bpm_tag 1
|
||||
#define meshtastic_HealthMetrics_spO2_tag 2
|
||||
#define meshtastic_HealthMetrics_temperature_tag 3
|
||||
#define meshtastic_Telemetry_time_tag 1
|
||||
#define meshtastic_Telemetry_device_metrics_tag 2
|
||||
#define meshtastic_Telemetry_environment_metrics_tag 3
|
||||
#define meshtastic_Telemetry_air_quality_metrics_tag 4
|
||||
#define meshtastic_Telemetry_power_metrics_tag 5
|
||||
#define meshtastic_Telemetry_local_stats_tag 6
|
||||
#define meshtastic_Telemetry_health_metrics_tag 7
|
||||
#define meshtastic_Nau7802Config_zeroOffset_tag 1
|
||||
#define meshtastic_Nau7802Config_calibrationFactor_tag 2
|
||||
|
||||
@@ -421,13 +445,21 @@ X(a, STATIC, SINGULAR, UINT32, num_total_nodes, 8)
|
||||
#define meshtastic_LocalStats_CALLBACK NULL
|
||||
#define meshtastic_LocalStats_DEFAULT NULL
|
||||
|
||||
#define meshtastic_HealthMetrics_FIELDLIST(X, a) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, heart_bpm, 1) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, spO2, 2) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, temperature, 3)
|
||||
#define meshtastic_HealthMetrics_CALLBACK NULL
|
||||
#define meshtastic_HealthMetrics_DEFAULT NULL
|
||||
|
||||
#define meshtastic_Telemetry_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, FIXED32, time, 1) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,device_metrics,variant.device_metrics), 2) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,environment_metrics,variant.environment_metrics), 3) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,air_quality_metrics,variant.air_quality_metrics), 4) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,power_metrics,variant.power_metrics), 5) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,local_stats,variant.local_stats), 6)
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,local_stats,variant.local_stats), 6) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,health_metrics,variant.health_metrics), 7)
|
||||
#define meshtastic_Telemetry_CALLBACK NULL
|
||||
#define meshtastic_Telemetry_DEFAULT NULL
|
||||
#define meshtastic_Telemetry_variant_device_metrics_MSGTYPE meshtastic_DeviceMetrics
|
||||
@@ -435,6 +467,7 @@ X(a, STATIC, ONEOF, MESSAGE, (variant,local_stats,variant.local_stats),
|
||||
#define meshtastic_Telemetry_variant_air_quality_metrics_MSGTYPE meshtastic_AirQualityMetrics
|
||||
#define meshtastic_Telemetry_variant_power_metrics_MSGTYPE meshtastic_PowerMetrics
|
||||
#define meshtastic_Telemetry_variant_local_stats_MSGTYPE meshtastic_LocalStats
|
||||
#define meshtastic_Telemetry_variant_health_metrics_MSGTYPE meshtastic_HealthMetrics
|
||||
|
||||
#define meshtastic_Nau7802Config_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, INT32, zeroOffset, 1) \
|
||||
@@ -447,6 +480,7 @@ extern const pb_msgdesc_t meshtastic_EnvironmentMetrics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_PowerMetrics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_AirQualityMetrics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_LocalStats_msg;
|
||||
extern const pb_msgdesc_t meshtastic_HealthMetrics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Telemetry_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Nau7802Config_msg;
|
||||
|
||||
@@ -456,6 +490,7 @@ extern const pb_msgdesc_t meshtastic_Nau7802Config_msg;
|
||||
#define meshtastic_PowerMetrics_fields &meshtastic_PowerMetrics_msg
|
||||
#define meshtastic_AirQualityMetrics_fields &meshtastic_AirQualityMetrics_msg
|
||||
#define meshtastic_LocalStats_fields &meshtastic_LocalStats_msg
|
||||
#define meshtastic_HealthMetrics_fields &meshtastic_HealthMetrics_msg
|
||||
#define meshtastic_Telemetry_fields &meshtastic_Telemetry_msg
|
||||
#define meshtastic_Nau7802Config_fields &meshtastic_Nau7802Config_msg
|
||||
|
||||
@@ -464,6 +499,7 @@ extern const pb_msgdesc_t meshtastic_Nau7802Config_msg;
|
||||
#define meshtastic_AirQualityMetrics_size 72
|
||||
#define meshtastic_DeviceMetrics_size 27
|
||||
#define meshtastic_EnvironmentMetrics_size 85
|
||||
#define meshtastic_HealthMetrics_size 11
|
||||
#define meshtastic_LocalStats_size 42
|
||||
#define meshtastic_Nau7802Config_size 16
|
||||
#define meshtastic_PowerMetrics_size 30
|
||||
|
||||
Reference in New Issue
Block a user