Skip to content

Instantly share code, notes, and snippets.

@dheeptuck
Last active June 19, 2019 18:12
Show Gist options
  • Save dheeptuck/c0623ce922147bb100e8de84e96f2e7a to your computer and use it in GitHub Desktop.
Save dheeptuck/c0623ce922147bb100e8de84e96f2e7a to your computer and use it in GitHub Desktop.
void stateIdle();
void stateCrushBean();
void stateHeatMilk();
void stateMixWater();
void stateDispenseCofee();
void stateError();  
void stateCrushBean(void)
{
if(bIsStateFirstEntry)
{
/// Do stuff for first entry(state initialization stuff)
/// TurnHeaterOn();
}
if(bIsStateAboutToExit)
{
/// Handle exit(i.e free up resources)
/// TurnHeaterOff();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment