mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-01 17:29:35 +00:00
populate position.time for broadcast positions
This commit is contained in:
parent
78f2c656d0
commit
1e3b037fea
@ -4,9 +4,13 @@ You probably don't care about this section - skip to the next one.
|
|||||||
|
|
||||||
## before next release
|
## before next release
|
||||||
|
|
||||||
* split position.time and last_heard
|
* DONE have android fill in if local GPS has poor signal
|
||||||
* update android app to use last_heard
|
* release
|
||||||
* have android fill in if local GPS has poor signal
|
* fix heltec battery scaling
|
||||||
|
* add reference counting to mesh packets
|
||||||
|
* allow multiple simultanteous phoneapi connections
|
||||||
|
* DONE split position.time and last_heard
|
||||||
|
* DONE update android app to use last_heard
|
||||||
* DONE turn off bluetooth interface ENTIRELY while using serial API (was python client times out on connect sometimes)
|
* DONE turn off bluetooth interface ENTIRELY while using serial API (was python client times out on connect sometimes)
|
||||||
* DONE gps assistance from phone not working?
|
* DONE gps assistance from phone not working?
|
||||||
* DONE test latest firmware update with is_router
|
* DONE test latest firmware update with is_router
|
||||||
|
@ -197,10 +197,13 @@ NodeInfo *MeshService::refreshMyNodeInfo()
|
|||||||
|
|
||||||
Position &position = node->position;
|
Position &position = node->position;
|
||||||
|
|
||||||
// Update our local node info with our position (even if we don't decide to update anyone else)
|
// Update our local node info with our time (even if we don't decide to update anyone else)
|
||||||
node->last_heard =
|
node->last_heard =
|
||||||
getValidTime(RTCQualityFromNet); // This nodedb timestamp might be stale, so update it if our clock is kinda valid
|
getValidTime(RTCQualityFromNet); // This nodedb timestamp might be stale, so update it if our clock is kinda valid
|
||||||
|
|
||||||
|
// For the time in the position field, only set that if we have a real GPS clock
|
||||||
|
position.time = getValidTime(RTCQualityGPS);
|
||||||
|
|
||||||
position.battery_level = powerStatus->getBatteryChargePercent();
|
position.battery_level = powerStatus->getBatteryChargePercent();
|
||||||
updateBatteryLevel(position.battery_level);
|
updateBatteryLevel(position.battery_level);
|
||||||
|
|
||||||
|
@ -10,10 +10,8 @@ PositionPlugin *positionPlugin;
|
|||||||
PositionPlugin::PositionPlugin()
|
PositionPlugin::PositionPlugin()
|
||||||
: ProtobufPlugin("position", PortNum_POSITION_APP, Position_fields), concurrency::OSThread("PositionPlugin")
|
: ProtobufPlugin("position", PortNum_POSITION_APP, Position_fields), concurrency::OSThread("PositionPlugin")
|
||||||
{
|
{
|
||||||
isPromiscuous = true; // We always want to update our nodedb, even if we are sniffing on others
|
isPromiscuous = true; // We always want to update our nodedb, even if we are sniffing on others
|
||||||
setIntervalFromNow(60 *
|
setIntervalFromNow(60 * 1000); // Send our initial position 60 seconds after we start (to give GPS time to setup)
|
||||||
1000); // Send our initial position 60 seconds after we start (to give GPS time to setup)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PositionPlugin::handleReceivedProtobuf(const MeshPacket &mp, const Position *pptr)
|
bool PositionPlugin::handleReceivedProtobuf(const MeshPacket &mp, const Position *pptr)
|
||||||
|
Loading…
Reference in New Issue
Block a user