Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Led_Init() never called upon initialization #1

Open
faststoff opened this issue Mar 18, 2018 · 0 comments
Open

Led_Init() never called upon initialization #1

faststoff opened this issue Mar 18, 2018 · 0 comments

Comments

@faststoff
Copy link

faststoff commented Mar 18, 2018

StateMachine_Init() should ensure the function associated with the initialization state (ie. Led_Init()) get called. Now, the first function which gets called is the Led_Idle() function. Suggested change:

void StateMachine_Init(stateMachine_t * stateMachine) {
    printf("Initialising state machine.\r\n");
    stateMachine->currState = ST_INIT;
   (stateFunctionA[stateMachine->currState].func)(); //call initialization function
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant