LCM Firmware features / improvements / bugfixes
What’s LCM?
The “Light Control Module” in the Floatwheel ADV/Pro controls the lights, a buzzer, as well as the power state of the controller. It runs basic firmware, so its behavior is changeable, Tony published a copy of the source code.
All ADV/GTV/XRV/PintV come with the basic LCM firmware behavior (see description further down)
IMPORTANT: The LCM on the ADV/GTV/XRV/PintV is not optional
- it also controls VESC power (and on the ADV also charging)!!
- it contains the bluetooth module and most connectors
Behavior of Latest LCM v2.1.5 Firmware available on Discord:
Features / improvements:
- Knight Rider idle animation
- Soft/faded and delayed switching of forward/backward lights
- Show duty cycle on the status bar when riding (70 percent and above)
- Duty beep/buzz now only above 90% duty
- Default light brightness set by float/refloat package config on boot
- Control light brightness and on/off via AppUI and external apps
- Power down LED pattern
- Power down the board via external apps
- Show flywheel mode, hand test, or disabled mode on the status bar
** Disabled mode: 2 red LEDs in the center
** Hand test: 4 pulsating LEDs (red…yellow) in the center, 1 blue LED each for ADC1/ADC2 - Headlights off when the board is in the upright position
- Board shutdown via app (obviously only when not riding)
- ADV only: Don’t power down controller when charging
- ADV only: Charging done: all LEDs on in bright green (instead of white)
- Preview of light level when toggling via button (or you can listen for the beeps)
** 1 beep: lights off
** 2 beeps: lights medium
** 3 beeps: lights max brightness
How does it work without a firmware update?
Aka Tony’s out-of-the-box version
The Floatwheel/GTV/PintV is equipped with a status LED bar of 10 addressable RGB LEDs and 2 WHITE / RED LED HEADLIGHTS arranged on the front and rear area of the board.
BOOT: When the start button is pressed for a short time, the headlights turn on and the board carries out a start cycle with a light blue progression of the LED light bar, at the end of the boot cycle it emits a beep and shows the battery charge level. The headlights turn on in the default mode (day mode)
BATTERY LEVEL: the LED light bar shows the battery charge status (I assume taking into account the percentage of the charge level), each notch is equivalent to 10% from left to right. The color is white, the last two LEDs become red when the state of charge is at 20% and 10%. When the board is almost empty the last red LED begins to flash smoothly.
FOOTPAD ACTIVATION: the indication of footpad activation replaces the battery level indication when you press even just one side. If you press the left side the 5 left LEDs light up in blue, in the same way if you press the right side the 5 right LEDs light up again in blue, all LEDs light up if both sides are active.
This behavior applies both when idle and while driving as long as a certain speed threshold is not exceeded, at which point the board returns to showing the battery level.
However, when riding, the battery level is not always indicated and does not seem to have predictive behavior based on speed because it turns on and off quite randomly, This is a malfunction for sure
HEADLIGHTS:
the LED strips are equipped with white and red LEDs which light up alternately based on the direction of travel. When moving in one direction the LED pointing in that direction is white, on the opposite direction it is red. Changing the direction of travel, the color change is quite sudden
RIDING LIGHT MODES:
-
DAY MODE (default - low brightness): in this mode the brightness of the LED light bar is at maximum, so as to be visible despite direct sunlight; the brightness of the headlights is at minimum acting as car’s daylights.
-
SUNRISE/SUNSET MODE (middle intensity): can be activated by pressing the power button twice, you can hear 2 beeps. The brightness of the LED light bar is intermediate as are the headlights.
-
EVENING/NIGHT MODE (max brightness): can be activated by pressing the power button 2 more times, you can hear 3 beeps. The brightness of the LED light bar is at minimum to avoid blinding the rider, while the headlights are at maximum brightness to ensure maximum visibility.
By pressing the power button 2 more times from mode 3) you can return to mode 1), only one beep will be heard this time. -
GTV/XRV/PintV only: lights off
By switching the modes while idle, in addition to the acoustic signal you will notice the actual change in brightness based on the selected mode, but only for a few seconds, after which it returns to a low brightness level. This is to save battery when you don’t get on the board.
As soon as you press even just one side of the front footpad, the brightness gradually increases until it reaches the intensity of the selected mode, therefore also while riding. As soon as the pressure is removed (you get off the board) all the lights return to low consumption mode.
It is possible to select the different light modes even while driving
It is not possible to turn off the headlights when the board is on, whether idle or while riding.
By holding down the power button for 2-3 seconds, the board and all the lights turn off.
CHARGING ADV: the moment you insert the charging plug, the board goes into charging mode. The headlights are off and the status LED bar will show the battery charging status in the same colours, with a soft and slow flash. In this mode it is not possible to turn on the board even by pressing the power button and therefore it is not possible to connect it to the vesc tool APP.
CHARGING GTV/XRV/PintV: The LCM doesn’t know whether you’re charging or not…
BUZZER: The LCM will beep whenever duty exceeds 70% - the buzzer can be disabled by 3x pressing the power button, but only for the current session.
Known issues:
- Buzzer glitch: If you don’t wait for the confirmation beeps when changing between lighting modes, the buzzer will either stop working completely or get stuck on (FIXED, Dec 27th 2023)
Tony’s Wish List
- We need to be able to turn the lights off
- We want to disable the motor when charging but keep the VESC turned on so people can see battery%(need some help code wise, what’s the best way of disable the motor from uart commands? We didn’t know how to do it from the code side, so we just turned the VESC dcdc converter off)
- We need some cool rainbow boot sequence🤣
- We probably give up the duty cycle displaying on the battery bar cuz it’s already super busy with footsensor battery% display and it’s gonna add more confusion on the bar for new users.
** Dado’s comment: new users should NOT be looking at the status bar while riding hahaha
- configurable functionality
low speed
option1: show footpad status at low speed
option2: show battery level at low speed
option3: remain dark at low speed
- buzzer:
re-enable buzzer for button press confirmations
use buzzer as float config proxy buzzer