Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 47 additions & 1 deletion meshtastic/telemetry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,53 @@ option java_outer_classname = "TelemetryProtos";
option java_package = "org.meshtastic.proto";
option swift_prefix = "";

/**
* Details about charging state of the battery.
* Added to preserve the battery percentage while it's charging.
*/
enum BatteryStatus {
/*
* No further information (yet)
*/
BATTERY_STATUS_UNKNOWN = 0;

/*
* Running on battery (not externally powered)
*/
DISCHARGING = 1;

/*
* Externally powered and actively charging
*/
CHARGING = 2;

/*
* Externally powered and fully charged
*/
FULLY_CHARGED = 3;

/*
* Battery not present
*/
NOT_PRESENT = 4;

/*
* Externally powered but not charging (disabled, suspended, or not supported)
*/
NOT_CHARGING = 5;

/*
* Externally powered but not charging due to anomaly (fault detected)
*/
CHARGE_FAILURE = 6;
}

/*
* Key native device metrics such as battery level
*/
message DeviceMetrics {
/*
* 0-100 (>100 means powered)
* 0-100
*/
optional uint32 battery_level = 1;

Expand All @@ -36,6 +77,11 @@ message DeviceMetrics {
* How long the device has been running since the last reboot (in seconds)
*/
optional uint32 uptime_seconds = 5;

/*
* Details about powered and charging state
*/
optional BatteryStatus battery_status = 6;
}

/*
Expand Down
Loading