Skip to content

Commit

Permalink
Removed unnecessary method
Browse files Browse the repository at this point in the history
  • Loading branch information
gabryelreyes committed Sep 2, 2024
1 parent 383da2f commit bd17b73
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
5 changes: 0 additions & 5 deletions lib/APPRemoteControl/src/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,6 @@ void App::handleRemoteCommand(const Command& cmd)
Odometry::getInstance().clearMileage();
Odometry::getInstance().setPosition(cmd.xPos, cmd.yPos);
Odometry::getInstance().setOrientation(cmd.orientation);

StartupState::getInstance().notifyInitialDataIsSet();
break;

default:
Expand Down Expand Up @@ -411,8 +409,5 @@ void App_turtleChannelCallback(const uint8_t* payload, const uint8_t payloadSize

/* Angular speed is set on-top of the linear speed. Must be called after setLinearSpeed(). */
diffDrive.setAngularSpeed(angularSpeed);

/* Turtle expects no initial data. Can be called without side-effects when no longer in StartupState. */
StartupState::getInstance().notifyInitialDataIsSet();
}
}
2 changes: 1 addition & 1 deletion lib/APPRemoteControl/src/StartupState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void StartupState::process(StateMachine& sm)
ErrorState::getInstance().setErrorMsg("MCAL=0");
sm.setState(&ErrorState::getInstance());
}
else if (true == m_initialDataSet)
else
{
sm.setState(&DrivingState::getInstance());
}
Expand Down
15 changes: 1 addition & 14 deletions lib/APPRemoteControl/src/StartupState.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,30 +89,17 @@ class StartupState : public IState
*/
void exit() final;

/**
* Notify the state, that the initial data set was received.
*/
void notifyInitialDataIsSet()
{
m_initialDataSet = true;
}

protected:
private:
/**
* Duration in ms how long the application name shall be shown at startup.
*/
static const uint32_t APP_NAME_DURATION = 2000U;

/**
* Flag to indicate, that the initial data was set.
*/
bool m_initialDataSet;

/**
* Default constructor.
*/
StartupState() : m_initialDataSet(false)
StartupState()
{
}

Expand Down

0 comments on commit bd17b73

Please sign in to comment.