mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-16 07:42:37 +00:00
add veml7700 readings to protobuf and to the mqtt json + fix the readigns validator code in env telemetry
This commit is contained in:
@@ -664,6 +664,10 @@ std::string MQTT::meshPacketToJson(meshtastic_MeshPacket *mp)
|
||||
msgPayload["gas_resistance"] = new JSONValue(decoded->variant.environment_metrics.gas_resistance);
|
||||
msgPayload["voltage"] = new JSONValue(decoded->variant.environment_metrics.voltage);
|
||||
msgPayload["current"] = new JSONValue(decoded->variant.environment_metrics.current);
|
||||
msgPayload["lux"] = new JSONValue(decoded->variant.environment_metrics.lux);
|
||||
msgPayload["white"] = new JSONValue((uint)decoded->variant.environment_metrics.white);
|
||||
msgPayload["ALS"] = new JSONValue((uint)decoded->variant.environment_metrics.ALS);
|
||||
msgPayload["iaq"] = new JSONValue((uint)decoded->variant.environment_metrics.iaq);
|
||||
} else if (decoded->which_variant == meshtastic_Telemetry_power_metrics_tag) {
|
||||
msgPayload["voltage_ch1"] = new JSONValue(decoded->variant.power_metrics.ch1_voltage);
|
||||
msgPayload["current_ch1"] = new JSONValue(decoded->variant.power_metrics.ch1_current);
|
||||
|
||||
Reference in New Issue
Block a user