Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(robosense): use correct field to check time sync status #106

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"Difop",
"gptp",
"Idat",
"Vdat"
"Vdat",
"manc"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading