forked from meshtastic/firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request meshtastic#133 from meshtastic/telemetry-rework-3
Telemetry rework 3
- Loading branch information
Showing
4 changed files
with
70 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# options for nanopb | ||
# https://jpa.kapsi.fi/nanopb/docs/reference.html#proto-file-options | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,93 @@ | ||
syntax = "proto3"; | ||
|
||
option java_package = "com.geeksville.mesh"; | ||
option optimize_for = LITE_RUNTIME; | ||
option go_package = "github.com/meshtastic/gomeshproto"; | ||
|
||
option java_outer_classname = "TelemetryProtos"; | ||
|
||
/* | ||
* TODO: REPLACE | ||
* Key native device metrics such as battery level | ||
*/ | ||
message Telemetry { | ||
|
||
message DeviceMetrics { | ||
/* | ||
* This is usually not sent over the mesh (to save space), but it is sent | ||
* from the phone so that the local device can set its RTC If it is sent over | ||
* the mesh (because there are devices on the mesh without GPS), it will only | ||
* be sent by devices which has a hardware GPS clock (IE Mobile Phone). | ||
* seconds since 1970 | ||
* 1-100 (0 means powered) | ||
*/ | ||
fixed32 time = 1; | ||
|
||
uint32 battery_level = 1; | ||
/* | ||
* 1-100 (0 means powered) | ||
* Voltage measured | ||
*/ | ||
uint32 battery_level = 2; | ||
float voltage = 2; | ||
|
||
/* | ||
* Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). | ||
*/ | ||
float channel_utilization = 3; | ||
|
||
/* | ||
* Percent of airtime for transmission used within the last hour. | ||
*/ | ||
float air_util_tx = 4; | ||
} | ||
|
||
/* | ||
* This is sent by node only if it a router and if hop_limit is set to 0 | ||
* and is not being sent as a reliable message. | ||
*/ | ||
bool router_heartbeat = 5; | ||
|
||
/* | ||
* Weather station or other environmental metrics | ||
*/ | ||
message EnvironmentMetrics { | ||
/* | ||
* Temperature measured | ||
*/ | ||
float temperature = 6; | ||
float temperature = 1; | ||
|
||
/* | ||
* Relative humidity percent measured | ||
*/ | ||
float relative_humidity = 7; | ||
float relative_humidity = 2; | ||
|
||
/* | ||
* Barometric pressure in hPA measured | ||
*/ | ||
float barometric_pressure = 8; | ||
float barometric_pressure = 3; | ||
|
||
/* | ||
* Gas resistance in mOhm measured | ||
*/ | ||
float gas_resistance = 9; | ||
float gas_resistance = 4; | ||
|
||
/* | ||
* Voltage measured | ||
*/ | ||
float voltage = 10; | ||
float voltage = 5; | ||
|
||
/* | ||
* Current measured | ||
*/ | ||
float current = 11; | ||
float current = 6; | ||
} | ||
|
||
/* | ||
* Types of Measurements the telemetry module is equipped to handle | ||
*/ | ||
message Telemetry { | ||
/* | ||
* This is usually not sent over the mesh (to save space), but it is sent | ||
* from the phone so that the local device can set its RTC If it is sent over | ||
* the mesh (because there are devices on the mesh without GPS), it will only | ||
* be sent by devices which has a hardware GPS clock (IE Mobile Phone). | ||
* seconds since 1970 | ||
*/ | ||
fixed32 time = 1; | ||
|
||
oneof variant { | ||
/* | ||
* Key native device metrics such as battery level | ||
*/ | ||
DeviceMetrics device_metrics = 2; | ||
|
||
/* | ||
* Weather station or other environmental metrics | ||
*/ | ||
EnvironmentMetrics environment_metrics = 3; | ||
} | ||
} |