Professional Documents
Culture Documents
Drum Led FSM
Drum Led FSM
0,
10,
14,
17,
20,
23,
26,
29,
30,
31 // 9th intensity
};
False otherwise
// --------------------------------------------------------------------
bool InitDRUM_LEDFSM(Priority)
set priority
post ES_INIT
}
// --------------------------------------------------------------------
False otherwise
// --------------------------------------------------------------------
bool PostDRUM_LEDFSM(ThisEvent)
// --------------------------------------------------------------------
Input: N/A
// --------------------------------------------------------------------
LEDFSMState_t QueryDRUM_LEDFSM
// --------------------------------------------------------------------
ES_Event_t RunDRUM_LEDFSM(ThisEvent)
case InitPState_Drums
if ES_INIT event
} break
case WelcomingState_Drums: {
switch(ThisEvent.EventType){
case ES_TIMEOUT: {
if LED_REFRESH_TIMER
else if FADE_TIMER
break
case ES_UPDATING_LED: {
break
case ES_IR_COVERED: {
break
break
case IRCoveredState_Drums: {
switch(ThisEvent.EventType){
case ES_UPDATING_LED: {
break
case ES_TIMEOUT: {
if FADE_TIMER
break
case ES_IR_UNCOVERED: {
break
case ES_ENTER_GAME: {
break
break
case PlayingState_Drums: {
switch(ThisEvent.EventType){
case ES_TIMEOUT: {
if INTERACTION_TIMER
else if NOTE_WINDOW_TIMER
break
break
case ES_HIT_INTENSITY_CORRECT_ONLY: {
light the left drum pink and with hit intensity bucket as the brightness
light the bottom drum pink and with hit intensity bucket as the brightness
break
case ES_ENTER_ZEN: {
break
case ES_UPDATING_LED: {
break
break
case ZenState_Drums: {
switch(ThisEvent.EventType){
case ES_UPDATING_LED: {
break;
case ES_TIMEOUT: {
if ZEN_TIMER
break
break
}
// --------------------------------------------------------------------
This function sets the color and intensity of a drum and updates it
Output: N/A
// --------------------------------------------------------------------
set all the LEDs on the passed drum to the passed color
// --------------------------------------------------------------------
False otherwise
// --------------------------------------------------------------------
bool Update_DrumIntensity(NewIntensity){
if invalid intensity