mirror of
https://github.com/meshtastic/firmware.git
synced 2025-07-31 02:45:41 +00:00
set rx_time in packets
This commit is contained in:
parent
e79c49d100
commit
53cc8f9da3
4
TODO.md
4
TODO.md
@ -1,13 +1,15 @@
|
|||||||
# High priority
|
# High priority
|
||||||
|
|
||||||
* have node info screen show real info (including time since last contact, distance and heading)
|
* have node info screen show real info (including distance and heading)
|
||||||
* make debug info screen show real data (including battery level & charging)
|
* make debug info screen show real data (including battery level & charging)
|
||||||
* show real text info on the text screen
|
* show real text info on the text screen
|
||||||
|
* update build to generate both board types
|
||||||
* retest BLE software update for both board types
|
* retest BLE software update for both board types
|
||||||
* turn on screen when a new update arrives
|
* turn on screen when a new update arrives
|
||||||
|
|
||||||
# Medium priority
|
# Medium priority
|
||||||
|
|
||||||
|
* answer to pings with our latest location
|
||||||
* show radio and gps signal strength as an image
|
* show radio and gps signal strength as an image
|
||||||
* apply radio settings from android land
|
* apply radio settings from android land
|
||||||
* only BLE advertise for a short time after the screen is on and button pressed - to save power and prevent people for sniffing for our BT app.
|
* only BLE advertise for a short time after the screen is on and button pressed - to save power and prevent people for sniffing for our BT app.
|
||||||
|
@ -81,6 +81,8 @@ void MeshService::handleFromRadio()
|
|||||||
uint32_t oldFromNum = fromNum;
|
uint32_t oldFromNum = fromNum;
|
||||||
while ((mp = fromRadioQueue.dequeuePtr(0)) != NULL)
|
while ((mp = fromRadioQueue.dequeuePtr(0)) != NULL)
|
||||||
{
|
{
|
||||||
|
mp->rx_time = gps.getTime() / 1000; // store the arrival timestamp for the phone
|
||||||
|
|
||||||
if (mp->has_payload && mp->payload.which_variant == SubPacket_user_tag)
|
if (mp->has_payload && mp->payload.which_variant == SubPacket_user_tag)
|
||||||
{
|
{
|
||||||
bool wasBroadcast = mp->to == NODENUM_BROADCAST;
|
bool wasBroadcast = mp->to == NODENUM_BROADCAST;
|
||||||
|
@ -112,7 +112,7 @@ typedef struct _MeshPacket {
|
|||||||
int32_t to;
|
int32_t to;
|
||||||
bool has_payload;
|
bool has_payload;
|
||||||
SubPacket payload;
|
SubPacket payload;
|
||||||
uint64_t rx_time;
|
uint32_t rx_time;
|
||||||
} MeshPacket;
|
} MeshPacket;
|
||||||
|
|
||||||
typedef struct _DeviceState {
|
typedef struct _DeviceState {
|
||||||
@ -277,7 +277,7 @@ X(a, STATIC, ONEOF, MESSAGE, (variant,user,variant.user), 4)
|
|||||||
X(a, STATIC, SINGULAR, INT32, from, 1) \
|
X(a, STATIC, SINGULAR, INT32, from, 1) \
|
||||||
X(a, STATIC, SINGULAR, INT32, to, 2) \
|
X(a, STATIC, SINGULAR, INT32, to, 2) \
|
||||||
X(a, STATIC, OPTIONAL, MESSAGE, payload, 3) \
|
X(a, STATIC, OPTIONAL, MESSAGE, payload, 3) \
|
||||||
X(a, STATIC, SINGULAR, UINT64, rx_time, 4)
|
X(a, STATIC, SINGULAR, UINT32, rx_time, 4)
|
||||||
#define MeshPacket_CALLBACK NULL
|
#define MeshPacket_CALLBACK NULL
|
||||||
#define MeshPacket_DEFAULT NULL
|
#define MeshPacket_DEFAULT NULL
|
||||||
#define MeshPacket_payload_MSGTYPE SubPacket
|
#define MeshPacket_payload_MSGTYPE SubPacket
|
||||||
@ -387,15 +387,15 @@ extern const pb_msgdesc_t ToRadio_msg;
|
|||||||
#define Data_size 205
|
#define Data_size 205
|
||||||
#define User_size 72
|
#define User_size 72
|
||||||
#define SubPacket_size 208
|
#define SubPacket_size 208
|
||||||
#define MeshPacket_size 244
|
#define MeshPacket_size 239
|
||||||
#define ChannelSettings_size 50
|
#define ChannelSettings_size 50
|
||||||
#define RadioConfig_size 72
|
#define RadioConfig_size 72
|
||||||
#define RadioConfig_UserPreferences_size 18
|
#define RadioConfig_UserPreferences_size 18
|
||||||
#define NodeInfo_size 157
|
#define NodeInfo_size 157
|
||||||
#define MyNodeInfo_size 13
|
#define MyNodeInfo_size 13
|
||||||
#define DeviceState_size 13189
|
#define DeviceState_size 13029
|
||||||
#define FromRadio_size 253
|
#define FromRadio_size 248
|
||||||
#define ToRadio_size 247
|
#define ToRadio_size 242
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
|
Loading…
Reference in New Issue
Block a user