Skip to content

Commit

Permalink
[VT]: Fix parsing client commands to change a soft key mask
Browse files Browse the repository at this point in the history
Also clarified one log statement
  • Loading branch information
ad3154 committed Oct 10, 2024
1 parent 4ae8f1f commit 9c578cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions isobus/src/isobus_virtual_terminal_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ namespace isobus
CANStackLogger::info("[VT Server]: Client %u initiated working set maintenance messages with version %u", managedWorkingSetList.back()->get_control_function()->get_address(), data[2]);
if (data[2] > get_vt_version_byte(get_version()))
{
CANStackLogger::warn("[VT Server]: Client %u version %u is not supported", managedWorkingSetList.back()->get_control_function()->get_address(), data[2]);
CANStackLogger::warn("[VT Server]: Client %u version %u is higher than our reported version, which is %u", managedWorkingSetList.back()->get_control_function()->get_address(), data[2], get_vt_version_byte(get_version()));
}
managedWorkingSetList.back()->set_working_set_maintenance_message_timestamp_ms(SystemTiming::get_timestamp_ms());
}
Expand Down Expand Up @@ -1326,8 +1326,8 @@ namespace isobus

case Function::ChangeSoftKeyMaskCommand:
{
auto objectID = static_cast<std::uint16_t>(static_cast<std::uint16_t>(data[1]) | (static_cast<std::uint16_t>(data[2]) << 8));
auto newObjectID = static_cast<std::uint16_t>(static_cast<std::uint16_t>(data[3]) | (static_cast<std::uint16_t>(data[4]) << 8));
auto objectID = static_cast<std::uint16_t>(static_cast<std::uint16_t>(data[2]) | (static_cast<std::uint16_t>(data[3]) << 8));
auto newObjectID = static_cast<std::uint16_t>(static_cast<std::uint16_t>(data[4]) | (static_cast<std::uint16_t>(data[5]) << 8));
auto targetObject = cf->get_object_by_id(objectID);
auto newObject = cf->get_object_by_id(newObjectID);

Expand Down

0 comments on commit 9c578cb

Please sign in to comment.