/
saber_fett263_buttons.h
6509 lines (6126 loc) · 200 KB
/
saber_fett263_buttons.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* Fett263 Buttons for use with 1, 2 or 3 Button Sabers*
*1 Button Controls based on SA22C prop
Includes Gesture Controls, Battle Mode 2.0, Edit Mode, Track Player, Quote/Force Player, Real Clash, Choreography Mode
Dual Mode Ignition Sounds, Multi-Phase Control, Multi-Blast
ProffieOS: Control software for lightsabers and other props.
http://fredrik.hubbe.net/lightsaber/teensy_saber.html
Copyright (c) 2016-2019 Fredrik Hubinette
Fett263 Button (prop) file, "Battle Mode 2.0", "Edit Mode", "Track Player", "Real Clash", "Choreography Mode", "Dual Mode Ignition",
"Multi-Phase", "Multi-Blast"
Copyright (c) 2022-2023 Fernando da Rosa
Visit https://www.fett263.com/proffieOS7-fett263-prop-file.html for required set up and additional information
Voice Prompts and sounds required for certain features and should be included in /common folder or /font folder on SD card.
Free prompts (courtesy of Brian Conner) available here: http://fredrik.hubbe.net/lightsaber/sound/
Track Player requires track files to be located in /font/tracks for font specific tracks or /common/tracks for universal (all presets) or a combination of the two.
----- This prop enables the following EFFECTs for use in menus, Special Abilities* and/or chained effects controlled at the style level in each preset -----
*requires FETT263_SPECIAL_ABILITIES define
EFFECT_BATTERY_LEVEL (to display/say* battery level) *requires FETT263_SAY_BATTERY_VOLTS or FETT263_SAY_BATTERY_PERCENT
EFFECT_VOLUME_LEVEL (to display current volume level)
EFFECT_POWERSAVE (blade dimming / powersave option)
EFFECT_QUOTE (random quote* cannot be mixed with EFFECT_NEXT_QUOTE)
EFFECT_NEXT_QUOTE (sequential quote)
EFFECT_TRACK (plays previously selected Track (via Track Player) -or- preset's default track if "tracks" folder is not found)
EFFECT_ALT_SOUND (enables Alt font selection from style)
EFFECT_TRANSITION_SOUND (enable custom transition sounds)
EFFECT_SOUND_LOOP (enable custom looped sound toggled on/off with each call)
EFFECT_BEGIN_BATTLE_MODE (begin Battle Mode)
EFFECT_END_BATTLE_MODE (end Battle Mode)
EFFECT_BEGIN_AUTO_BLAST (begin Multi-Blast Mode)
EFFECT_END_AUTO_BLAST (end Multi-Blast Mode)
EFFECT_INTERACTIVE_PREON (allows prop to recognize Interactive Preon effects for primary control)
EFFECT_INTERACTIVE_BLAST (allows prop to recognize Interactive Blast effects for primary control)
EFFECT_ON (enable normal ignition from chained effect while OFF)
EFFECT_FAST_ON (enable ignition without preon from chained effect while OFF)
EFFECT_OFF (enable normal retraction from chained effect while ON)
EFFECT_FAST_OFF (enable retraction without pstoff from chained effect while ON)
EFFECT_SECONDARY_IGNITION (to enable separate "secondary" blade ignition control)
EFFECT_SECONDARY_RETRACTION (to enable separate "secondary" blade retraction control)
----- Available Mini Game EFFECTs -----
EFFECT_GAME_START (begin game effects)
EFFECT_GAME_ACTION1 (game action 1)
EFFECT_GAME_ACTION2 (game action 2)
EFFECT_GAME_CHOICE (interactive choice based on action)
EFFECT_GAME_RESPONSE1 (available response for action 1)
EFFECT_GAME_RESPONSE2 (available response for action 2)
EFFECT_GAME_RESULT1 (result of choice for action 1)
EFFECT_GAME_RESULT2 (result of choice for action 2)
EFFECT_GAME_WIN (end game with win)
EFFECT_GAME_LOSE (end game with loss)
---------- 2 / 3 Button Controls ----------
NOTE:
Click = do short click
Long Click = hold button for 1 second and release
Hold = hold button down
Standard Controls While Blade is OFF
Turn On / Ignite Saber* = Click PWR
*If FETT263_MOTION_WAKE_POWER_BUTTON defined first Click will Wake up motion detection and boot sound will play
Turn On / Ignite Saber (Muted) = Double Click PWR
Change Preset (one at a time*) = Click AUX
*if pointing down will go to previous
NEW! Scroll Presets (using twist menu) = Long Click AUX
Turn Right (Stepped) = Next Preset
Increment by 5 = Hold PWR + Turn Right
Turn Left (Stepped) = Previous Preset
Increment by 5 = Hold PWR + Turn Left
Click PWR = Select Preset
NEW! Hold PWR = Select and Ignite Preset
Click AUX = go to First Preset
Play Track = Long Click PWR pointing up
NEW! Track Player* = Long Click PWR parallel
*requires tracks in either font/tracks/ or common/tracks/
*if no tracks in font or common will "Loop" default track
Turn Right (Stepped) = Next Track
Turn Left (Stepped) = Previous Track
Click PWR = Play Current Track Once
Click AUX = Random (will play current track and then randomly select next tracks)
Hold PWR + Turn Right = Rotate (will play current track and then next sequential tracks)
Hold PWR + Turn Left = Loop Current Track
Long Click PWR = Stop Track Player
NEW! Force/Quote Player = Hold PWR
If quotes exist in current font pointing straight down will toggle between Force/Quote and play
*Quotes play sequentially 1,2,3...
If parallel will do Force/Quote based on current mode
NEW! Toggle Gesture Sleep* = Hold PWR + Clash
*toggles gesture controls on/off
*gestures sleep automatically if Blade Detect is enabled and blade is missing
NEW! Toggle Spin Mode* = Hold PWR + Swing
Disables Clash, Stab and Lockup effects to allow for spinning and flourishes
Will play bmbegin.wav or force.wav when toggled ON/OFF
*requires FETT263_SPIN_MODE define
Special Abilities (Style Controlled) (requires FETT263_SPECIAL_ABILITIES)
Hold PWR + Turn Right = Special Ability 5 (USER5)
Hold PWR + Turn Left = Special Ability 6 (USER6)
Hold AUX + Turn Right = Special Ability 7 (USER7)
Hold Aux + Turn Left = Special Ability 8 (USER8)
NEW Control! Volume Menu = Hold PWR, Click AUX
Turn Right (Stepped) = Increase Volume (to max)
Turn Left (Stepped) = Decrease Volume (to min)
Click PWR or AUX = Exit
Check Battery Level* = Hold AUX, Click PWR
*requires EFFECT_BATTERY_LEVEL style and/or FETT263_SAY_BATTERY_VOLTS or FETT263_SAY_BATTERY_PERCENT define
*if using FETT263_BC_SAY_BATTERY_VOLTS_PERCENT
Point down for volts, parallel or up for percent
NEW! Change Font
Next Font = Hold AUX + Long Click PWR (parallel or up)
Previous Font= Hold AUX + Long Click PWR (down)
NEW! Copy Preset = Hold PWR + Long Click AUX
Optional Gesture Controls (if enabled and Gesture Sleep is deactivated)
Ignite Saber
Swing On
Stab On
Twist On
Thrust On
Standard Controls While Blade is ON
Turn Off / Retract Blade* = Click PWR (Hold PWR**)
*if PowerLock is disabled
**using FETT263_HOLD_BUTTON_OFF define
Turn Off / Retract Blade (PowerLock Mode) = Hold PWR + Hold AUX
Blast Effect = Click Aux
Multi-Blast Mode = Long Click Aux
Each Swing in Multi-Blast Mode will deflect Blast effect
To exit, click AUX or do Clash
Clash Effect = Clash Saber
Stab Effect = Stab (thrust and impact tip of blade on object)
Lockup Effect = Hold PWR + Clash Saber (Hold AUX**)
**using FETT263_HOLD_BUTTON_LOCKUP
**Battle Mode changes to Hold AUX + Swing with this define
Drag Effect = Hold AUX + Stab Down
Melt Effect = Hold AUX + Stab Parallel or Up
Lightning Block Effect = Hold PWR + click AUX
NEW! Force/Quote = Long Click PWR (parallel or down)
If quotes exist in current font pointing straight down will toggle between Force/Quote and play
*Quotes play sequentially 1,2,3...
If parallel will do Force/Quote based on current mode
Start/Stop Tracks = Long Click PWR (pointing straight up)
*default track only (use Track Player while OFF to select tracks or playback modes)
Color Change = Hold AUX + Click PWR (parallel or down)
Rotate Hilt to select color (unless ColorChange<> style is used with COLOR_CHANGE_DIRECT*)
If styles use Edit Mode Color Editing styles, Color List is used
If styles use ColorChange<> then colors within the style are used
*if COLOR_CHANGE_DIRECT is defined then each click will change color instead of turn
Otherwise ColorWheel is used per style set up.
Click PWR to save
Click AUX to revert
NEW! Color Zoom* = Hold PWR, Release to Save
*For Color List or ColorWheel you can Hold PWR down to zoom in color for easier selection
Release PWR to save
Power Save* = Hold AUX + Click PWR (pointing straight up)
*requires EFFECT_POWERSAVE in style
NEW! Change Style (All Blades)
Next Style = Hold AUX + Long Click PWR (parallel or up)
Previous Style = Hold AUX + Long Click PWR (down)
Multi-Phase Preset Change*
*requires FETT263_MULTI_PHASE define, cannot be used with FETT263_SPECIAL_ABILITIES
Hold AUX + Twist = Next Preset
Hold PWR + Twist = Previous Preset
Special Abilities (Style Controlled) (requires FETT263_SPECIAL_ABILITIES)
Hold PWR + Turn Right = Special Ability 1 (USER1)
Hold PWR + Turn Left = Special Ability 2 (USER2)
Hold AUX + Turn Right = Special Ability 3 (USER3)
Hold Aux + Turn Left = Special Ability 4 (USER4)
Optional Gesture Controls (if enabled)
Retract Blade
Twist Off
"Battle Mode" Controls* - While ON
*may vary by defines
Enter/Exit Battle Mode = Hold AUX (Hold AUX + Swing**)
**if FETT263_HOLD_BUTTON_LOCKUP defined
Clash / Lockup = controlled by gesture
Clash blade
If blade swings through the clash it will do a "glancing Clash"
If using FETT263_BM_CLASH_DETECT 6 define (Battle Mode 2.0) normal clash used for hits below the
FETT263_BM_CLASH_DETECT value (1 ~ 8), if undefined or equal to 0 then Battle Mode 1.0 is used.
If blade stops/slows on clash the saber will initiate Begin Lockup
To perform a "clash" do an immediate Pull Away this will transition from Begin Lockup to End Lockup in quick succession
To Lockup, steady the blade after Clash
To end Lockup do Pull Away
Drag / Melt = controlled by gesture
Stab (thrust with impact at tip of blade)
If pointing down Drag will initiate
To end Drag pull blade up from floor at an angle
If parallel or up Melt will initiate
To end Melt pull blade away from object at an angle
Blast Effect = Click AUX
After Blast, swing within 2 seconds to enter Multi-Blast Mode
Multi-Blast Mode = Long Click AUX
Each Swing in Multi-Blast Mode will deflect Blast effect
To exit, click AUX or do Clash
Lightning Block = Hold PWR, Click AUX
Force Push* = Push Saber
*requires FETT263_FORCE_PUSH
NEW! Force/Quote = Long Click PWR (parallel or down)
If pointing down will toggle Force/Quote mode and do Force Effect or play Quote accordingly
*Quote plays sequentially
If parallel will do Force/Quote
Start/Stop Tracks = Long Click PWR (pointing up)
*default track only (use Track Player while OFF to select tracks or playback modes)
Rehearsal / Choreography Modes*
*requires FETT263_SAVE_CHOREOGRAPHY define, cannot be used with FETT263_SPECIAL_ABILITIES
Begin Rehearsal** = While Off, Hold AUX + Twist
**If a Saved Rehearsal Exists it will prompt you to "Replace?"
To confirm Turn the hilt Right (Clockwise) to "Accept" and Click PWR to begin a new Rehearsal
To keep saved rehearsal Click AUX and Rehearsal Mode will be cancelled.
Saber will Ignite in Rehearsal Mode
In Rehearsal Mode, standard Clash and Lockup controls are used to record sequence
Clash = Clash
Hold PWR + Clash = Lockup
Rehearsal will also record the sound files used for each effect to repeat in Choreography
Cancel Rehearsal Mode = Hold AUX
Save Rehearsal = Hold PWR
Begin Choreography = While Off, Hold AUX - or - Hold AUX + Swing
During Choreography Mode Clashes, Lockups and sound files are replayed in sequence
When recorded sequence completes the saber goes into Battle Mode automatically
If no saved rehearsal is available for font saber will ignite in Battle Mode*
*may vary by define
During Choreography PWR button is disabled
Turn Off = Hold AUX + Hold PWR
Edit Mode*
*requires FETT263_EDIT_MODE_MENU & ENABLE_ALL_EDIT_OPTIONS defines
*requires /common folder with all menu prompt sounds
Enter Edit Mode = While Off, Hold AUX + Hold PWR
If menu prompt wav files are missing from preset you will get "Error in Font Directory" warning, refer to Edit Mode setup and requirements
While in Edit Mode controls are as follows:
Rotate Forward, Increase Value, Confirm "Yes" = Turn Right (Stepped)
Increment by 5 (Fonts, Tracks, Blade Length) = Hold PWR + Turn Right
Increment by 500 (Ignition Time, Ignition Delay, Retraction Time, Retraction Delay) = Hold PWR + Turn Right
Increment by 5000 (Ignition Option2, Retraction Option2) = Hold PWR + Turn Right
Rotate Back, Decrease Value, Confirm "No" = Turn Left (Stepped)
Increment by 5 (Fonts, Tracks, Blade Length) = Hold PWR + Turn Left
Increment by 500 (Ignition Time, Ignition Delay, Retraction Time, Retraction Delay) = Hold PWR + Turn Left
Increment by 5000 (Ignition Option2, Retraction Option2) = Hold PWR + Turn Left
Select, Save, Enter = Click PWR
Cancel, Revert, Go Back = Click AUX
Go to Main Menu (from sub-menu) - Hold AUX
Exit Edit Mode - Hold AUX (or rotate to "Exit") while in Main Menu
"Edit Color" Additional Control
"Color List" and "Adjust Color Hue" Zoom Mode = Hold PWR while turning to Zoom color in, release to save
Edit Settings* (Settings Only version of Edit Mode)
*requires FETT263_EDIT_SETTINGS_MENU & ENABLE_ALL_EDIT_OPTIONS defines
*requires /common folder with all menu prompt sounds
Enter Edit Settings = While Off, Hold AUX + Hold PWR
If menu prompt wav files are missing from preset you will get "Error in Font Directory" warning, refer to Edit Mode setup and requirements
While in Edit Mode controls are as follows:
Rotate Forward, Increase Value, Confirm "Yes" = Turn Right (Stepped)
Increment by 5 (Blade Length) = Hold PWR + Turn Right
Rotate Back, Decrease Value, Confirm "No" = Turn Left (Stepped)
Increment by 5 (Blade Length) = Hold PWR + Turn Left
Select, Save, Enter = Click PWR
Cancel, Revert, Go Back = Click AUX
Exit Edit Settings - Hold AUX
---------- 1 Button Controls (based on SA22C prop) ----------
NOTE:
Click = do short click (so Double Click is two short clicks in quick succession)
Long Click = hold button for 1 second and release
Hold = hold button down
Click and Hold = hold on Xth click (so Double Click and Hold would be click twice and hold on second)
Click + Long Click = do X clicks then do long click (so Double Click + Long Click would be click twice then do a long click)
Standard Controls While Blade is OFF
Turn On / Ignite Saber* = Click PWR
*If FETT263_MOTION_WAKE_POWER_BUTTON defined first Click will Wake up motion detection and boot sound will play
NEW Control! Turn On / Ignite Saber (Muted) = Click + Long Click PWR
NEW Control! Start / Stop Tracks = Double Click PWR (pointing straight up)
NEW! Track Player* = Double Click PWR (parallel or down)
*if only default track exists in current preset, track will "Loop"
Turn Right (Stepped) = Next Track
Turn Left (Stepped) = Previous Track
Click PWR = Play Current Track Once
Hold PWR = Random (will play current track and then randomly select next tracks)
Hold PWR + Turn Right = Rotate (will play current track and then next sequential tracks)
Hold PWR + Turn Left = Loop Current Track
NEW! Force/Quote Player - Triple Click PWR
If quotes exist in current font pointing straight down will toggle between Force/Quote and play
*Quotes play sequentially 1,2,3...
If parallel will do Force/Quote based on current mode
Special Abilities (Style Controlled) (requires FETT263_SPECIAL_ABILITIES)
Hold PWR + Turn Right (parallel or up) = Special Ability 5 (USER5)
Hold PWR + Turn Left (parallel or up) = Special Ability 6 (USER6)
Hold PWR + Turn Right (pointing down) = Special Ability 7 (USER7)
Hold PWR + Turn Left (pointing down) = Special Ability 8 (USER8)
NEW! Toggle Spin Mode* = Hold PWR + Swing
Disables Clash, Stab and Lockup effects to allow for spinning and flourishes
Will play bmbegin.wav or force.wav when toggled ON/OFF
*requires FETT263_SPIN_MODE define
NEW! Toggle Gesture Sleep* = Hold PWR + Clash (pointing down)
*toggles gesture controls on/off
*gestures sleep automatically if Blade Detect is enabled and blade is missing
Next Preset = Long Click PWR (parallel or up)
NEW Control! Previous Preset = Long Click PWR (pointing down)
NEW! Scroll Presets (using twist menu) = Hold PWR
Turn Right (Stepped) = Next Preset
Increment by 5 = Hold PWR + Turn Right
Turn Left (Stepped) = Previous Preset
Increment by 5 = Hold PWR + Turn Left
Click PWR = Select Preset
NEW! Hold PWR = Select and Ignite Preset
Long Click PWR = First Preset
NEW Control! Volume Menu = Hold PWR + Clash (parallel or up)
Turn Right (Stepped) = Increase Volume (to max)
Turn Left (Stepped) = Decrease Volume (to min)
Click PWR = Exit
NEW Control! Battery Level* = Double Click + Long Click PWR
*requires EFFECT_BATTERY_LEVEL style and/or FETT263_SAY_BATTERY_PERCENT or FETT263_SAY_BATTERY_VOLTS define
*if using FETT263_BC_SAY_BATTERY_VOLTS_PERCENT
Point down for volts, parallel or up for percent
NEW! Change Font
Next Font = Triple Click + Long Click PWR (parallel or up)
Previous Font = Triple Click + Long Click PWR (down)
NEW! Copy Preset = Quadruple (Four) Click + Hold PWR
Optional Gesture Controls (if enabled and Gesture Sleep is deactivated)
Ignite Saber
Swing On
Stab On
Twist On
Thrust On
Standard Controls While Blade is ON
Turn Off / Retract Blade = Hold PWR
Clash Effect = Clash Saber
Lockup Effect = Hold PWR + Clash
Stab Effect = Stab (thrust with impact at tip of blade)
NEW Control! Drag Effect = Hold PWR + Stab (pointing straight down)
Melt Effect = Hold PWR + Stab (parallel or up)
Lightning Block = Double Click and Hold PWR
Blast Effect = Click / Double Click / Triple Click PWR
Multi-Blast Mode = Hold PWR + Swing
Each Swing in Multi-Blast Mode will deflect Blast effect
To exit, click PWR or do Clash
NEW! Force/Quote = Long Click PWR
If pointing down will toggle Force/Quote mode and do Force Effect or play Quote accordingly
*Quote plays sequentially
If parallel will do Force/Quote
NEW! Stop Track* - Double Click PWR
*if track is playing while ON
To start/select track saber must be OFF
NEW Control! Color Change = 4 Clicks PWR (parallel or down)
Rotate Hilt to select color (unless ColorChange<> style is used with COLOR_CHANGE_DIRECT*)
If styles use Edit Mode Color Editing styles, Color List is used
If styles use ColorChange<> then colors within the style are used
*if COLOR_CHANGE_DIRECT is defined then each click will change color instead of turn
Otherwise ColorWheel is used per style set up.
Click PWR to save
NEW! Color Zoom* = Double Click and Hold PWR, Release to Save
*For Color List or ColorWheel you can Hold PWR down to zoom in color for easier selection
Release PWR to save
NEW! Power Save* = 4 Clicks PWR (pointing straight up)
*requires EFFECT_POWERSAVE in style
Multi-Phase Preset Change*
*requires FETT263_MULTI_PHASE define, cannot be used with FETT263_SPECIAL_ABILITIES
Hold PWR + Twist (parallel or up) = Next Preset
Hold PWR + Twist (pointing down) = Previous Preset
Special Abilities (Style Controlled) (requires FETT263_SPECIAL_ABILITIES)
Hold PWR + Turn Right (parallel or up) = Special Ability 1 (USER1)
Hold PWR + Turn Left (parallel or up) = Special Ability 2 (USER2)
Hold PWR + Turn Right (pointing down) = Special Ability 3 (USER3)
Hold PWR + Turn Left (pointing down) = Special Ability 4 (USER4)
NEW! Change Style (All Blades)
Next Style = Triple Click + Long Click PWR (parallel or up)
Previous Style = Triple Click + Long Click PWR (down)
Optional Gesture Controls (if enabled)
Retract Blade
Twist Off
"Battle Mode" Controls* - While ON
*may vary by defines
Enter/Exit Battle Mode = Triple Click and Hold PWR
Clash / Lockup = controlled by gesture
Clash blade
If blade swings through the clash it will do a "glancing Clash"
If using FETT263_BM_CLASH_DETECT 6 define (Battle Mode 2.0) normal clash used for hits below the
FETT263_BM_CLASH_DETECT value (1 ~ 8), if undefined or equal to 0 then Battle Mode 1.0 is used.
If blade stops/slows on clash the saber will initiate Begin Lockup
To perform a "clash" do an immediate Pull Away this will transition from Begin Lockup to End Lockup in quick succession
To Lockup, steady the blade after Clash
To end Lockup do Pull Away
Drag / Melt = controlled by gesture
Stab (thrust with impact at tip of blade)
If pointing down Drag will initiate
To end Drag pull blade up from floor at an angle
If parallel or up Melt will initiate
To end Melt pull blade away from object at an angle
Blast Effect = Click PWR
After Blast, swing within 2 seconds to enter Multi-Blast Mode
Lightning Block = Double Click and Hold PWR
Force Push* = Push Saber
*requires FETT263_FORCE_PUSH
Rehearsal / Choreography Modes*
*requires FETT263_SAVE_CHOREOGRAPHY define
Begin Rehearsal** = While Off, Triple Click and Hold PWR
**If a Saved Rehearsal Exists it will prompt you to "Replace?"
To confirm Turn the hilt Right (Clockwise) to "Accept" and Click PWR to begin a new Rehearsal
To keep saved rehearsal Click AUX and Rehearsal Mode will be cancelled.
Saber will Ignite in Rehearsal Mode
In Rehearsal Mode, standard Clash and Lockup controls are used to record sequence
Clash = Clash
Hold PWR + Clash = Lockup
Rehearsal will also record the sound files used for each effect to repeat in Choreography
Cancel Rehearsal Mode = Triple Click and Hold PWR
Save Rehearsal = Hold PWR
Begin Choreography = While Off, Hold PWR + Swing
During Choreography Mode Clashes, Lockups and sound files are replayed in sequence
When recorded sequence completes the saber goes into Battle Mode automatically
If no saved rehearsal is available for font saber will ignite in Battle Mode*
*may vary by define
End Choreography = Hold PWR
Edit Mode*
*requires FETT263_EDIT_MODE_MENU & ENABLE_ALL_EDIT_OPTIONS defines
*requires /common folder with all menu prompt sounds
Enter Edit Mode = While Off, Double Click and Hold PWR
If menu prompt wav files are missing from preset you will get "Error in Font Directory" warning, refer to Edit Mode setup and requirements
While in Edit Mode controls are as follows:
Rotate Forward, Increase Value, Confirm "Yes" = Turn Right (Stepped)
Increment by 5 (Fonts, Tracks, Blade Length) = Hold PWR + Turn Right
Increment by 500 (Ignition Time, Ignition Delay, Retraction Time, Retraction Delay) = Hold PWR + Turn Right
Increment by 5000 (Ignition Option2, Retraction Option2) = Hold PWR + Turn Right
Rotate Back, Decrease Value, Confirm "No" = Turn Left (Stepped)
Increment by 5 (Fonts, Tracks, Blade Length) = Hold PWR + Turn Left
Increment by 500 (Ignition Time, Ignition Delay, Retraction Time, Retraction Delay) = Hold PWR + Turn Left
Increment by 5000 (Ignition Option2, Retraction Option2) = Hold PWR + Turn Left
Select, Save, Enter = Click PWR
Cancel, Revert, Go Back = Long Click PWR
Go to Main Menu (from sub-menu) - Hold PWR
Exit Edit Mode - Hold PWR (or rotate to "Exit") while in Main Menu
"Edit Color" Additional Control
"Color List" and "Adjust Color Hue" Zoom Mode = Double Click and Hold PWR while turning to Zoom color in, release to save
Edit Settings* (Settings Only version of Edit Mode)
*requires FETT263_EDIT_SETTINGS_MENU & ENABLE_ALL_EDIT_OPTIONS defines
*requires /common folder with all menu prompt sounds
Enter Edit Mode = While Off, Double Click and Hold PWR
If menu prompt wav files are missing from preset you will get "Error in Font Directory" warning, refer to Edit Mode setup and requirements
While in Edit Mode controls are as follows:
Rotate Forward, Increase Value, Confirm "Yes" = Turn Right (Stepped)
Increment by 5 (Blade Length) = Hold PWR + Turn Right
Rotate Back, Decrease Value, Confirm "No" = Turn Left (Stepped)
Increment by 5 (Blade Length) = Hold PWR + Turn Left
Select, Save, Enter = Click PWR
Cancel, Revert, Go Back = Long Click PWR
Exit Edit Settings - Hold PWR
---------- || ----------
OPTIONAL DEFINES (added to CONFIG_TOP in config.h file)
FETT263_EDIT_MODE_MENU
Enable Edit Mode Menu System
Requires ENABLE_ALL_EDIT_OPTIONS
FETT263_EDIT_SETTINGS_MENU
Enable Edit Settings Menu (Volume, Clash Threshold, Blade Length, Gestures/Controls, Brightness)
I recommend setting USB Type = "Serial + WebUSB" under Arduino > Tools to allow for style, font, track, color editing via ProffieOS Workbench
Cannot be combined with FETT263_EDIT_MODE_MENU
Requires ENABLE_ALL_EDIT_OPTIONS
FETT263_SAVE_CHOREOGRAPHY
Enables Enhanced Battle Mode with Saved Choreography, cannot be used with FETT263_SPECIAL_ABILITIES
FETT263_DUAL_MODE_SOUND
Enables odd/even out.wav ignition sound selection based on blade angle
Up = odd number sounds, Down = even numbered sounds
FETT263_CLASH_STRENGTH_SOUND
Enables selection of clash, stab and lockup sounds based on clash strength
Light clash = 01.wav, Hard clash = highest number.wav
FETT263_MAX_CLASH 16
The value for hardest clash level to select clash sound
Range 8 ~ 16
FETT263_QUICK_SELECT_ON_BOOT
Enables Preset Selection Menu on Boot (when power is first applied)
Use Dial Menu to turn to desired preset, click PWR to select or hold PWR to select and ignite
FETT263_SAY_COLOR_LIST
Spoken Color Names replace default sounds during Color List Mode (requires .wav files)
FETT263_SAY_COLOR_LIST_CC
Spoken Color Names replace default sounds during Color Change "CC" Color List Mode (requires .wav files)
FETT263_SAY_BATTERY_VOLTS
Spoken Battery Level as volts during On Demand Battery Level effect (requires .wav files)
FETT263_SAY_BATTERY_PERCENT
Spoken Battery Level as percent during On Demand Battery Level effect (requires .wav files)
== BATTLE MODE OPTIONS ==
Battle Mode is enabled via controls by default in this prop, you can customize further with these defines
FETT263_BATTLE_MODE_ALWAYS_ON - Battle Mode is always on, toggle controls deactivated
This will disable traditional Clash and Stab effects (cannot be used with FETT263_BATTLE_MODE_START_ON)
FETT263_BATTLE_MODE_START_ON - Battle Mode is active with each ignition by default but can be toggled using Aux + Swing control
(cannot be used with FETT263_BATTLE_MODE_ALWAYS_ON)
FETT263_LOCKUP_DELAY 200
This is the "delay" in millis to determine Clash vs Lockup
FETT263_BM_CLASH_DETECT 6
The max value to use clashes in Battle Mode 2.0, clashes used on clash strength below this value
This allows light clashes to produce clash effects instead of using Begin/End Lockup
(above this value Clash is performed by quick pull away using Begin/End Lockup sounds and effect)
Range 0 ~ 8 (note 0 will use Battle Mode 1.0 with all clashes being Begin/End Lockup)
FETT263_BM_DISABLE_OFF_BUTTON
During Battle Mode Power Button Retraction is disabled for normal 2 button control
== Swing On ==
Gesture Ignition via Swing
You can use one of the following defines to enable swing on:
FETT263_SWING_ON - To enable Swing On Ignition control (automatically enters Battle Mode, uses Fast On)
FETT263_SWING_ON_PREON - Disables Fast On ignition for Swing On so Preon is used (cannot be used with FETT263_SWING_ON)
FETT263_SWING_ON_NO_BM - To enable Swing On Ignition control but not activate Battle Mode
(Combine with FETT263_SWING_ON or FETT263_SWING_ON_PREON,
cannot be used with FETT263_BATTLE_MODE_ALWAYS_ON or FETT263_BATTLE_MODE_START_ON)
FETT263_SWING_ON_SPEED 250
Adjust Swing Speed required for Ignition 250 ~ 500 recommended
== Twist Off ==
Gesture Retraction via Twist (back and forth)
FETT263_TWIST_OFF
To enable Twist Off Retraction control
FETT263_TWIST_OFF_NO_POSTOFF
To enable Twist Off Retraction control, skips Postoff
== Twist On ==
Gesture Ignition via Twist (back and forth)
You can use one of the following defines to enable twist on:
FETT263_TWIST_ON - To enable Twist On Ignition control (automatically enters Battle Mode, uses Fast On)
FETT263_TWIST_ON_PREON - Disables Fast On ignition for Twist On so Preon is used (cannot be used with FETT263_TWIST_ON)
FETT263_TWIST_ON_NO_BM - To enable Twist On Ignition control but not activate Battle Mode
(Combine with FETT263_TWIST_ON or FETT263_TWIST_ON_PREON,
cannot be used with FETT263_BATTLE_MODE_ALWAYS_ON or FETT263_BATTLE_MODE_START_ON)
== Stab On ==
Gesture Ignition via Stab (linear movement + clash at tip of blade)
You can use one of the following defines to enable stab on:
FETT263_STAB_ON - To enable Stab On Ignition control (automatically enters Battle Mode, uses Fast On)
FETT263_STAB_ON_PREON - Disables Fast On ignition for Stab On so Preon is used (cannot be used with FETT263_STAB_ON)
FETT263_STAB_ON_NO_BM - To enable Stab On Ignition control but not activate Battle Mode
(Combine with FETT263_STAB_ON or FETT263_STAB_ON_PREON,
cannot be used with FETT263_BATTLE_MODE_ALWAYS_ON or FETT263_BATTLE_MODE_START_ON)
== Thrust On ==
Gesture Ignition via Thrust (linear movement)
You can use one of the following defines to enable thrust on:
FETT263_THRUST_ON - To enable Thrust On Ignition control (automatically enters Battle Mode, uses Fast On)
FETT263_THRUST_ON_PREON - Disables Fast On ignition for Thrust On so Preon is used (cannot be used with FETT263_THRUST_ON)
FETT263_THRUST_ON_NO_BM - To enable Thrust On Ignition control but not activate Battle Mode
(Combine with FETT263_THRUST_ON or FETT263_THRUST_ON_PREON,
cannot be used with FETT263_BATTLE_MODE_ALWAYS_ON or FETT263_BATTLE_MODE_START_ON)
== Gesture Sleep ==
Toggle Gesture Ignition and Retraction detection to disable or enable gesture options
FETT263_SAVE_GESTURE_OFF - Save "Gesture Sleep" setting to turn gesture ignitions and retractions off on boot
== Force Push ==
Push movement triggers push.wav (or force.wav if push.wav is not present)
You can use one of the following defines to enable force push:
FETT263_FORCE_PUSH - To enable gesture controlled Force Push during Battle Mode
(will use push.wav or force.wav if not present)
FETT263_FORCE_PUSH_ALWAYS_ON - To enable gesture controlled Force Push full time
(will use push.wav or force.wav if not present)
FETT263_FORCE_PUSH_LENGTH 5 - Allows for adjustment to Push gesture length in millis needed to trigger Force Push
Recommended range 1 ~ 10, 1 = shortest, easiest to trigger, 10 = longest
FETT263_SPECIAL_ABILITIES
This enables 8 "Special Ability" controls (style controlled), 4 while ON, 4 while OFF.
Special Abilities are controlled by the style and can vary in every preset, they are "user" defined effects/capabilities.
Allows "Multi-Phase" to be style based, replaces FETT263_MULTI_PHASE.
Cannot be used with FETT263_MULTI_PHASE or FETT263_SAVE_CHOREOGRAPHY
FETT263_SPIN_MODE
Enables toggle for "Spin" Mode* which disables all clash/stab/lockup effects to allow for spinning and flourishes.
Cannot be used with FETT263_SAVE_CHOREOGRAPHY or FETT263_HOLD_BUTTON_LOCKUP
*Not the same as ENABLE_SPINS
FETT263_MULTI_PHASE
This will enable a preset change while ON to create a "Multi-Phase" saber effect
MOTION_TIMEOUT 60 * 15 * 1000
This extends the motion timeout to 15 minutes to allow gesture ignition to remain active
Increase/decrease the "15" value as needed
FETT263_MOTION_WAKE_POWER_BUTTON
Enables a click on POWER Button to Wake Up Gestures after MOTION_TIMEOUT without igniting blade.
Saber will play boot sound and gestures will be active.
FETT263_QUOTE_PLAYER_START_ON
This will set Force / Quote Player to play Quote by default (if in font)
FETT263_RANDOMIZE_QUOTE_PLAYER
This will set Quote Player to randomly select quote.wav instead of playing sequentially
FETT263_CIRCULAR_VOLUME_MENU
Changes Volume Menu to Circular Control
FETT263_CIRCULAR_DIM_MENU
Changes Brightness Menu to Circular Control
== Disable Features ==
DISABLE_TALKIE - saves memory by replacing spoken error messages with beep sequences -
FETT263_DISABLE_CHANGE_FONT - Disables the "on-the-fly" Change Font option
FETT263_DISABLE_CHANGE_STYLE - Disables the "on-the-fly" Change Style option
FETT263_DISABLE_COPY_PRESET - Disables the "on-the-fly" Copy Preset option
FETT263_DISABLE_BM_TOGGLE - Disable button control for Battle Mode, use gesture ignition or Special Abilities and/or style to toggle.
FETT263_DISABLE_MULTI_BLAST_TOGGLE - Disable button control for Multi-Blast Mode, use Special Abilities and/or style to toggle.
FETT263_DISABLE_MULTI_BLAST - Disables "Multi-Blast" Mode
FETT263_TRACK_PLAYER_NO_PROMPTS - Disables spoken voice prompts in Track Player
FETT263_DISABLE_QUOTE_PLAYER - Disables Force/Quote player, only uses Force. This will allow Quotes to be controlled by style.
Use FETT263_SPECIAL_ABILITIES to set EFFECT_QUOTE or EFFECT_NEXT_QUOTE in style
Cannot be used with FETT263_RANDOMIZE_QUOTE_PLAYER and FETT263_QUOTE_PLAYER_START_ON
== SA22C 2 Button Variations ==
FETT263_HOLD_BUTTON_OFF - Changes to Hold PWR to turn Off / Retract
FETT263_HOLD_BUTTON_LOCKUP - Enables Hold AUX for Lockup*
Cannot be used with FETT263_SAVE_CHOREOGRAPHY
*Clash Strength / Clash Impact effects and sounds for Lockup negated
*Battle Mode control changes to hold AUX + Swing
== BC Variations ==
FETT263_USE_BC_MELT_STAB
Allows MELT to be gesture controlled full-time, uses Thrust for Stab effect
FETT263_BC_SAY_BATTERY_VOLTS_PERCENT
Spoken Battery Level in volts and percent (point down for volts, parallel or up for percent)
CUSTOM SOUNDS SUPPORTED (add to font to enable):
On Demand Power Save - dim.wav
On Demand Battery Level - battery.wav
Battle Mode On (on toggle) - bmbegin.wav
Battle Mode Off (on toggle) - bmend.wav
Enter Volume Menu - vmbegin.wav
Exit Volume Menu - vmend.wav
Force Push - push.wav
Fast On (optional) - faston.wav
Multi-Blast Mode On - blstbgn.wav
Multi-Blast Mode Off - blstend.wav
Quotes - quote01.wav
Transition Sound - tr.wav
Transition Sound Loop trloop.wav
*/
#ifndef PROPS_SABER_FETT263_BUTTONS_H
#define PROPS_SABER_FETT263_BUTTONS_H
#ifndef MOTION_TIMEOUT
#define MOTION_TIMEOUT 60 * 15 * 1000
#endif
#ifndef FETT263_SWING_ON_SPEED
#define FETT263_SWING_ON_SPEED 250
#endif
#ifndef FETT263_LOCKUP_DELAY
#define FETT263_LOCKUP_DELAY 200
#endif
#ifndef FETT263_BM_CLASH_DETECT
#define FETT263_BM_CLASH_DETECT 0
#endif
#ifndef FETT263_FORCE_PUSH_LENGTH
#define FETT263_FORCE_PUSH_LENGTH 5
#endif
#ifdef FETT263_BC_SAY_BATTERY_VOLTS_PERCENT
#define FETT263_SAY_BATTERY_VOLTS
#define FETT263_SAY_BATTERY_PERCENT
#endif
#if defined(FETT263_EDIT_MODE_MENU) || defined(FETT263_EDIT_SETTINGS_MENU)
#define FETT263_USE_SETTINGS_MENU
#endif
#if defined(FETT263_SAY_COLOR_LIST) || defined(FETT263_SAY_COLOR_LIST_CC)
#define SAY_COLOR_LIST
#endif
#if NUM_BUTTONS < 1
#error /props/saber_fett263_buttons.h requires 1, 2 or 3 Buttons for operation
#endif
#if defined(FETT263_HOLD_BUTTON_LOCKUP) && NUM_BUTTONS == 1
#error FETT263_HOLD_BUTTON_LOCKUP cannot be used with 1 Button Controls
#endif
#if defined(FETT263_HOLD_BUTTON_LOCKUP) && defined(FETT263_SAVE_CHOREOGRAPHY)
#error FETT263_HOLD_BUTTON_LOCKUP cannot be used with FETT263_SAVE_CHOREOGRAPHY
#endif
#if defined(FETT263_EDIT_MODE_MENU) && !defined(ENABLE_ALL_EDIT_OPTIONS)
#error ENABLE_ALL_EDIT_OPTIONS must be defined to enable FETT263_EDIT_MODE_MENU
#endif
#if defined(FETT263_EDIT_SETTINGS_MENU) && !defined(ENABLE_ALL_EDIT_OPTIONS)
#error ENABLE_ALL_EDIT_OPTIONS must be defined to enable FETT263_EDIT_SETTINGS_MENU
#endif
#if defined(FETT263_EDIT_MODE_MENU) && defined(FETT263_EDIT_SETTINGS_MENU)
#error FETT263_EDIT_SETTINGS_MENU cannot be combined with FETT263_EDIT_MODE_MENU
#endif
#if defined(FETT263_DISABLE_QUOTE_PLAYER) && defined(FETT263_QUOTE_PLAYER_START_ON)
#error FETT263_QUOTE_PLAYER_START_ON cannot be used with FETT263_DISABLE_QUOTE_PLAYER
#endif
#if defined(FETT263_SPECIAL_ABILITIES) && defined(FETT263_MULTI_PHASE)
#error FETT263_SPECIAL_ABILITIES cannot be used with FETT263_MULTI_PHASE
#endif
#if defined(FETT263_SPECIAL_ABILITIES) && defined(FETT263_SAVE_CHOREOGRAPHY)
#error FETT263_SPECIAL_ABILITIES cannot be used with FETT263_SAVE_CHOREOGRAPHY
#endif
#if defined(FETT263_BATTLE_MODE_ALWAYS_ON) && defined(FETT263_BATTLE_MODE_START_ON)
#error You cannot define both FETT263_BATTLE_MODE_ALWAYS_ON and FETT263_BATTLE_MODE_START_ON
#endif
#if defined(FETT263_BATTLE_MODE_ALWAYS_ON) && defined(FETT263_SWING_ON_NO_BM)
#error You cannot define both FETT263_BATTLE_MODE_ALWAYS_ON and FETT263_SWING_ON_NO_BM
#endif
#if defined(FETT263_BATTLE_MODE_ALWAYS_ON) && defined(FETT263_TWIST_ON_NO_BM)
#error You cannot define both FETT263_BATTLE_MODE_ALWAYS_ON and FETT263_TWIST_ON_NO_BM
#endif
#if defined(FETT263_BATTLE_MODE_ALWAYS_ON) && defined(FETT263_STAB_ON_NO_BM)
#error You cannot define both FETT263_BATTLE_MODE_ALWAYS_ON and FETT263_STAB_ON_NO_BM
#endif
#if defined(FETT263_BATTLE_MODE_START_ON) && defined(FETT263_SWING_ON_NO_BM)
#error You cannot define both FETT263_BATTLE_MODE_START_ON and FETT263_SWING_ON_NO_BM
#endif
#if defined(FETT263_BATTLE_MODE_START_ON) && defined(FETT263_TWIST_ON_NO_BM)
#error You cannot define both FETT263_BATTLE_MODE_START_ON and FETT263_TWIST_ON_NO_BM
#endif
#if defined(FETT263_BATTLE_MODE_START_ON) && defined(FETT263_STAB_ON_NO_BM)
#error You cannot define both FETT263_BATTLE_MODE_START_ON and FETT263_STAB_ON_NO_BM
#endif
#if defined(FETT263_BATTLE_MODE_START_ON) && defined(FETT263_THRUST_ON_NO_BM)
#error You cannot define both FETT263_BATTLE_MODE_START_ON and FETT263_STAB_ON_NO_BM
#endif
#if defined(FETT263_SPIN_MODE) && defined(FETT263_SAVE_CHOREOGRAPHY)
#error FETT263_SPIN_MODE cannot be used with FETT263_SAVE_CHOREOGRAPHY
#endif
#if defined(FETT263_SPIN_MODE) && defined(FETT263_HOLD_BUTTON_LOCKUP)
#error FETT263_SPIN_MODE cannot be used with FETT263_HOLD_BUTTON_LOCKUP
#endif
#if defined(FETT263_SWING_ON) && defined(FETT263_SWING_ON_PREON)
#error You cannot define both FETT263_SWING_ON and FETT263_SWING_ON_PREON
#endif
#if defined(FETT263_TWIST_ON) && defined(FETT263_TWIST_PREON)
#error You cannot define both FETT263_TWIST_ON and FETT263_TWIST_ON_PREON
#endif
#if defined(FETT263_STAB_ON) && defined(FETT263_STAB_PREON)
#error You cannot define both FETT263_STAB_ON and FETT263_STAB_ON_PREON
#endif
#if defined(FETT263_TWIST_OFF) && defined(FETT263_TWIST_OFF_NO_POSTOFF)
#error You cannot define both FETT263_TWIST_OFF and FETT263_TWIST_OFF_NO_POSTOFF
#endif
#if defined(FETT263_FORCE_PUSH_ALWAYS_ON) && defined(FETT263_FORCE_PUSH)
#error You cannot define both FETT263_FORCE_PUSH_ALWAYS_ON and FETT263_FORCE_PUSH
#endif
#if defined(FETT263_CLASH_STRENGTH_SOUND) && !defined(FETT263_MAX_CLASH)
#define FETT263_MAX_CLASH 16
#endif
#ifdef FETT263_TWIST_OFF
#define TWIST_OFF_GESTURE
#endif
#ifdef FETT263_TWIST_OFF_NO_POSTOFF
#define TWIST_OFF_GESTURE
#endif
#ifdef FETT263_SWING_ON
#define SWING_GESTURE
#endif
#ifdef FETT263_SWING_ON_PREON
#define SWING_GESTURE
#endif
#if defined(FETT263_SWING_ON_NO_BM) && !defined(SWING_GESTURE)
#error FETT263_SWING_ON_NO_BM requires either FETT263_SWING_ON or FETT263_SWING_ON_PREON
#endif
#ifdef FETT263_STAB_ON
#define STAB_GESTURE
#endif
#ifdef FETT263_STAB_ON_PREON
#define STAB_GESTURE
#endif
#if defined(FETT263_STAB_ON_NO_BM) && !defined(STAB_GESTURE)
#error FETT263_STAB_ON_NO_BM requires either FETT263_STAB_ON or FETT263_STAB_ON_PREON
#endif
#ifdef FETT263_TWIST_ON
#define TWIST_GESTURE
#endif
#ifdef FETT263_TWIST_ON_PREON
#define TWIST_GESTURE
#endif
#if defined(FETT263_TWIST_ON_NO_BM) && !defined(TWIST_GESTURE)
#error FETT263_TWIST_ON_NO_BM requires either FETT263_TWIST_ON or FETT263_TWIST_ON_PREON
#endif
#ifdef FETT263_THRUST_ON
#define THRUST_GESTURE
#endif
#ifdef FETT263_THRUST_ON_PREON
#define THRUST_GESTURE
#endif
#if defined(FETT263_THRUST_ON_NO_BM) && !defined(THRUST_GESTURE)
#error FETT263_THRUST_ON_NO_BM requires either FETT263_THRUST_ON or FETT263_THRUST_ON_PREON
#endif
#ifdef FETT263_FORCE_PUSH_ALWAYS_ON
#define FORCE_PUSH_CONDITION true
#define FETT263_FORCE_PUSH
#else
#define FORCE_PUSH_CONDITION battle_mode_
#endif
#if NUM_BUTTONS == 1
/* Tightened click timings
SA22C shortened the timeout for short and double click detection from 500ms
to 300ms. I think it feels more responsive this way but still gives enough
timeout to ensure all button actions can be achieved consistently
SA22C included all button timings so they can be easily tweaked to suit
individual tastes.
*/
#ifndef BUTTON_DOUBLE_CLICK_TIMEOUT
#define BUTTON_DOUBLE_CLICK_TIMEOUT 300
#endif
#ifndef BUTTON_SHORT_CLICK_TIMEOUT
#define BUTTON_SHORT_CLICK_TIMEOUT 300
#endif
#ifndef BUTTON_HELD_TIMEOUT
#define BUTTON_HELD_TIMEOUT 300
#endif
#ifndef BUTTON_HELD_MEDIUM_TIMEOUT
#define BUTTON_HELD_MEDIUM_TIMEOUT 1000
#endif
#ifndef BUTTON_HELD_LONG_TIMEOUT
#define BUTTON_HELD_LONG_TIMEOUT 2000
#endif
#endif
#include "prop_base.h"
#include "../sound/hybrid_font.h"
#include "../sound/effect.h"
#include "../common/current_preset.h"
#include "../common/file_reader.h"
#include "../common/malloc_helper.h"
#ifdef FETT263_EDIT_MODE_MENU
#include "../common/color.h"
#include "../styles/edit_mode.h"
#endif
#undef PROP_TYPE
#define PROP_TYPE SaberFett263Buttons
EFFECT(dim); // for EFFECT_POWERSAVE
EFFECT(battery); // for EFFECT_BATTERY_LEVEL
EFFECT(bmbegin); // for Begin Battle Mode
EFFECT(bmend); // for End Battle Mode
EFFECT(vmbegin); // for Begin Volume Menu
EFFECT(vmend); // for End Volume Menu
EFFECT(faston); // for EFFECT_FAST_ON
EFFECT(blstbgn); // for Begin Multi-Blast
EFFECT(blstend); // for End Multi-Blast
EFFECT(push); // for Force Push gesture in Battle Mode
EFFECT(quote); // quote on force effect
EFFECT(tr);
EFFECT2(trloop, trloop);
#ifdef FETT263_USE_SETTINGS_MENU
EFFECT(medit); // Edit Mode
#endif
#include "../sound/sound_library.h"
class GestureControlFile : public ConfigFile {
public:
void iterateVariables(VariableOP *op) override {
CONFIG_VARIABLE2(gestureon, 1);
#ifdef SWING_GESTURE
CONFIG_VARIABLE2(swingon, 1);
#else
CONFIG_VARIABLE2(swingon, 0);
#endif
CONFIG_VARIABLE2(swingonspeed, FETT263_SWING_ON_SPEED);
#ifdef TWIST_GESTURE
CONFIG_VARIABLE2(twiston, 1);
#else
CONFIG_VARIABLE2(twiston, 0);
#endif
#ifdef THRUST_GESTURE
CONFIG_VARIABLE2(thruston, 1);
#else
CONFIG_VARIABLE2(thruston, 0);
#endif
#ifdef STAB_GESTURE
CONFIG_VARIABLE2(stabon, 1);
#else
CONFIG_VARIABLE2(stabon, 0);
#endif
#ifdef TWIST_OFF_GESTURE
CONFIG_VARIABLE2(twistoff, 1);
#else
CONFIG_VARIABLE2(twistoff, 0);
#endif
#ifdef FETT263_POWER_LOCK
CONFIG_VARIABLE2(powerlock, 1);
#else
CONFIG_VARIABLE2(powerlock, 0);
#endif
#ifdef FORCE_PUSH_CONDITION
CONFIG_VARIABLE2(forcepush, 1);
#else
CONFIG_VARIABLE2(forcepush, 0);