From 9c578cb34348d0d6a04acce22be82229c3b3b6fa Mon Sep 17 00:00:00 2001 From: Adrian Del Grosso <10929341+ad3154@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:58:10 -0600 Subject: [PATCH] [VT]: Fix parsing client commands to change a soft key mask Also clarified one log statement --- isobus/src/isobus_virtual_terminal_server.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/isobus/src/isobus_virtual_terminal_server.cpp b/isobus/src/isobus_virtual_terminal_server.cpp index 0464c3f1..131c081e 100644 --- a/isobus/src/isobus_virtual_terminal_server.cpp +++ b/isobus/src/isobus_virtual_terminal_server.cpp @@ -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()); } @@ -1326,8 +1326,8 @@ namespace isobus case Function::ChangeSoftKeyMaskCommand: { - auto objectID = static_cast(static_cast(data[1]) | (static_cast(data[2]) << 8)); - auto newObjectID = static_cast(static_cast(data[3]) | (static_cast(data[4]) << 8)); + auto objectID = static_cast(static_cast(data[2]) | (static_cast(data[3]) << 8)); + auto newObjectID = static_cast(static_cast(data[4]) | (static_cast(data[5]) << 8)); auto targetObject = cf->get_object_by_id(objectID); auto newObject = cf->get_object_by_id(newObjectID);