Browse Source

allow triggering channels in settings mode

Thomas Buck 6 months ago
parent
commit
e9c63f8859
1 changed files with 32 additions and 0 deletions
  1. 32
    0
      src/settings.c

+ 32
- 0
src/settings.c View File

@@ -29,6 +29,7 @@
29 29
 #include "lcd.h"
30 30
 #include "log.h"
31 31
 #include "mem.h"
32
+#include "pulse.h"
32 33
 #include "sequence.h"
33 34
 #include "ui.h"
34 35
 #include "usb.h"
@@ -65,6 +66,36 @@ static void settings_buttons(enum buttons btn, bool val) {
65 66
             break;
66 67
         }
67 68
 
69
+        case BTN_A:
70
+        case BTN_E: {
71
+            if (val) {
72
+                pulse_trigger_out(0, mem_data()->ch_timings[0]);
73
+                pulse_trigger_led(0, mem_data()->ch_timings[0]);
74
+                pulse_trigger_led(4, mem_data()->ch_timings[0]);
75
+            }
76
+            break;
77
+        }
78
+
79
+        case BTN_B:
80
+        case BTN_F: {
81
+            if (val) {
82
+                pulse_trigger_out(1, mem_data()->ch_timings[1]);
83
+                pulse_trigger_led(1, mem_data()->ch_timings[1]);
84
+                pulse_trigger_led(5, mem_data()->ch_timings[1]);
85
+            }
86
+            break;
87
+        }
88
+
89
+        case BTN_C:
90
+        case BTN_G: {
91
+            if (val) {
92
+                pulse_trigger_out(2, mem_data()->ch_timings[2]);
93
+                pulse_trigger_led(2, mem_data()->ch_timings[2]);
94
+                pulse_trigger_led(6, mem_data()->ch_timings[2]);
95
+            }
96
+            break;
97
+        }
98
+
68 99
         default: {
69 100
             break;
70 101
         }
@@ -104,6 +135,7 @@ void settings_run(void) {
104 135
         watchdog_update();
105 136
         buttons_run();
106 137
         encoder_run();
138
+        pulse_run();
107 139
         usb_run();
108 140
         cnsl_run();
109 141
 

Loading…
Cancel
Save