mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-10 13:13:27 +00:00
Update metadata struct to include device battery level
This commit is contained in:
parent
7505fe7a7c
commit
66234c5694
@ -1477,6 +1477,7 @@ extern meshtastic_DeviceMetadata getDeviceMetadata()
|
||||
deviceMetadata.hw_model = HW_VENDOR;
|
||||
deviceMetadata.hasRemoteHardware = moduleConfig.remote_hardware.enabled;
|
||||
deviceMetadata.excluded_modules = meshtastic_ExcludedModules_EXCLUDED_NONE;
|
||||
deviceMetadata.remaining_battery = powerStatus->getBatteryChargePercent();
|
||||
#if MESHTASTIC_EXCLUDE_REMOTEHARDWARE
|
||||
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_REMOTEHARDWARE_CONFIG;
|
||||
#endif
|
||||
|
@ -1110,6 +1110,8 @@ typedef struct _meshtastic_DeviceMetadata {
|
||||
bool hasRemoteHardware;
|
||||
/* Has PKC capabilities */
|
||||
bool hasPKC;
|
||||
/* How much battery the device has left */
|
||||
uint8_t remaining_battery;
|
||||
/* Bit field of boolean for excluded modules
|
||||
(bitwise OR of ExcludedModules) */
|
||||
uint32_t excluded_modules;
|
||||
|
Loading…
Reference in New Issue
Block a user