Skip to content

Commit

Permalink
fix(seeder-example): wrong function for number of machine selected sp…
Browse files Browse the repository at this point in the history
…eed messages

and fixed incorrect formatting specifiers in `isobus_virtual_terminal_client_update_helper.cpp`
  • Loading branch information
GwnDaan committed Jan 8, 2025
1 parent 4bfa092 commit cd0961d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/seeder_example/vt_application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ void SeederVtApplication::update()
VTClientUpdateHelper.set_numeric_value(tcSupportedSections_VarNum, TCClientInterface.get_connected_tc_number_sections_supported());
VTClientUpdateHelper.set_numeric_value(tcVersion_VarNum, static_cast<std::uint32_t>(TCClientInterface.get_connected_tc_version()));

if ((0 == speedMessages.get_number_received_machine_selected_speed_command_sources()) &&
if ((0 == speedMessages.get_number_received_machine_selected_speed_sources()) &&
(0 == speedMessages.get_number_received_ground_based_speed_sources()) &&
(0 == speedMessages.get_number_received_wheel_based_speed_sources()))
{
Expand Down Expand Up @@ -688,7 +688,7 @@ void SeederVtApplication::update_alarms()
if (VTClientInterface->get_is_connected() && VTClientUpdateHelper.get_numeric_value(enableAlarms_VarNum))
{
// Check if we have a speed source
if ((0 == speedMessages.get_number_received_machine_selected_speed_command_sources()) &&
if ((0 == speedMessages.get_number_received_machine_selected_speed_sources()) &&
(0 == speedMessages.get_number_received_ground_based_speed_sources()) &&
(0 == speedMessages.get_number_received_wheel_based_speed_sources()))
{
Expand Down
8 changes: 4 additions & 4 deletions isobus/src/isobus_virtual_terminal_client_update_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace isobus
}
if (numericValueStates.find(object_id) == numericValueStates.end())
{
LOG_WARNING("[VTStateHelper] set_numeric_value: objectId %lu not tracked", object_id);
LOG_WARNING("[VTStateHelper] set_numeric_value: objectId %hu not tracked", object_id);
return false;
}
if (numericValueStates.at(object_id) == value)
Expand Down Expand Up @@ -127,7 +127,7 @@ namespace isobus
}
if (softKeyMasks.find(maskId) == softKeyMasks.end())
{
LOG_WARNING("[VTStateHelper] set_active_soft_key_mask: data/alarm mask '%lu' not tracked", maskId);
LOG_WARNING("[VTStateHelper] set_active_soft_key_mask: data/alarm mask '%hu' not tracked", maskId);
return false;
}
if (softKeyMasks.at(maskId) == softKeyMaskId)
Expand All @@ -152,12 +152,12 @@ namespace isobus
}
if (attributeStates.find(objectId) == attributeStates.end())
{
LOG_ERROR("[VTStateHelper] set_attribute: objectId %lu not tracked", objectId);
LOG_ERROR("[VTStateHelper] set_attribute: objectId %hu not tracked", objectId);
return false;
}
if (attributeStates.at(objectId).find(attribute) == attributeStates.at(objectId).end())
{
LOG_WARNING("[VTStateHelper] set_attribute: attribute %lu of objectId %lu not tracked", attribute, objectId);
LOG_WARNING("[VTStateHelper] set_attribute: attribute %hhu of objectId %hu not tracked", attribute, objectId);
return false;
}
if (attributeStates.at(objectId).at(attribute) == value)
Expand Down

0 comments on commit cd0961d

Please sign in to comment.