Battery level / telemetry rework (first pass) (#1306)

* Update protos

* Removed battery level from position packets

* Send internal metrics

* Handle telemetry on node info for now

* Fixes

* Default telemetry to enabled and same interval as position

* Fixes for lots of interval issues

* Fixed interval

* Regen

* Cleanup

* Newline

* Update proto ref
This commit is contained in:
Ben Meadors
2022-03-20 14:55:38 +00:00
committed by GitHub
parent bbf044795a
commit e97bd4f9f9
12 changed files with 158 additions and 141 deletions

View File

@@ -61,6 +61,10 @@ class NodeDB
*/
void updatePosition(uint32_t nodeId, const Position &p, RxSource src = RX_SRC_RADIO);
/** Update telemetry info for this node based on received metrics
*/
void updateTelemetry(uint32_t nodeId, const Telemetry &t, RxSource src = RX_SRC_RADIO);
/** Update user info for this node based on received user data
*/
void updateUser(uint32_t nodeId, const User &p);
@@ -164,6 +168,7 @@ extern NodeDB nodeDB;
PREF_GET(send_owner_interval, IF_ROUTER(2, 4))
PREF_GET(position_broadcast_secs, IF_ROUTER(12 * 60 * 60, 15 * 60))
PREF_GET(telemetry_module_update_interval, 2 * 60)
// Each time we wake into the DARK state allow 1 minute to send and receive BLE packets to the phone
PREF_GET(wait_bluetooth_secs, IF_ROUTER(1, 60))