Add Battery Reporting to FindMy

This commit is contained in:
Matthew
2024-04-04 23:11:43 -04:00
parent f85127ea23
commit 5aa308ec50
5 changed files with 77 additions and 7 deletions

View File

@@ -13,6 +13,7 @@ typedef enum {
FindMyTypeTile,
} FindMyType;
typedef struct {
bool beacon_active;
uint8_t broadcast_interval;
@@ -24,6 +25,8 @@ typedef struct {
// Generated from the other state values
GapExtraBeaconConfig config;
uint8_t battery_level;
} FindMyState;
bool findmy_state_load(FindMyState* out_state);
@@ -34,4 +37,6 @@ void findmy_state_sync_config(FindMyState* state);
void findmy_state_save(FindMyState* state);
void findmy_update_payload_battery(uint8_t* data, uint8_t battery_level, FindMyType type);
uint8_t findmy_state_data_size(FindMyType type);