-
Notifications
You must be signed in to change notification settings - Fork 967
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[create-pull-request] automated change (#4157)
Co-authored-by: thebentern <[email protected]>
- Loading branch information
1 parent
02d8715
commit f8db38c
Showing
6 changed files
with
110 additions
and
7 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
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,13 @@ | ||
/* Automatically generated nanopb constant definitions */ | ||
/* Generated by nanopb-0.4.8 */ | ||
|
||
#include "meshtastic/powermon.pb.h" | ||
#if PB_PROTO_HEADER_VERSION != 40 | ||
#error Regenerate this file with the current version of nanopb generator. | ||
#endif | ||
|
||
PB_BIND(meshtastic_PowerMon, meshtastic_PowerMon, AUTO) | ||
|
||
|
||
|
||
|
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,85 @@ | ||
/* Automatically generated nanopb header */ | ||
/* Generated by nanopb-0.4.8 */ | ||
|
||
#ifndef PB_MESHTASTIC_MESHTASTIC_POWERMON_PB_H_INCLUDED | ||
#define PB_MESHTASTIC_MESHTASTIC_POWERMON_PB_H_INCLUDED | ||
#include <pb.h> | ||
|
||
#if PB_PROTO_HEADER_VERSION != 40 | ||
#error Regenerate this file with the current version of nanopb generator. | ||
#endif | ||
|
||
/* Enum definitions */ | ||
/* 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. */ | ||
typedef enum _meshtastic_PowerMon_State { | ||
meshtastic_PowerMon_State_None = 0, | ||
meshtastic_PowerMon_State_CPU_DeepSleep = 1, | ||
meshtastic_PowerMon_State_CPU_LightSleep = 2, | ||
/* The external Vext1 power is on. Many boards have auxillary power rails that the CPU turns on only | ||
occasionally. In cases where that rail has multiple devices on it we usually want to have logging on | ||
the state of that rail as an independent record. | ||
For instance on the Heltec Tracker 1.1 board, this rail is the power source for the GPS and screen. | ||
The log messages will be short and complete (see PowerMon.Event in the protobufs for details). | ||
something like "S:PM: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) */ | ||
meshtastic_PowerMon_State_Vext1_On = 4, | ||
meshtastic_PowerMon_State_Lora_RXOn = 8, | ||
meshtastic_PowerMon_State_Lora_TXOn = 16, | ||
meshtastic_PowerMon_State_Lora_RXActive = 32, | ||
meshtastic_PowerMon_State_BT_On = 64, | ||
meshtastic_PowerMon_State_LED_On = 128, | ||
meshtastic_PowerMon_State_Screen_On = 256, | ||
meshtastic_PowerMon_State_Screen_Drawing = 512, | ||
meshtastic_PowerMon_State_Wifi_On = 1024, | ||
/* GPS is actively trying to find our location | ||
See GPSPowerState for more details */ | ||
meshtastic_PowerMon_State_GPS_Active = 2048 | ||
} meshtastic_PowerMon_State; | ||
|
||
/* Struct definitions */ | ||
/* Note: There are no 'PowerMon' messages normally in use (PowerMons are sent only as structured logs - slogs). | ||
But we wrap our State enum in this message to effectively nest a namespace (without our linter yelling at us) */ | ||
typedef struct _meshtastic_PowerMon { | ||
char dummy_field; | ||
} meshtastic_PowerMon; | ||
|
||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/* Helper constants for enums */ | ||
#define _meshtastic_PowerMon_State_MIN meshtastic_PowerMon_State_None | ||
#define _meshtastic_PowerMon_State_MAX meshtastic_PowerMon_State_GPS_Active | ||
#define _meshtastic_PowerMon_State_ARRAYSIZE ((meshtastic_PowerMon_State)(meshtastic_PowerMon_State_GPS_Active+1)) | ||
|
||
|
||
|
||
/* Initializer values for message structs */ | ||
#define meshtastic_PowerMon_init_default {0} | ||
#define meshtastic_PowerMon_init_zero {0} | ||
|
||
/* Field tags (for use in manual encoding/decoding) */ | ||
|
||
/* Struct field encoding specification for nanopb */ | ||
#define meshtastic_PowerMon_FIELDLIST(X, a) \ | ||
|
||
#define meshtastic_PowerMon_CALLBACK NULL | ||
#define meshtastic_PowerMon_DEFAULT NULL | ||
|
||
extern const pb_msgdesc_t meshtastic_PowerMon_msg; | ||
|
||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */ | ||
#define meshtastic_PowerMon_fields &meshtastic_PowerMon_msg | ||
|
||
/* Maximum encoded size of messages (where known) */ | ||
#define MESHTASTIC_MESHTASTIC_POWERMON_PB_H_MAX_SIZE meshtastic_PowerMon_size | ||
#define meshtastic_PowerMon_size 0 | ||
|
||
#ifdef __cplusplus | ||
} /* extern "C" */ | ||
#endif | ||
|
||
#endif |