If a component wires its Init.init() via SoftwareInit and ncc calls
StateImplP.Init.init() after the component's Init.init(), any change to its
StateC, such as call State.forceState(), is undone. The easy fix is to remove
the extra initiation of state[] in StateImplP.Init.init(), since state[] is a
static and is guaranteed to have members with value zero (S_IDLE).
/***************** Init Commands ****************/
command error_t Init.init() {
- int i;
- for(i = 0; i < uniqueCount(UQ_STATE); i++) {
- state[i] = S_IDLE;
- }
return SUCCESS;
}