mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +00:00
Code duplication cleanup for smart position logic (#2840)
This commit is contained in:
@@ -46,6 +46,15 @@ class PositionModule : public ProtobufModule<meshtastic_Position>, private concu
|
||||
|
||||
/** Does our periodic broadcast */
|
||||
virtual int32_t runOnce() override;
|
||||
|
||||
private:
|
||||
struct SmartPosition getDistanceTraveledSinceLastSend(meshtastic_PositionLite currentPosition);
|
||||
};
|
||||
|
||||
struct SmartPosition {
|
||||
float distanceTraveled;
|
||||
uint32_t distanceThreshold;
|
||||
bool hasTraveledOverThreshold;
|
||||
};
|
||||
|
||||
extern PositionModule *positionModule;
|
||||
|
||||
Reference in New Issue
Block a user