File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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:
You can’t perform that action at this time.
0 commit comments