File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 2525
2626static bool manual_control_enabled = false ;
2727
28- void LedCtrlClass::begin (const bool manual_control) {
29- manual_control_enabled = manual_control;
30-
28+ void LedCtrlClass::begin () {
3129 pinMode (LED_CELL_PIN, OUTPUT);
3230 pinMode (LED_CON_PIN, OUTPUT);
3331 pinMode (LED_DATA_PIN, OUTPUT);
@@ -41,6 +39,11 @@ void LedCtrlClass::begin(const bool manual_control) {
4139 this ->off (Led::USER);
4240}
4341
42+ void LedCtrlClass::beginManual () {
43+ manual_control_enabled = true ;
44+ this ->begin ();
45+ }
46+
4447uint8_t LedCtrlClass::getLedPin (Led led) {
4548 uint8_t targetPin = 0 ;
4649 switch (led) {
Original file line number Diff line number Diff line change @@ -31,7 +31,15 @@ class LedCtrlClass {
3131 * @param manual_control Set to true if the system should *not* modify the
3232 * leds automatically (for example when the LTE modem is connected).
3333 */
34- void begin (const bool manual_control = false );
34+ void begin ();
35+
36+ /* *
37+ * @brief Start the LED control module in manual mode. In manual mode, the
38+ * system should *not* modify the LEDs automatically (for example when the
39+ * LTE modem is connected).
40+ *
41+ */
42+ void beginManual ();
3543
3644 /* *
3745 * @return The pin associated with the given LED.
You can’t perform that action at this time.
0 commit comments