forked from meshtastic/protobufs
-
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.
- Loading branch information
1 parent
0c90a68
commit 4a8b6aa
Showing
1 changed file
with
43 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
syntax = "proto3"; | ||
|
||
option csharp_namespace = "Meshtastic.Protobufs"; | ||
option go_package = "github.com/meshtastic/go/generated"; | ||
option java_outer_classname = "PowerMonProtos"; | ||
option java_package = "com.geeksville.mesh"; | ||
option swift_prefix = ""; | ||
|
||
package meshtastic.PowerMon; | ||
|
||
/* Any significant power changing event in meshtastic should be tagged with a powermon state transition. | ||
If you are making new meshtastic features feel free to add new entries at the end of this definition. | ||
*/ | ||
enum State { | ||
None = 0; | ||
|
||
CPU_DeepSleep = 0x01; | ||
CPU_Sleep = 0x02; | ||
CPU_Awake = 0x04; | ||
Lora_RXOn = 0x08; | ||
Lora_TXOn = 0x10; | ||
Lora_RXActive = 0x20; | ||
BT_On = 0x40; | ||
LED_On = 0x80; | ||
|
||
Screen_On = 0x100; | ||
Screen_Drawing = 0x200; | ||
Wifi_On = 0x400; | ||
GPS_LowPower = 0x800; | ||
GPS_MediumPower = 0x1000; | ||
GPS_HighPower = 0x2000; | ||
} | ||
|
||
/* | ||
the log messages will be short and complete (see PowerMon.Event in the protobufs for details). | ||
something like "PwrMon,C,0x00001234,REASON" where the hex number is the bitmask of all current states. | ||
(We use a bitmask for states so that if a log message gets lost it won't be fatal) | ||
*/ | ||
message Event { | ||
|
||
// Bitwise-OR of States | ||
optional uint64 states = 1; | ||
} |