Skip to content

Commit 778ad16

Browse files
authored
msg: GpsDump: queue 8->16 and add device_id (#26091)
* msg: GpsDump: increase queue from 8 to 16 and replace instance with device_id * gps: add back instance
1 parent 8393f46 commit 778ad16

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

msg/GpsDump.msg

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
uint64 timestamp # time since system start (microseconds)
44

5+
uint8 INSTANCE_MAIN = 0
6+
uint8 INSTANCE_SECONDARY = 1
7+
58
uint8 instance # Instance of GNSS receiver
9+
uint32 device_id
610
uint8 len # length of data, MSB bit set = message to the gps device,
711
# clear = message from the device
812
uint8[79] data # data to write to the log
913

10-
uint8 ORB_QUEUE_LENGTH = 8
14+
uint8 ORB_QUEUE_LENGTH = 16

src/drivers/gnss/septentrio/septentrio.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1728,7 +1728,8 @@ void SeptentrioDriver::publish_rtcm_corrections(uint8_t *data, size_t len)
17281728
void SeptentrioDriver::dump_gps_data(const uint8_t *data, size_t len, DataDirection data_direction)
17291729
{
17301730
gps_dump_s *dump_data = data_direction == DataDirection::FromReceiver ? _message_data_from_receiver : _message_data_to_receiver;
1731-
dump_data->instance = _instance == Instance::Main ? 0 : 1;
1731+
dump_data->instance = _instance == Instance::Main ? gps_dump_s::INSTANCE_MAIN : gps_dump_s::INSTANCE_SECONDARY;
1732+
dump_data->device_id = get_device_id();
17321733

17331734
while (len > 0) {
17341735
size_t write_len = len;

src/drivers/gps/gps.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,7 @@ void GPS::dumpGpsData(uint8_t *data, size_t len, gps_dump_comm_mode_t mode, bool
696696
}
697697

698698
dump_data->instance = (uint8_t)_instance;
699+
dump_data->device_id = get_device_id();
699700

700701
while (len > 0) {
701702
size_t write_len = len;

0 commit comments

Comments
 (0)