Fix mistakes
This commit is contained in:
@@ -80,8 +80,6 @@ void InfraredLED::setState(bool state){
|
||||
|
||||
void InfraredLED::sendFrequency(uint16_t frequency){
|
||||
constexpr uint32_t duty = DUTY_CYCLE_FREQUENCY;
|
||||
// Float to force float division without casting
|
||||
constexpr float resolution = 1 << DUTY_RESOLUTION;
|
||||
if (this->ledPin == IR_BOTTOM_PIN) {
|
||||
PowerManager::waitForCurrentAllowance(
|
||||
PowerParameters::PowerConsumers::LED_IR_BOTTOM,
|
||||
@@ -111,8 +109,6 @@ float InfraredLED::modelCurrentConsumption(uint32_t duty){
|
||||
};
|
||||
|
||||
float InfraredLED::modelChargeConsumptionOn(uint16_t durationMs) {
|
||||
// Float to force float division without casting
|
||||
constexpr float resolution = 1 << DUTY_RESOLUTION;
|
||||
if (this->ledPin == IR_BOTTOM_PIN) {
|
||||
return durationMs *
|
||||
(PowerParameters::CurrentConsumptions::CURRENT_LED_IR_BOTTOM) / 10e6f;
|
||||
@@ -124,8 +120,6 @@ float InfraredLED::modelChargeConsumptionOn(uint16_t durationMs) {
|
||||
}
|
||||
|
||||
float InfraredLED::modelChargeConsumptionSendFrequency(uint16_t durationMs) {
|
||||
// Float to force float division without casting
|
||||
|
||||
return (durationMs * this->modelCurrentConsumption(DUTY_CYCLE_FREQUENCY)) /
|
||||
return (durationMs * this->modelCurrentConsumption(DUTY_CYCLE_FREQUENCY)) /
|
||||
10e6f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user