Skip to content

Commit c270bea

Browse files
committed
bugfix
1 parent dfbc9e4 commit c270bea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

greenwave_monitor/greenwave_monitor/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def find_best_diagnostic(
178178
"""Find the diagnostic message with frequency closest to expected."""
179179
best_status = None
180180
best_values = None
181-
best_diff = None
181+
best_diff = float('inf')
182182

183183
for status in diagnostics:
184184
node_str = None

greenwave_monitor/include/message_diagnostics.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class MessageDiagnostics
100100
prev_timestamp_node_us_ = std::numeric_limits<uint64_t>::min();
101101
prev_timestamp_msg_us_ = std::numeric_limits<uint64_t>::min();
102102
num_non_increasing_msg_ = 0;
103-
message_latency_msg_ms_ = std::numeric_limits<double>::quiet_NaN();
103+
message_latency_msg_ms_ = 0;
104104
outdated_msg_ = true;
105105

106106
diagnostic_publisher_ =

0 commit comments

Comments
 (0)