From 86f40ae4eb39a420ef6a37c23d84a19f0a4f3e74 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 1 Aug 2019 12:31:12 +0200 Subject: [PATCH] Fix comparison sign --- .../gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc | 2 +- .../gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc index 8ec99b2c5..4ba01fc22 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc @@ -550,7 +550,7 @@ int beidou_b1i_telemetry_decoder_gs::general_work(int noutput_items __attribute_ flag_SOW_set = true; d_nav.flag_new_SOW_available = false; - if (last_d_TOW_at_current_symbol_ms != 0 and abs(static_cast(d_TOW_at_current_symbol_ms) - int64_t(last_d_TOW_at_current_symbol_ms)) > d_symbol_duration_ms) + if (last_d_TOW_at_current_symbol_ms != 0 and abs(static_cast(d_TOW_at_current_symbol_ms) - int64_t(last_d_TOW_at_current_symbol_ms)) > static_cast(d_symbol_duration_ms)) { LOG(INFO) << "Warning: BEIDOU B1I TOW update in ch " << d_channel << " does not match the TLM TOW counter " << static_cast(d_TOW_at_current_symbol_ms) - int64_t(last_d_TOW_at_current_symbol_ms) << " ms \n"; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.cc index ff04bdf59..e82779644 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.cc @@ -581,7 +581,7 @@ int beidou_b3i_telemetry_decoder_gs::general_work( flag_SOW_set = true; d_nav.flag_new_SOW_available = false; - if (last_d_TOW_at_current_symbol_ms != 0 and abs(static_cast(d_TOW_at_current_symbol_ms) - int64_t(last_d_TOW_at_current_symbol_ms)) > d_symbol_duration_ms) + if (last_d_TOW_at_current_symbol_ms != 0 and abs(static_cast(d_TOW_at_current_symbol_ms) - int64_t(last_d_TOW_at_current_symbol_ms)) > static_cast(d_symbol_duration_ms)) { LOG(INFO) << "Warning: BEIDOU B3I TOW update in ch " << d_channel << " does not match the TLM TOW counter " << static_cast(d_TOW_at_current_symbol_ms) - int64_t(last_d_TOW_at_current_symbol_ms) << " ms \n";