Skip to content

Commit d415acf

Browse files
committed
RemoteControl: If line sensor calibration is not pending, set the state machine to the line sensor calibration state.
1 parent d33a22c commit d415acf

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

lib/APPRemoteControl/src/App.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,16 @@ void App::handleRemoteCommand(const Command& cmd)
233233
break;
234234

235235
case SMPChannelPayload::CmdId::CMD_ID_START_LINE_SENSOR_CALIB:
236-
rsp.responseId = SMPChannelPayload::RSP_ID_PENDING;
237-
m_isLineSensorCalibPending = true;
238-
m_systemStateMachine.setState(&LineSensorsCalibrationState::getInstance());
236+
rsp.responseId = SMPChannelPayload::RSP_ID_PENDING;
237+
238+
/* If line sensor calibration is not pending, set the state machine to the
239+
* line sensor calibration state.
240+
*/
241+
if (false == m_isLineSensorCalibPending)
242+
{
243+
m_isLineSensorCalibPending = true;
244+
m_systemStateMachine.setState(&LineSensorsCalibrationState::getInstance());
245+
}
239246
break;
240247

241248
case SMPChannelPayload::CmdId::CMD_ID_START_MOTOR_SPEED_CALIB:

0 commit comments

Comments
 (0)