set rx_time in packets

This commit is contained in:
geeksville 2020-02-12 14:18:43 -08:00
parent e79c49d100
commit 53cc8f9da3
3 changed files with 11 additions and 7 deletions

View File

@ -1,13 +1,15 @@
# 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)
* show real text info on the text screen
* update build to generate both board types
* retest BLE software update for both board types
* turn on screen when a new update arrives
# Medium priority
* answer to pings with our latest location
* show radio and gps signal strength as an image
* 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.

View File

@ -81,6 +81,8 @@ void MeshService::handleFromRadio()
uint32_t oldFromNum = fromNum;
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)
{
bool wasBroadcast = mp->to == NODENUM_BROADCAST;

View File

@ -112,7 +112,7 @@ typedef struct _MeshPacket {
int32_t to;
bool has_payload;
SubPacket payload;
uint64_t rx_time;
uint32_t rx_time;
} MeshPacket;
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, to, 2) \
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_DEFAULT NULL
#define MeshPacket_payload_MSGTYPE SubPacket
@ -387,15 +387,15 @@ extern const pb_msgdesc_t ToRadio_msg;
#define Data_size 205
#define User_size 72
#define SubPacket_size 208
#define MeshPacket_size 244
#define MeshPacket_size 239
#define ChannelSettings_size 50
#define RadioConfig_size 72
#define RadioConfig_UserPreferences_size 18
#define NodeInfo_size 157
#define MyNodeInfo_size 13
#define DeviceState_size 13189
#define FromRadio_size 253
#define ToRadio_size 247
#define DeviceState_size 13029
#define FromRadio_size 248
#define ToRadio_size 242
#ifdef __cplusplus
} /* extern "C" */