Skip to content

Commit

Permalink
AP_VideoTX: Change division to multiplication
Browse files Browse the repository at this point in the history
  • Loading branch information
muramura authored and peterbarker committed Jan 1, 2025
1 parent 039cffb commit 120dcb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/AP_VideoTX/AP_VideoTX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ uint8_t AP_VideoTX::update_power_dbm(uint8_t power, PowerActive active)
_power_levels[VTX_MAX_POWER_LEVELS-1].dbm = power;
_power_levels[VTX_MAX_POWER_LEVELS-1].level = 255;
_power_levels[VTX_MAX_POWER_LEVELS-1].dac = 255;
_power_levels[VTX_MAX_POWER_LEVELS-1].mw = uint16_t(roundf(powf(10, power / 10.0f)));
_power_levels[VTX_MAX_POWER_LEVELS-1].mw = uint16_t(roundf(powf(10, power * 0.1f)));
_power_levels[VTX_MAX_POWER_LEVELS-1].active = active;
debug("non-standard power %ddbm -> %dmw", power, _power_levels[VTX_MAX_POWER_LEVELS-1].mw);
return VTX_MAX_POWER_LEVELS-1;
Expand Down

0 comments on commit 120dcb7

Please sign in to comment.