aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/can/can-bus.cpp2
-rw-r--r--src/can/can-decoder.cpp6
-rw-r--r--src/can/can-message.cpp2
-rw-r--r--src/diagnostic/diagnostic-manager.cpp6
4 files changed, 5 insertions, 11 deletions
diff --git a/src/can/can-bus.cpp b/src/can/can-bus.cpp
index cfb9d86d..e799233a 100644
--- a/src/can/can-bus.cpp
+++ b/src/can/can-bus.cpp
@@ -246,7 +246,7 @@ int can_bus_t::init_can_dev()
}
}
- NOTICE(binder_interface, "Initialized %d/%d can bus device(s)", i, t);
+ NOTICE(binder_interface, "Initialized %d/%d can bus device(s)", i, (int)t);
return 0;
}
ERROR(binder_interface, "init_can_dev: Error at CAN device initialization. No devices read from configuration file. Did you specify canbus JSON object ?");
diff --git a/src/can/can-decoder.cpp b/src/can/can-decoder.cpp
index 467261af..8843059d 100644
--- a/src/can/can-decoder.cpp
+++ b/src/can/can-decoder.cpp
@@ -152,12 +152,6 @@ openxc_DynamicField decoder_t::stateDecoder(can_signal_t& signal,
openxc_DynamicField decoder_t::translateSignal(can_signal_t& signal, can_message_t& message,
const std::vector<can_signal_t>& signals)
{
- if(&signal == nullptr || &message == nullptr)
- {
- openxc_DynamicField ret = {0, openxc_DynamicField_Type_BOOL, 0, "", 0, 0, 0, 0};
- return ret;
- }
-
float value = decoder_t::parseSignalBitfield(signal, message);
DEBUG(binder_interface, "translateSignal: Decoded message from parseSignalBitfield: %f", value);
diff --git a/src/can/can-message.cpp b/src/can/can-message.cpp
index af0d3f38..f61de67e 100644
--- a/src/can/can-message.cpp
+++ b/src/can/can-message.cpp
@@ -234,7 +234,7 @@ can_message_t can_message_t::convert_from_canfd_frame(const struct canfd_frame&
};
DEBUG(binder_interface, "convert_from_canfd_frame: Found id: %X, format: %X, length: %X, data %02X%02X%02X%02X%02X%02X%02X%02X",
- id, format, length, data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7]);
+ id, (uint8_t)format, length, data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7]);
}
return can_message_t(maxdlen, id, length, format, rtr_flag, flags, data);
diff --git a/src/diagnostic/diagnostic-manager.cpp b/src/diagnostic/diagnostic-manager.cpp
index 6fd9c2c6..ffce4d07 100644
--- a/src/diagnostic/diagnostic-manager.cpp
+++ b/src/diagnostic/diagnostic-manager.cpp
@@ -272,13 +272,13 @@ bool diagnostic_manager_t::add_request(DiagnosticRequest* request, const std::st
find_and_erase(entry, non_recurring_requests_);
DEBUG(binder_interface, "Added one-time diagnostic request on bus %s: %s",
- bus_, request_string);
+ bus_.c_str(), request_string);
non_recurring_requests_.push_back(entry);
}
else
{
- WARNING(binder_interface, "There isn't enough request entry. Vector exhausted %d/%d", (int)non_recurring_requests_.size());
+ WARNING(binder_interface, "There isn't enough request entry. Vector exhausted %d/%d", (int)non_recurring_requests_.size(), MAX_SIMULTANEOUS_DIAG_REQUESTS);
non_recurring_requests_.resize(MAX_SIMULTANEOUS_DIAG_REQUESTS);
added = false;
}
@@ -288,7 +288,7 @@ bool diagnostic_manager_t::add_request(DiagnosticRequest* request, const std::st
bool diagnostic_manager_t::validate_optional_request_attributes(float frequencyHz)
{
if(frequencyHz > MAX_RECURRING_DIAGNOSTIC_FREQUENCY_HZ) {
- DEBUG(binder_interface, "Requested recurring diagnostic frequency %d is higher than maximum of %d",
+ DEBUG(binder_interface, "Requested recurring diagnostic frequency %lf is higher than maximum of %d",
frequencyHz, MAX_RECURRING_DIAGNOSTIC_FREQUENCY_HZ);
return false;
}