mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-02-06 03:13:00 +08:00
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
This commit is contained in:
@@ -2,9 +2,13 @@
|
||||
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
uint8 INSTANCE_MAIN = 0
|
||||
uint8 INSTANCE_SECONDARY = 1
|
||||
|
||||
uint8 instance # Instance of GNSS receiver
|
||||
uint32 device_id
|
||||
uint8 len # length of data, MSB bit set = message to the gps device,
|
||||
# clear = message from the device
|
||||
uint8[79] data # data to write to the log
|
||||
|
||||
uint8 ORB_QUEUE_LENGTH = 8
|
||||
uint8 ORB_QUEUE_LENGTH = 16
|
||||
|
||||
@@ -1728,7 +1728,8 @@ void SeptentrioDriver::publish_rtcm_corrections(uint8_t *data, size_t len)
|
||||
void SeptentrioDriver::dump_gps_data(const uint8_t *data, size_t len, DataDirection data_direction)
|
||||
{
|
||||
gps_dump_s *dump_data = data_direction == DataDirection::FromReceiver ? _message_data_from_receiver : _message_data_to_receiver;
|
||||
dump_data->instance = _instance == Instance::Main ? 0 : 1;
|
||||
dump_data->instance = _instance == Instance::Main ? gps_dump_s::INSTANCE_MAIN : gps_dump_s::INSTANCE_SECONDARY;
|
||||
dump_data->device_id = get_device_id();
|
||||
|
||||
while (len > 0) {
|
||||
size_t write_len = len;
|
||||
|
||||
@@ -696,6 +696,7 @@ void GPS::dumpGpsData(uint8_t *data, size_t len, gps_dump_comm_mode_t mode, bool
|
||||
}
|
||||
|
||||
dump_data->instance = (uint8_t)_instance;
|
||||
dump_data->device_id = get_device_id();
|
||||
|
||||
while (len > 0) {
|
||||
size_t write_len = len;
|
||||
|
||||
Reference in New Issue
Block a user