MCPcopy Create free account
hub / github.com/BlueAndi/Pixelix / executeAction

Method executeAction

src/ButtonHandler/ButtonActions.cpp:70–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68 *****************************************************************************/
69
70void ButtonActions::executeAction(ButtonActionId id, bool firstTime)
71{
72 switch (id)
73 {
74 case BUTTON_ACTION_ID_NO_ACTION:
75 /* Nothing to do. */
76 break;
77
78 case BUTTON_ACTION_ID_ACTIVATE_NEXT_SLOT:
79 nextSlot();
80 break;
81
82 case BUTTON_ACTION_ID_ACTIVATE_PREV_SLOT:
83 previousSlot();
84 break;
85
86 case BUTTON_ACTION_ID_NEXT_FADE_EFFECT:
87 nextFadeEffect();
88 break;
89
90 case BUTTON_ACTION_ID_SHOW_IP_ADDRESS:
91 /* Show once and avoid cylic flickering of the text. */
92 if (true == firstTime)
93 {
94 showIpAddress();
95 }
96 break;
97
98 case BUTTON_ACTION_ID_TOGGLE_DISPLAY_OFF_ON:
99 /* Toggle once to avoid cyclic on/off. */
100 if (true == firstTime)
101 {
102 toggleDisplayOffOn();
103 }
104 break;
105
106 case BUTTON_ACTION_ID_SWEEP_BRIGHTNESS:
107 sweepBrightness();
108 break;
109
110 case BUTTON_ACTION_ID_INC_BRIGHTNESS:
111 increaseBrightness();
112 break;
113
114 case BUTTON_ACTION_ID_DEC_BRIGHTNESS:
115 decreaseBrightness();
116 break;
117
118 default:
119 break;
120 }
121}
122
123/******************************************************************************
124 * Private Methods

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected