Fix charge calculation
This commit is contained in:
@@ -200,7 +200,7 @@ float MultiColorLight::modelChargeConsumption(uint8_t index, uint32_t color,
|
||||
}
|
||||
uint32_t normalizedColor = normalizeColor(color);
|
||||
float ledConsumption = modelCurrentConsumption(normalizedColor);
|
||||
return ledConsumption * durationMs * 10e6;
|
||||
return (ledConsumption * durationMs) / 10e6f;
|
||||
};
|
||||
|
||||
float MultiColorLight::modelChargeConsumption(leds leds, uint32_t color,
|
||||
@@ -235,6 +235,7 @@ float MultiColorLight::modelChargeConsumption(leds leds, uint32_t color,
|
||||
// TODO logging
|
||||
break;
|
||||
}
|
||||
return ledsConsumption;
|
||||
};
|
||||
|
||||
float MultiColorLight::modelChargeConsumption(leds leds, uint8_t red,
|
||||
|
||||
Reference in New Issue
Block a user