Viking Skull Lamp  V1.0.1
Loading...
Searching...
No Matches
menu.cpp
Go to the documentation of this file.
1/*
2 * Created on May 28 2022
3 *
4 * Copyright (c) 2022 - Daniel Hajnal
5 * hajnal.daniel96@gmail.com
6 * This file is part of the Viking Skull Lamp project.
7 * Modified 2022.06.27
8*/
9
10/*
11MIT License
12Copyright (c) 2022 Daniel Hajnal
13Permission is hereby granted, free of charge, to any person obtaining a copy
14of this software and associated documentation files (the "Software"), to deal
15in the Software without restriction, including without limitation the rights
16to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17copies of the Software, and to permit persons to whom the Software is
18furnished to do so, subject to the following conditions:
19The above copyright notice and this permission notice shall be included in all
20copies or substantial portions of the Software.
21THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27SOFTWARE.
28*/
29
30#include "menu.hpp"
31
32const char fogTimer15minText[] PROGMEM = "15 min";
33const char fogTimer30minText[] PROGMEM = "30 min";
34const char fogTimer45minText[] PROGMEM = "45 min";
35const char fogTimer1hourText[] PROGMEM = "1 hour";
36const char fogTimer1p5hourText[] PROGMEM = "1.5 hour";
37const char fogTimer2hourText[] PROGMEM = "2 hour";
38const char fogTimer3hourText[] PROGMEM = "3 hour";
39const char fogTimer5hourText[] PROGMEM = "5 hour";
40const char fogTimer8hourText[] PROGMEM = "8 hour";
41const char fogTimer12hourText[] PROGMEM = "12 hour";
42const char fogTimer24hourText[] PROGMEM = "24 hour";
43
45
46uint8_t selectedColor = 0;
47
48uint8_t lightBrightness = 30;
49
50bool buzzerEnabled = true;
51
53
55
56uint8_t fogTimer = 0;
57
58//---- Main menu content ----//
59const char mainMenuItemText[] PROGMEM = "Main menu ";
60const char lightMenuItemText[] PROGMEM = "Light mode";
61const char brightnessMenuItemText[] PROGMEM = "Brightness";
62const char brightnessSelectItemText[] PROGMEM = "Brightness Select";
63const char buzzerMenuItemText[] PROGMEM = "Buzzer";
64const char clapMenuItemText[] PROGMEM = "Clap switch";
65const char fogEnableMenuItemText[] PROGMEM = "Fog machine";
66const char fogTimerMenuItemText[] PROGMEM = "Fog timer";
67const char fogTimerSelectMenuItemText[] PROGMEM = "Fog timer select";
68
69menuItem mainMenuItem( mainMenuItemText );
70menuItem lightMenuItem( lightMenuItemText );
71menuItem brightnessMenuItem( brightnessMenuItemText );
72menuItem brightnessSelectItem( brightnessSelectItemText );
73menuItem buzzerMenuItem( buzzerMenuItemText );
74menuItem clapMenuItem( clapMenuItemText );
75menuItem fogEnableMenuItem( fogEnableMenuItemText );
76menuItem fogTimerMenuItem( fogTimerMenuItemText );
77menuItem fogTimerSelectMenuItem( fogTimerSelectMenuItemText );
78
79//---- Light mode menu content ----//
80const char lightModeMenuItemText[] PROGMEM = "Light mode menu ";
81const char rainbowModeMenuItemText[] PROGMEM = "Rainbow";
82const char candleModeMenuItemText[] PROGMEM = "Candle";
83const char pulseModeMenuItemText[] PROGMEM = "Pulse";
84const char musicModeMenuItemText[] PROGMEM = "Music";
85const char komodoModeMenuItemText[] PROGMEM = "Komodo-3000";
86const char colorModeMenuItemText[] PROGMEM = "Color";
87const char colorSelectMenuItemText[] PROGMEM = "Color Select";
88
89menuItem lightModeMenuItem( lightModeMenuItemText );
90menuItem rainbowModeMenuItem( rainbowModeMenuItemText );
91menuItem candleModeMenuItem( candleModeMenuItemText );
92menuItem pulseModeMenuItem( pulseModeMenuItemText );
93menuItem musicModeMenuItem( musicModeMenuItemText );
94menuItem komodoModeMenuItem( komodoModeMenuItemText );
95menuItem colorModeMenuItem( colorModeMenuItemText );
96menuItem colorSelectMenuItem( colorSelectMenuItemText );
97
98
99menuItem::menuItem( const char* name_p ){
100
101 // Save it to the internal variable.
102 name = name_p;
103
104}
105
106menu::menu( ssd1306* oled_p, menuItem* selectedItem_p ){
107
108 // Save them to internal variable.
109 selectedItem = selectedItem_p;
110 oled = oled_p;
111
112}
113
115
116 // To save some precious dynamic memory, the menu item
117 // names are stored in the FLASH memory. But we can not
118 // acces it directly. It is a limitation of the AVR
119 // microcontrollers. To use them like a string, we have
120 // to copy them to a buffer first. This is that buffer.
121 char textBuffer[ 20 ];
122
123 // If the display doesn't specified we have to return.
124 if( oled == NULL ){
125 return;
126 }
127
128 // If the selected item doesn't specified we have to return.
129 if( selectedItem == NULL ){
130 return;
131 }
132
133 // If the data on the display doesn't changed we finished.
134 if( !changed ){
135 return;
136 }
137
138 // Check if the draw function of the selected item has ben overriden.
139 if( selectedItem -> drawFunc ){
140
141 // If yes, execute overridden function, then return.
142 selectedItem -> drawFunc( oled );
143 return;
144
145 }
146
147 // First thins first. Clear the display.
148 oled -> clear();
149
150 // Check if the selected item has upper neighbour.
151 if( selectedItem -> up ){
152
153 // If it has, select the display mode according to
154 // the neighbour's settings.
155 oled -> inverted = false;
156
157 if( selectedItem -> up -> style == menuItem::INVERTED ){
158
159 oled -> inverted = true;
160
161 }
162
163 // Set cursor to line beginning.
164 oled -> cursorY = 4;
165 oled -> cursorX = 8;
166
167 // Print an empty space. This placeholder is required for alignment.
168 oled -> print( (char*)" " );
169
170 // Copy the name of the neighbour's name to the textBuffer,
171 // then print it to the display.
172 strcpy_P( textBuffer, selectedItem -> up -> name );
173 oled -> print( textBuffer );
174
175 // Check if the neighbour is selected.
176 if( selectedItem -> up -> selected ){
177
178 // If yes, draw a filled circle at the end of the line.
179 oled -> cursorX = 118;
180 oled -> writeCharacter( 0x82 );
181 oled -> cursorX -=1;
182 oled -> writeCharacter( 0x83 );
183
184 }
185
186 }
187
188 // Disable the inverted mode for the selected item's indicator.
189 oled -> inverted = false;
190
191 // Set cursor to line beginning.
192 oled -> cursorY = 14;
193 oled -> cursorX = 0;
194
195 // Print the selected item's indicator.
196 oled -> print( (char*)">" );
197
198 // Select the display mode according to
199 // the selected item's settings.
200 if( selectedItem -> style == menuItem::INVERTED ){
201
202 oled -> inverted = true;
203
204 }
205
206 // Set the position to match the alignment.
207 oled -> cursorX = 8;
208 oled -> print( (char*)" " );
209
210 // Copy the name of the selected item's name to
211 // the textBuffer, then print it to the display.
212 strcpy_P( textBuffer, selectedItem -> name );
213 oled -> print( textBuffer);
214
215 // Check if the selected item is selected.
216 // Yep I know at this point that the naming
217 // would need more creativity.
218 if( selectedItem -> selected ){
219
220 // If yes, draw a filled circle at the end of the line.
221 oled -> cursorX = 118;
222 oled -> writeCharacter( 0x82 );
223 oled -> cursorX -=1;
224 oled -> writeCharacter( 0x83 );
225
226 }
227
228 // Check if the selected item has lower neighbour.
229 if( selectedItem -> down ){
230
231 // If it has, select the display mode according to
232 // the neighbour's settings.
233 oled -> inverted = false;
234
235 if( selectedItem -> down -> style == menuItem::INVERTED ){
236
237 oled -> inverted = true;
238
239 }
240
241 // Set cursor to line beginning.
242 oled -> cursorY = 24;
243 oled -> cursorX = 8;
244
245 // Print an empty space. This placeholder is required for alignment.
246 oled -> print( (char*)" " );
247
248 // Copy the name of the neighbour's name to the textBuffer,
249 // then print it to the display.
250 strcpy_P( textBuffer, selectedItem -> down -> name );
251 oled -> print( textBuffer );
252
253 // Check if the neighbour is selected.
254 if( selectedItem -> down -> selected ){
255
256 // If yes, draw a filled circle at the end of the line.
257 oled -> cursorX = 118;
258 oled -> writeCharacter( 0x82 );
259 oled -> cursorX -=1;
260 oled -> writeCharacter( 0x83 );
261
262 }
263
264 }
265
266 // Push the data from the display buffer to the display.
267 oled -> update();
268
269}
270
271void menu::up(){
272
273 // If the selected item doesn't specified we have to return.
274 if( selectedItem == NULL ){
275 return;
276 }
277
278 // Check if the action function of the selected item has ben overriden.
279 if( selectedItem -> actionFunc ){
280
281 // If yes, execute overridden function and pass the UP event.
282 selectedItem -> actionFunc( menuItem::UP );
283
284 }
285
286 // Check if the selected item has upper neighbour.
287 if( selectedItem -> up ){
288
289 // If yes, check that it's selectable.
290 if( selectedItem -> up -> selectable ){
291
292 // If selectable, set the upper neighbour as selected
294
295 }
296
297 }
298
299 // Set the flag, because the content of the menu changed.
300 changed = true;
301
302}
303
305
306 // If the selected item doesn't specified we have to return.
307 if( selectedItem == NULL ){
308 return;
309 }
310
311 // Check if the action function of the selected item has ben overriden.
312 if( selectedItem -> actionFunc ){
313
314 // If yes, execute overridden function and pass the DOWN event.
315 selectedItem -> actionFunc( menuItem::DOWN );
316
317 }
318
319 // Check if the selected item has lower neighbour.
320 if( selectedItem -> down ){
321
322 // If yes, check that it's selectable.
323 if( selectedItem -> down -> selectable ){
324
325 // If selectable, set the lower neighbour as selected
327
328 }
329
330 }
331
332 // Set the flag, because the content of the menu changed.
333 changed = true;
334
335}
336
338
339 // If the selected item doesn't specified we have to return.
340 if( selectedItem == NULL ){
341 return;
342 }
343
344 // Check if the action function of the selected item has ben overriden.
345 if( selectedItem -> actionFunc ){
346
347 // If yes, execute overridden function and pass the NEXT event.
348 selectedItem -> actionFunc( menuItem::NEXT );
349
350 }
351
352 // Check if the selected item has upper neighbour.
353 if( selectedItem -> next ){
354
355 // If selectable, set the next neighbour as selected
357
358 }
359
360 // Set the flag, because the content of the menu changed.
361 changed = true;
362
363}
364
365/*
366 __ ___ _ __ ___
367 / |/ /___ _(_)___ / |/ /__ ____ __ __
368 / /|_/ / __ `/ / __ \ / /|_/ / _ \/ __ \/ / / /
369 / / / / /_/ / / / / / / / / / __/ / / / /_/ /
370/_/ /_/\__,_/_/_/ /_/ /_/ /_/\___/_/ /_/\__,_/
371
372*/
373//---- Main Menu Content ----//
374
376
377 // If you see in front of you the inverted logic will be intuitive.
378
379 // Check for UP event
380 if( state == menuItem::UP ){
381
382 // If we can, lower the brightness.
383 if( lightBrightness > 0 ){
384
386
387 }
388
389 }
390
391 // Check for DOWN event
392 if( state == menuItem::DOWN ){
393
394 // If we can, increment the brightness.
395 if( lightBrightness < 100 ){
396
398
399 }
400
401 }
402
403}
404
406
407 // This section creates a slider.
408
409 float scale;
410
411 scale = (float)lightBrightness / 100.0 * 112.0;
412
413 oled -> clear();
414 oled -> inverted = false;
415 oled -> cursorY = 8;
416 oled -> cursorX = 10;
417 oled -> print( (char*)"Brightness - " );
418 oled -> print( lightBrightness );
419 oled -> line( 8, 24, 120, 24 );
420 oled -> cursorY = 20;
421 oled -> cursorX = (uint8_t)scale + 4;
422 oled -> writeCharacter( 0x80 );
423 oled -> cursorX -= 1;
424 oled -> writeCharacter( 0x81 );
425 oled -> update();
426
427
428}
429
430/*
431 __ _ __ __ __ ___ __
432 / / (_)___ _/ /_ / /_ / |/ /___ ____/ /__
433 / / / / __ `/ __ \/ __/ / /|_/ / __ \/ __ / _ \
434 / /___/ / /_/ / / / / /_ / / / / /_/ / /_/ / __/
435/_____/_/\__, /_/ /_/\__/ /_/ /_/\____/\__,_/\___/
436 /____/
437*/
438//---- Light mode menu content ----//
439
441
442 // Check for NEXT event
443 if( state == menuItem::NEXT ){
444
445 // Select Rainbow Mode and mark it as selected,
446 // to make it visible in the list.
453
455
456 }
457
458}
459
461
462 // Check for NEXT event
463 if( state == menuItem::NEXT ){
464
465 // Select Candle Mode and mark it as selected,
466 // to make it visible in the list.
473
475
476 }
477
478}
479
481
482 // Check for NEXT event
483 if( state == menuItem::NEXT ){
484
485 // Select Pulse Mode and mark it as selected,
486 // to make it visible in the list.
493
495
496 }
497
498}
499
501
502 // Check for NEXT event
503 if( state == menuItem::NEXT ){
504
505 // Select Music Mode and mark it as selected,
506 // to make it visible in the list.
513
515
516 }
517
518}
519
521
522 // Check for NEXT event
523 if( state == menuItem::NEXT ){
524
525 // Select Komodo Mode and mark it as selected,
526 // to make it visible in the list.
533
535
536 }
537
538}
539
541
542 // Check for NEXT event
543 if( state == menuItem::NEXT ){
544
545 // Select Color Mode and mark it as selected,
546 // to make it visible in the list.
553
555
556 }
557
558}
559
561
562 // If you see in front of you the inverted logic will be intuitive.
563
564 // Check for UP event
565 if( state == menuItem::UP ){
566
567 // If we can, lower the hue value.
568 if( selectedColor > 0 ){
569
571
572 }
573
574 }
575
576 // Check for DOWN event
577 if( state == menuItem::DOWN ){
578
579 // If we can, increment the hue value.
580 if( selectedColor < 255 ){
581
583
584 }
585
586 }
587
588}
589
591
592 // This section creates a slider.
593
594 float scale;
595
596 scale = (float)selectedColor / 255.0 * 112.0;
597
598 oled -> clear();
599 oled -> inverted = false;
600 oled -> cursorY = 8;
601 oled -> cursorX = 20;
602 oled -> print( (char*)"Color - " );
603 oled -> print( selectedColor );
604 oled -> line( 8, 24, 120, 24 );
605 oled -> cursorY = 20;
606 oled -> cursorX = (uint8_t)scale + 4;
607 oled -> writeCharacter( 0x80 );
608 oled -> cursorX -= 1;
609 oled -> writeCharacter( 0x81 );
610 oled -> update();
611
612
613}
614
616
617 // Check for NEXT event
618 if( state == menuItem::NEXT ){
619
620 // Toggle the buzzer state.
621 if( buzzerEnabled ){
622
623 buzzerEnabled = false;
624
625 }
626
627 else{
628
629 buzzerEnabled = true;
630
631 }
632
633 // Mark the item to make it visible in the menu.
635
636 }
637
638}
639
641
642 // Check for NEXT event
643 if( state == menuItem::NEXT ){
644
645 // Toggle the clap switch state.
646 if( clapSwitchEnabled ){
647
648 clapSwitchEnabled = false;
649
650 }
651
652 else{
653
654 clapSwitchEnabled = true;
655
656 }
657
658 // Mark the item to make it visible in the menu.
660
661 }
662
663}
664
666
667 // Check for NEXT event
668 if( state == menuItem::NEXT ){
669
670 // Toggle the fog machine state.
671 if( fogMachineEnabled ){
672
673 fogMachineEnabled = false;
674
675 }
676
677 else{
678
679 fogMachineEnabled = true;
680
681 }
682
683 // Mark the item to make it visible in the menu.
685
686 }
687
688}
689
690
692
693 // If you see in front of you the inverted logic will be intuitive.
694
695 // Check for UP event
696 if( state == menuItem::UP ){
697
698 // If we can, lower the fog timer.
699 if( fogTimer > 0 ){
700
701 fogTimer--;
702
703 }
704
705 }
706
707 // Check for DOWN event
708 if( state == menuItem::DOWN ){
709
710 // If we can, increment the fog timer.
711 if( fogTimer < 10 ){
712
713 fogTimer++;
714
715 }
716
717 }
718
719}
720
722
723 // This section creates a slider.
724
725 // Buffer for PROGMEM based text.
726 char textBuffer[ 20 ];
727
728 float scale;
729
730 scale = (float)fogTimer / 10.0 * 112.0;
731
732 oled -> clear();
733 oled -> inverted = false;
734 oled -> cursorY = 8;
735 oled -> cursorX = 8;
736 oled -> print( (char*)"Fog timer - " );
737
738 // Copy the timer value from PROGMEM to the buffer to print it.
739 switch( fogTimer ){
740
741 case 0:
742 strcpy_P( textBuffer, fogTimer15minText );
743 break;
744
745 case 1:
746 strcpy_P( textBuffer, fogTimer30minText );
747 break;
748
749 case 2:
750 strcpy_P( textBuffer, fogTimer45minText );
751 break;
752
753 case 3:
754 strcpy_P( textBuffer, fogTimer1hourText );
755 break;
756
757 case 4:
758 strcpy_P( textBuffer, fogTimer1p5hourText );
759 break;
760
761 case 5:
762 strcpy_P( textBuffer, fogTimer2hourText );
763 break;
764
765 case 6:
766 strcpy_P( textBuffer, fogTimer3hourText );
767 break;
768
769 case 7:
770 strcpy_P( textBuffer, fogTimer5hourText );
771 break;
772
773 case 8:
774 strcpy_P( textBuffer, fogTimer8hourText );
775 break;
776
777 case 9:
778 strcpy_P( textBuffer, fogTimer12hourText );
779 break;
780
781 case 10:
782 strcpy_P( textBuffer, fogTimer24hourText );
783 break;
784
785 default:
786
787 strcpy_P( textBuffer, fogTimer15minText );
788 fogTimer = 0;
789
790 break;
791
792 }
793
794 oled -> print( textBuffer );
795
796 oled -> line( 8, 24, 120, 24 );
797 oled -> cursorY = 20;
798 oled -> cursorX = (uint8_t)scale + 4;
799 oled -> writeCharacter( 0x80 );
800 oled -> cursorX -= 1;
801 oled -> writeCharacter( 0x81 );
802 oled -> update();
803
804
805}
806
807void menuInit(){
808
809 //---- Main menu ----//
812 mainMenuItem.selectable = false;
813
817
821
825
826
831
836
841
844
848
849 //---- Light mode menu ----//
853
857
861
865
869
873
877
881
882 switch( lightMode ){
883
886 break;
887
890 break;
891
892 case LIGHT_MODE_PULSE:
894 break;
895
896 case LIGHT_MODE_MUSIC:
898 break;
899
902 break;
903
904 case LIGHT_MODE_COLOR:
906 break;
907
908 }
909
910}
menuItem * selectedItem
Pointer to the selected menu item.
Definition: menu.hpp:146
void draw()
Redraw the menu to the display.
Definition: menu.cpp:114
void up()
Step te menu upwards if possible.
Definition: menu.cpp:271
menu(ssd1306 *oled_p, menuItem *selectedItem_p)
Constructor.
Definition: menu.cpp:106
void down()
Step te menu downwards if possible.
Definition: menu.cpp:304
void next()
Enter to the next menu if possible.
Definition: menu.cpp:337
bool changed
Flag that shows if the content of the display is changed.
Definition: menu.hpp:152
ssd1306 * oled
Pointer to the display controller object.
Definition: menu.hpp:149
Menu Item Class.
Definition: menu.hpp:50
@ INVERTED
The active pixel is black, the inactive is lit.
Definition: menu.hpp:65
menuItem * next
Pointer to the next neighbor.
Definition: menu.hpp:80
menuItem(const char *name_p)
Constructor.
Definition: menu.cpp:99
const char * name
It is a pointer to a string.
Definition: menu.hpp:111
enum menuStyle_t style
Menu style variable. By default it is set to NORMAL.
Definition: menu.hpp:93
void(* actionFunc)(enum encoderState_t state)
Function pointer to override the button action behaviour.
Definition: menu.hpp:100
void(* drawFunc)(ssd1306 *oled)
Function pointer to override the drawing behaviour.
Definition: menu.hpp:107
bool selected
If set, a filled circle will appear on the right side, next to the item name.
Definition: menu.hpp:90
menuItem * down
Pointer to the lower neighbor.
Definition: menu.hpp:77
encoderState_t
Used for actionFunc to pass the event as an argument.
Definition: menu.hpp:56
@ NEXT
Encoder button pressed.
Definition: menu.hpp:57
@ DOWN
Encoder rotated down.
Definition: menu.hpp:59
@ UP
Encoder rotated up.
Definition: menu.hpp:58
menuItem * up
Pointer to the upper neighbor.
Definition: menu.hpp:74
bool selectable
If set, the item won't be selectable.
Definition: menu.hpp:85
Display driver object.
Definition: oled.hpp:156
void brightnessSelectDrawFunction(ssd1306 *oled)
Draw override for brightness selection.
Definition: menu.cpp:405
const char fogTimer15minText[] PROGMEM
Fog timer text for 15 min.
Definition: menu.cpp:32
void komodoMenuSelectFunction(enum menuItem::encoderState_t state)
Behaviour override for komodo menu select.
Definition: menu.cpp:520
menuItem pulseModeMenuItem(pulseModeMenuItemText)
void brightnessSelectFunction(enum menuItem::encoderState_t state)
Behaviour override for brightness selection.
Definition: menu.cpp:375
enum lightMode_t lightMode
It will store the user selected light mode.
Definition: menu.cpp:44
menuItem buzzerMenuItem(buzzerMenuItemText)
void clapMenuSelectedFunction(enum menuItem::encoderState_t state)
Behaviour override for clap menu.
Definition: menu.cpp:640
menuItem fogTimerMenuItem(fogTimerMenuItemText)
void colorSelectFunction(enum menuItem::encoderState_t state)
Behaviour override for color select menu.
Definition: menu.cpp:560
uint8_t lightBrightness
It will store the user selected brightness.
Definition: menu.cpp:48
bool fogMachineEnabled
It will store the user selected state of the fog machine.
Definition: menu.cpp:54
menuItem colorSelectMenuItem(colorSelectMenuItemText)
menuItem komodoModeMenuItem(komodoModeMenuItemText)
menuItem lightModeMenuItem(lightModeMenuItemText)
void candleMenuSelectFunction(enum menuItem::encoderState_t state)
Behaviour override for candle menu select.
Definition: menu.cpp:460
menuItem rainbowModeMenuItem(rainbowModeMenuItemText)
void fogEnableMenuSelectedFunction(enum menuItem::encoderState_t state)
Definition: menu.cpp:665
menuItem lightMenuItem(lightMenuItemText)
void buzzerMenuSelectedFunction(enum menuItem::encoderState_t state)
Behaviour override for buzzer menu.
Definition: menu.cpp:615
uint8_t selectedColor
It will store the user selected color.
Definition: menu.cpp:46
void menuInit()
Initialize the menu system.
Definition: menu.cpp:807
menuItem colorModeMenuItem(colorModeMenuItemText)
void fogTimerSelectDrawFunction(ssd1306 *oled)
Draw override for fog timer setting.
Definition: menu.cpp:721
menuItem mainMenuItem(mainMenuItemText)
void pulseMenuSelectFunction(enum menuItem::encoderState_t state)
Behaviour override for pulse menu select.
Definition: menu.cpp:480
void fogTimerSelectFunction(enum menuItem::encoderState_t state)
Behaviour override for fog timer setting menu.
Definition: menu.cpp:691
menuItem clapMenuItem(clapMenuItemText)
bool buzzerEnabled
It will store the user selected state of the buzzer.
Definition: menu.cpp:50
void colorSelectDrawFunction(ssd1306 *oled)
Draw override for color select menu.
Definition: menu.cpp:590
menuItem brightnessSelectItem(brightnessSelectItemText)
bool clapSwitchEnabled
It will store the user selected state of the clap switch.
Definition: menu.cpp:52
menuItem musicModeMenuItem(musicModeMenuItemText)
void colorMenuSelectFunction(enum menuItem::encoderState_t state)
Behaviour override for color mode menu.
Definition: menu.cpp:540
menuItem brightnessMenuItem(brightnessMenuItemText)
menuItem candleModeMenuItem(candleModeMenuItemText)
void rainbowMenuSelectFunction(enum menuItem::encoderState_t state)
Behaviour override for rainbow menu select.
Definition: menu.cpp:440
menuItem fogEnableMenuItem(fogEnableMenuItemText)
uint8_t fogTimer
It will store the user selected humidification period.
Definition: menu.cpp:56
menuItem fogTimerSelectMenuItem(fogTimerSelectMenuItemText)
void musicMenuSelectFunction(enum menuItem::encoderState_t state)
Behaviour override for music menu select.
Definition: menu.cpp:500
lightMode_t
Lost of the different lighting effects.
Definition: menu.hpp:157
@ LIGHT_MODE_MUSIC
Definition: menu.hpp:161
@ LIGHT_MODE_RAINBOW
Definition: menu.hpp:158
@ LIGHT_MODE_KOMODO
Definition: menu.hpp:162
@ LIGHT_MODE_COLOR
Definition: menu.hpp:163
@ LIGHT_MODE_PULSE
Definition: menu.hpp:160
@ LIGHT_MODE_CANDLE
Definition: menu.hpp:159