From 3578a9b28b65b146089f58656874ba01adb28a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Emin=20BA=C5=9EO=C4=9ELU?= Date: Wed, 13 Dec 2023 12:27:39 +0300 Subject: [PATCH 1/2] fix(robosense): use correct field to check time sync status --- .../nebula_decoders_robosense/decoders/bpearl_v3.hpp | 12 +++++------- .../nebula_decoders_robosense/decoders/bpearl_v4.hpp | 12 +++++------- .../nebula_decoders_robosense/decoders/helios.hpp | 12 +++++------- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/bpearl_v3.hpp b/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/bpearl_v3.hpp index a54c52bd6..92e58e304 100644 --- a/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/bpearl_v3.hpp +++ b/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/bpearl_v3.hpp @@ -269,14 +269,12 @@ class BpearlV3 : public RobosenseSensor< bool getSyncStatus(const robosense_packet::bpearl_v3::InfoPacket & info_packet) { - switch (info_packet.time_sync_mode.value()) { - case SYNC_MODE_GPS_FLAG: - return true; - case SYNC_MODE_E2E_FLAG: - return true; - case SYNC_MODE_P2P_FLAG: + switch (info_packet.sync_status.value()) { + case SYNC_STATUS_INVALID_FLAG: + return false; + case SYNC_STATUS_GPS_SUCCESS_FLAG: return true; - case SYNC_MODE_GPTP_FLAG: + case SYNC_STATUS_PTP_SUCCESS_FLAG: return true; default: return false; diff --git a/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/bpearl_v4.hpp b/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/bpearl_v4.hpp index 80b0c35ec..681ad2ba2 100644 --- a/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/bpearl_v4.hpp +++ b/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/bpearl_v4.hpp @@ -241,14 +241,12 @@ class BpearlV4 : public RobosenseSensor< bool getSyncStatus(const robosense_packet::bpearl_v4::InfoPacket & info_packet) { - switch (info_packet.time_sync_mode.value()) { - case SYNC_MODE_GPS_FLAG: - return true; - case SYNC_MODE_E2E_FLAG: - return true; - case SYNC_MODE_P2P_FLAG: + switch (info_packet.time_sync_state.value()) { + case SYNC_STATUS_INVALID_FLAG: + return false; + case SYNC_STATUS_GPS_SUCCESS_FLAG: return true; - case SYNC_MODE_GPTP_FLAG: + case SYNC_STATUS_PTP_SUCCESS_FLAG: return true; default: return false; diff --git a/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/helios.hpp b/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/helios.hpp index 8ade0f893..0780e3c24 100644 --- a/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/helios.hpp +++ b/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/helios.hpp @@ -280,14 +280,12 @@ class Helios bool getSyncStatus(const robosense_packet::helios::InfoPacket & info_packet) { - switch (info_packet.time_sync_mode.value()) { - case SYNC_MODE_GPS_FLAG: - return true; - case SYNC_MODE_E2E_FLAG: - return true; - case SYNC_MODE_P2P_FLAG: + switch (info_packet.sync_status.value()) { + case SYNC_STATUS_INVALID_FLAG: + return false; + case SYNC_STATUS_GPS_SUCCESS_FLAG: return true; - case SYNC_MODE_GPTP_FLAG: + case SYNC_STATUS_PTP_SUCCESS_FLAG: return true; default: return false; From a3da6b8ed9c64374c490a4d34e8a8102cfb518f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Emin=20BA=C5=9EO=C4=9ELU?= Date: Thu, 14 Dec 2023 17:33:14 +0300 Subject: [PATCH 2/2] chore(.cspell.json): add new word for robosense --- .cspell.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.cspell.json b/.cspell.json index e2b0768d9..3574bbfd3 100644 --- a/.cspell.json +++ b/.cspell.json @@ -38,6 +38,7 @@ "Difop", "gptp", "Idat", - "Vdat" + "Vdat", + "manc" ] }