Remove intermediate variable to save memory

This commit is contained in:
Daniel Öster 2025-01-08 18:04:35 +02:00
parent 64e633f10f
commit 77d83e5eb1

View file

@ -92,11 +92,10 @@ void LED::classic_run(void) {
void LED::flow_run(void) {
// Determine how bright the LED should be
int16_t power_W = datalayer.battery.status.active_power_W;
if (power_W < -50) {
if (datalayer.battery.status.active_power_W < -50) {
// Discharging
brightness = max_brightness - up_down(0.95);
} else if (power_W > 50) {
} else if (datalayer.battery.status.active_power_W > 50) {
// Charging
brightness = up_down(0.95);
} else {