@@ -189,7 +189,7 @@ TEST(SPEED_MESSAGE_TESTS, SpeedMessages)
189189 (static_cast <std::uint16_t >(testFrame.data [5 ]) << 24 ));
190190 EXPECT_EQ (123456 , decodedDistance_mm);
191191 EXPECT_EQ (testFrame.data [6 ] & 0x3F , 15 ); // Reason == 15?
192- EXPECT_EQ (testFrame.data [7 ] & 0x03 , 0 ); // Direction == forward?
192+ EXPECT_EQ (testFrame.data [7 ] & 0x03 , 1 ); // Direction == forward?
193193 EXPECT_EQ ((testFrame.data [7 ] >> 2 ) & 0x07 , 2 ); // Source == navigation?
194194 EXPECT_EQ ((testFrame.data [7 ] >> 5 ) & 0x07 , 3 ); // low limited?
195195
@@ -240,7 +240,7 @@ TEST(SPEED_MESSAGE_TESTS, SpeedMessages)
240240 (static_cast <std::uint16_t >(testFrame.data [5 ]) << 24 ));
241241 EXPECT_EQ (5000 , decodedDistance_mm);
242242 EXPECT_EQ (3 , testFrame.data [6 ]);
243- EXPECT_EQ (testFrame.data [7 ] & 0x03 , 1 ); // Direction == reverse?
243+ EXPECT_EQ (testFrame.data [7 ] & 0x03 , 0 ); // Direction == reverse?
244244 EXPECT_EQ ((testFrame.data [7 ] >> 2 ) & 0x03 , 1 ); // Key not off?
245245 EXPECT_EQ ((testFrame.data [7 ] >> 4 ) & 0x03 , 1 ); // Implement operations permitted?
246246 EXPECT_EQ ((testFrame.data [7 ] >> 6 ) & 0x03 , 0 ); // Not reversed?
@@ -296,11 +296,11 @@ TEST(SPEED_MESSAGE_TESTS, SpeedMessages)
296296
297297 interfaceUnderTest.machineSelectedSpeedCommandTransmitData .set_machine_selected_speed_setpoint_limit (12345 );
298298 interfaceUnderTest.machineSelectedSpeedCommandTransmitData .set_machine_speed_setpoint_command (56789 );
299- interfaceUnderTest.machineSelectedSpeedCommandTransmitData .set_machine_direction_of_travel (SpeedMessagesInterface::MachineDirection::Reverse );
299+ interfaceUnderTest.machineSelectedSpeedCommandTransmitData .set_machine_direction_of_travel (SpeedMessagesInterface::MachineDirection::Forward );
300300
301301 EXPECT_EQ (12345 , interfaceUnderTest.machineSelectedSpeedCommandTransmitData .get_machine_selected_speed_setpoint_limit ());
302302 EXPECT_EQ (56789 , interfaceUnderTest.machineSelectedSpeedCommandTransmitData .get_machine_speed_setpoint_command ());
303- EXPECT_EQ (SpeedMessagesInterface::MachineDirection::Reverse , interfaceUnderTest.machineSelectedSpeedCommandTransmitData .get_machine_direction_command ());
303+ EXPECT_EQ (SpeedMessagesInterface::MachineDirection::Forward , interfaceUnderTest.machineSelectedSpeedCommandTransmitData .get_machine_direction_command ());
304304
305305 ASSERT_FALSE (interfaceUnderTest.test_wrapper_send_ground_based_speed ());
306306 ASSERT_FALSE (interfaceUnderTest.test_wrapper_send_wheel_based_speed ());
@@ -420,7 +420,7 @@ TEST(SPEED_MESSAGE_TESTS, ListenOnlyModeAndDecoding)
420420 EXPECT_EQ (965742 , mss->get_machine_distance ());
421421 EXPECT_EQ (4000 , mss->get_machine_speed ());
422422 EXPECT_EQ (SpeedMessagesInterface::MachineSelectedSpeedData::LimitStatus::OperatorLimitedControlled, mss->get_limit_status ());
423- EXPECT_EQ (SpeedMessagesInterface::MachineDirection::Reverse , mss->get_machine_direction_of_travel ());
423+ EXPECT_EQ (SpeedMessagesInterface::MachineDirection::Forward , mss->get_machine_direction_of_travel ());
424424 EXPECT_EQ (SpeedMessagesInterface::MachineSelectedSpeedData::SpeedSource::GroundBasedSpeed, mss->get_speed_source ());
425425 EXPECT_NE (0 , mss->get_timestamp_ms ());
426426 }
@@ -460,7 +460,7 @@ TEST(SPEED_MESSAGE_TESTS, ListenOnlyModeAndDecoding)
460460 EXPECT_EQ (SpeedMessagesInterface::WheelBasedMachineSpeedData::ImplementStartStopOperations::StartEnableImplementOperations, wheelSpeed->get_implement_start_stop_operations_state ());
461461 EXPECT_EQ (SpeedMessagesInterface::WheelBasedMachineSpeedData::KeySwitchState::NotOff, wheelSpeed->get_key_switch_state ());
462462 EXPECT_EQ (SpeedMessagesInterface::WheelBasedMachineSpeedData::OperatorDirectionReversed::Reversed, wheelSpeed->get_operator_direction_reversed_state ());
463- EXPECT_EQ (SpeedMessagesInterface::MachineDirection::Reverse , wheelSpeed->get_machine_direction_of_travel ());
463+ EXPECT_EQ (SpeedMessagesInterface::MachineDirection::Forward , wheelSpeed->get_machine_direction_of_travel ());
464464 EXPECT_EQ (965742 , wheelSpeed->get_machine_distance ());
465465 EXPECT_EQ (4000 , wheelSpeed->get_machine_speed ());
466466 EXPECT_EQ (200 , wheelSpeed->get_maximum_time_of_tractor_power ());
@@ -480,7 +480,7 @@ TEST(SPEED_MESSAGE_TESTS, ListenOnlyModeAndDecoding)
480480 testFrame.data [4 ] = static_cast <std::uint8_t >((encodedDistance >> 16 ) & 0xFF );
481481 testFrame.data [5 ] = static_cast <std::uint8_t >((encodedDistance >> 24 ) & 0xFF );
482482 testFrame.data [6 ] = 0xFF ;
483- testFrame.data [7 ] = 0x01 ; // Reversed
483+ testFrame.data [7 ] = 0x01 ; // Forward
484484
485485 CANNetworkManager::CANNetwork.process_receive_can_message_frame (testFrame);
486486 CANNetworkManager::CANNetwork.update ();
@@ -500,7 +500,7 @@ TEST(SPEED_MESSAGE_TESTS, ListenOnlyModeAndDecoding)
500500
501501 EXPECT_EQ (965742 , groundSpeed->get_machine_distance ());
502502 EXPECT_EQ (4000 , groundSpeed->get_machine_speed ());
503- EXPECT_EQ (SpeedMessagesInterface::MachineDirection::Reverse , groundSpeed->get_machine_direction_of_travel ());
503+ EXPECT_EQ (SpeedMessagesInterface::MachineDirection::Forward , groundSpeed->get_machine_direction_of_travel ());
504504 EXPECT_NE (0 , groundSpeed->get_timestamp_ms ());
505505 }
506506
@@ -534,7 +534,7 @@ TEST(SPEED_MESSAGE_TESTS, ListenOnlyModeAndDecoding)
534534 ASSERT_NE (nullptr , command);
535535
536536 EXPECT_NE (0 , command->get_timestamp_ms ());
537- EXPECT_EQ (SpeedMessagesInterface::MachineDirection::Forward , command->get_machine_direction_command ());
537+ EXPECT_EQ (SpeedMessagesInterface::MachineDirection::Reverse , command->get_machine_direction_command ());
538538 EXPECT_EQ (5000 , command->get_machine_selected_speed_setpoint_limit ());
539539 EXPECT_EQ (4000 , command->get_machine_speed_setpoint_command ());
540540 EXPECT_NE (nullptr , command->get_sender_control_function ());
0 commit comments