From 3b151e67ec563df3b3256220c3e56e901977a948 Mon Sep 17 00:00:00 2001 From: Randy Russell Date: Wed, 23 Sep 2026 16:54:01 -0400 Subject: [PATCH 1/5] Move Specs before LEDs. Hardware should precede runtime tweaking. --- src/conf/settings.xml | 66 +++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/conf/settings.xml b/src/conf/settings.xml index 779b0900..bd6d47c8 100644 --- a/src/conf/settings.xml +++ b/src/conf/settings.xml @@ -4382,6 +4382,39 @@ p, li { white-space: pre-wrap; } remote_throttle_grace_period + + Specs + + ::sep::Refloat Package Details + disabled + ::sep::Voltage Pushbacks + tiltback_hv + tiltback_lv + ::sep::Foot Sensors + fault_adc1 + fault_adc2 + hardware.swap_footpad_adcs + is_footbeep_enabled + ::sep::Miscellaneous + is_beeper_enabled + ::sep::Leds (changes require reboot) + hardware.leds.mode + hardware.leds.pin + hardware.leds.pin_config + hardware.leds.status.order + hardware.leds.status.count + hardware.leds.status.color_order + hardware.leds.status.reverse + hardware.leds.front.order + hardware.leds.front.count + hardware.leds.front.color_order + hardware.leds.front.reverse + hardware.leds.rear.order + hardware.leds.rear.count + hardware.leds.rear.color_order + hardware.leds.rear.reverse + + LEDs @@ -4431,39 +4464,6 @@ p, li { white-space: pre-wrap; } leds.status_idle.speed - - Specs - - ::sep::Refloat Package Details - disabled - ::sep::Voltage Pushbacks - tiltback_hv - tiltback_lv - ::sep::Foot Sensors - fault_adc1 - fault_adc2 - hardware.swap_footpad_adcs - is_footbeep_enabled - ::sep::Miscellaneous - is_beeper_enabled - ::sep::Leds (changes require reboot) - hardware.leds.mode - hardware.leds.pin - hardware.leds.pin_config - hardware.leds.status.order - hardware.leds.status.count - hardware.leds.status.color_order - hardware.leds.status.reverse - hardware.leds.front.order - hardware.leds.front.count - hardware.leds.front.color_order - hardware.leds.front.reverse - hardware.leds.rear.order - hardware.leds.rear.count - hardware.leds.rear.color_order - hardware.leds.rear.reverse - - BMS From 1143228de3ae27c006f9e01df49e52975a87c2f3 Mon Sep 17 00:00:00 2001 From: Randy Russell Date: Mon, 28 Sep 2026 20:34:32 -0400 Subject: [PATCH 2/5] Revert "Move Specs before LEDs. Hardware should precede runtime tweaking." This reverts commit 3b151e67ec563df3b3256220c3e56e901977a948. --- src/conf/settings.xml | 66 +++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/conf/settings.xml b/src/conf/settings.xml index bd6d47c8..779b0900 100644 --- a/src/conf/settings.xml +++ b/src/conf/settings.xml @@ -4382,39 +4382,6 @@ p, li { white-space: pre-wrap; } remote_throttle_grace_period - - Specs - - ::sep::Refloat Package Details - disabled - ::sep::Voltage Pushbacks - tiltback_hv - tiltback_lv - ::sep::Foot Sensors - fault_adc1 - fault_adc2 - hardware.swap_footpad_adcs - is_footbeep_enabled - ::sep::Miscellaneous - is_beeper_enabled - ::sep::Leds (changes require reboot) - hardware.leds.mode - hardware.leds.pin - hardware.leds.pin_config - hardware.leds.status.order - hardware.leds.status.count - hardware.leds.status.color_order - hardware.leds.status.reverse - hardware.leds.front.order - hardware.leds.front.count - hardware.leds.front.color_order - hardware.leds.front.reverse - hardware.leds.rear.order - hardware.leds.rear.count - hardware.leds.rear.color_order - hardware.leds.rear.reverse - - LEDs @@ -4464,6 +4431,39 @@ p, li { white-space: pre-wrap; } leds.status_idle.speed + + Specs + + ::sep::Refloat Package Details + disabled + ::sep::Voltage Pushbacks + tiltback_hv + tiltback_lv + ::sep::Foot Sensors + fault_adc1 + fault_adc2 + hardware.swap_footpad_adcs + is_footbeep_enabled + ::sep::Miscellaneous + is_beeper_enabled + ::sep::Leds (changes require reboot) + hardware.leds.mode + hardware.leds.pin + hardware.leds.pin_config + hardware.leds.status.order + hardware.leds.status.count + hardware.leds.status.color_order + hardware.leds.status.reverse + hardware.leds.front.order + hardware.leds.front.count + hardware.leds.front.color_order + hardware.leds.front.reverse + hardware.leds.rear.order + hardware.leds.rear.count + hardware.leds.rear.color_order + hardware.leds.rear.reverse + + BMS From a937276bc47d6b2cb9738a3359a15a3ea6c993a6 Mon Sep 17 00:00:00 2001 From: Randy Russell Date: Mon, 28 Sep 2026 20:54:28 -0400 Subject: [PATCH 3/5] Clarify relationship between LEDs and Headlights --- src/conf/settings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conf/settings.xml b/src/conf/settings.xml index 779b0900..87a3f863 100644 --- a/src/conf/settings.xml +++ b/src/conf/settings.xml @@ -2642,21 +2642,21 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Roboto'; ; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Turns LEDs on or off completely.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Turns LEDs on or off completely. Headlights will not operate if LEDs are not turned On here.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The LEDs on/off state can be toggled in runtime from the Refloat UI tab. After they're toggled this way, this option no longer affects the LEDs state until the board is restarted.</p></body></html> CFG_DFLT_LEDS_ON 1 - Headlights On + Headlights Enabled 5 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Roboto'; ; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Turns headlights and tail lights on or off. Headlights and taillights activate when you engage the board (using the Headlights Transition). They switch according to the direction you ride.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Turns headlights and tail lights on or off. Headlights and taillights activate when you engage the board (using the Headlights Transition). They switch according to the direction you ride. LEDs must be On in order for Headlights to be activated.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Primary use of headlights is the white and red light for riding at night, but the settings are the exact same for Headlights, Taillights, Front and Rear. Use headlights to get whatever cool effect you want that'll switch to nose/tail according to the direction you ride.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> @@ -2676,7 +2676,7 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Roboto'; ; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Transition to and from headlights and taillights. Occurs when you engage the board if you have the headlights on.</p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Transition to and from LEDs as configured with Front and Rear to Headlights and Taillights. The transition occurs when you engage the board if you have enabled Headlights.</p></body></html> CFG_DFLT_LEDS_HEADLIGHTS_TRANSITION 0 Fade From 02c5986ef91a0673e933c010bd212bcf8da8ff2a Mon Sep 17 00:00:00 2001 From: Randy Russell Date: Tue, 29 Sep 2026 13:46:58 -0400 Subject: [PATCH 4/5] Revert "Clarify relationship between LEDs and Headlights" This reverts commit a937276bc47d6b2cb9738a3359a15a3ea6c993a6. --- src/conf/settings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conf/settings.xml b/src/conf/settings.xml index 87a3f863..779b0900 100644 --- a/src/conf/settings.xml +++ b/src/conf/settings.xml @@ -2642,21 +2642,21 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Roboto'; ; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Turns LEDs on or off completely. Headlights will not operate if LEDs are not turned On here.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Turns LEDs on or off completely.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The LEDs on/off state can be toggled in runtime from the Refloat UI tab. After they're toggled this way, this option no longer affects the LEDs state until the board is restarted.</p></body></html> CFG_DFLT_LEDS_ON 1 - Headlights Enabled + Headlights On 5 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Roboto'; ; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Turns headlights and tail lights on or off. Headlights and taillights activate when you engage the board (using the Headlights Transition). They switch according to the direction you ride. LEDs must be On in order for Headlights to be activated.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Turns headlights and tail lights on or off. Headlights and taillights activate when you engage the board (using the Headlights Transition). They switch according to the direction you ride.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Primary use of headlights is the white and red light for riding at night, but the settings are the exact same for Headlights, Taillights, Front and Rear. Use headlights to get whatever cool effect you want that'll switch to nose/tail according to the direction you ride.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> @@ -2676,7 +2676,7 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Roboto'; ; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Transition to and from LEDs as configured with Front and Rear to Headlights and Taillights. The transition occurs when you engage the board if you have enabled Headlights.</p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Transition to and from headlights and taillights. Occurs when you engage the board if you have the headlights on.</p></body></html> CFG_DFLT_LEDS_HEADLIGHTS_TRANSITION 0 Fade From c0207cb18f5ab5152daa892ebd1541c93e9826cf Mon Sep 17 00:00:00 2001 From: Randy Russell Date: Tue, 29 Sep 2026 17:57:21 -0400 Subject: [PATCH 5/5] Use LEDs consistently, rather than interchangeably with Lights --- src/conf/datatypes.h | 2 +- src/conf/settings.xml | 8 ++++---- src/lcm.c | 6 +++--- src/lcm.h | 2 +- src/leds.c | 8 ++++---- ui.qml.in | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/conf/datatypes.h b/src/conf/datatypes.h index d7c22bd8..0d908fa3 100644 --- a/src/conf/datatypes.h +++ b/src/conf/datatypes.h @@ -144,7 +144,7 @@ typedef struct { LedTransition headlights_transition; LedTransition direction_transition; - bool lights_off_when_lifted; + bool leds_off_when_lifted; bool status_on_front_when_lifted; LedBar headlights; diff --git a/src/conf/settings.xml b/src/conf/settings.xml index 779b0900..5df189e1 100644 --- a/src/conf/settings.xml +++ b/src/conf/settings.xml @@ -2700,7 +2700,7 @@ p, li { white-space: pre-wrap; } Cipher Mono Cipher - + Lights Off When Lifted 5 1 @@ -2711,7 +2711,7 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">When enabled, turns off front and rear leds when you lift the board nose up (pitch angle &gt; 60°). So that the LEDs don't blast into your eyes when you carry it.</p></body></html> CFG_DFLT_LEDS_LIGHTS_OFF_WHEN_LIFTED 1 - + Status On Front When Lifted 5 @@ -4137,7 +4137,7 @@ p, li { white-space: pre-wrap; } leds.headlights_on leds.headlights_transition leds.direction_transition - leds.lights_off_when_lifted + leds.leds_off_when_lifted leds.status_on_front_when_lifted leds.front.mode leds.front.brightness @@ -4390,7 +4390,7 @@ p, li { white-space: pre-wrap; } leds.headlights_on leds.headlights_transition leds.direction_transition - leds.lights_off_when_lifted + leds.leds_off_when_lifted leds.status_on_front_when_lifted ::sep::Front leds.front.mode diff --git a/src/lcm.c b/src/lcm.c index e1975bcf..72673e52 100644 --- a/src/lcm.c +++ b/src/lcm.c @@ -31,7 +31,7 @@ void lcm_init(LcmData *lcm, CfgHwLeds *hw_cfg) { lcm->status_brightness = 0; lcm->name[0] = '\0'; lcm->payload_size = 0; - lcm->lights_off_when_lifted = true; + lcm->leds_off_when_lifted = true; } void lcm_configure(LcmData *lcm, const Leds *leds) { @@ -56,7 +56,7 @@ void lcm_configure(LcmData *lcm, const Leds *leds) { } lcm->brightness_idle = cfg->front.brightness * 100; } - lcm->lights_off_when_lifted = cfg->lights_off_when_lifted; + lcm->leds_off_when_lifted = cfg->leds_off_when_lifted; } void lcm_poll_request(LcmData *lcm, uint8_t *buffer, size_t len) { @@ -102,7 +102,7 @@ void lcm_poll_response( buffer[ind++] = fminf(100, fabsf(motor->duty_cycle.value * 100)); } else { // pitch is a value between -180 and +180, so abs(pitch) fits into uint8 - buffer[ind++] = lcm->lights_off_when_lifted ? fabsf(pitch) : 0; + buffer[ind++] = lcm->leds_off_when_lifted ? fabsf(pitch) : 0; } buffer_append_float16(buffer, motor->erpm, 1e0, &ind); diff --git a/src/lcm.h b/src/lcm.h index 4bb8e33c..fbe12b06 100644 --- a/src/lcm.h +++ b/src/lcm.h @@ -42,7 +42,7 @@ typedef struct { uint8_t brightness; uint8_t brightness_idle; uint8_t status_brightness; - bool lights_off_when_lifted; + bool leds_off_when_lifted; char name[MAX_LCM_NAME_LENGTH]; uint8_t payload[MAX_LCM_PAYLOAD_LENGTH]; diff --git a/src/leds.c b/src/leds.c index a998edac..a146781f 100644 --- a/src/leds.c +++ b/src/leds.c @@ -984,7 +984,7 @@ void leds_update( } else if (leds->board_is_upright && leds->pitch < 50) { leds->board_is_upright = false; leds->status_idle_time = current_time; - if (leds->cfg->lights_off_when_lifted) { + if (leds->cfg->leds_off_while_lifted) { front_rear_animation_reset(leds, current_time); } } @@ -1030,7 +1030,7 @@ void leds_update( if (status_on_front) { rate_limitf(&leds->front_strip.brightness, status_brightness, BR_RATE); } else { - if (leds->board_is_upright && leds->cfg->lights_off_when_lifted) { + if (leds->board_is_upright && leds->cfg->leds_off_while_lifted) { rate_limitf(&leds->front_strip.brightness, 0.0f, BR_RATE); } else { rate_limitf(&leds->front_strip.brightness, leds->front_bar->brightness, BR_RATE); @@ -1038,7 +1038,7 @@ void leds_update( } // rear brightness - if (leds->board_is_upright && leds->cfg->lights_off_when_lifted) { + if (leds->board_is_upright && leds->cfg->leds_off_while_lifted) { rate_limitf(&leds->rear_strip.brightness, 0.0f, BR_RATE); } else { rate_limitf(&leds->rear_strip.brightness, leds->rear_bar->brightness, BR_RATE); @@ -1234,7 +1234,7 @@ void leds_update( if (leds->cfg->status_on_front_when_lifted && leds->status_on_front_blend > 0.0f && leds->front_strip.length > 0) { - if (leds->cfg->lights_off_when_lifted && + if (leds->cfg->leds_off_while_lifted && current_time - leds->status_on_front_idle_time > 3.0f) { rate_limitf(&leds->status_on_front_idle_blend, 1.0f, BR_RATE); } else { diff --git a/ui.qml.in b/ui.qml.in index 83ac8077..f3923f83 100644 --- a/ui.qml.in +++ b/ui.qml.in @@ -7699,7 +7699,7 @@ Item { Button { Layout.preferredWidth: 3 * unit Layout.alignment: Qt.AlignHCenter - text: lights.on ? "Lights Off" : "Lights On" + text: lights.on ? "LEDs Off" : "LEDs On" onClicked: { commands.sendLightsControl(!lights.on); }