AP_HAL_AVR_SITL: use SIM_BATT_VOLTAGE parameter

This commit is contained in:
Randy Mackay 2013-10-02 17:44:49 +09:00
parent 8d1d8c78b5
commit db2975901d
1 changed files with 1 additions and 1 deletions

View File

@ -482,7 +482,7 @@ void SITL_State::_simulator_output(void)
float throttle = _motors_on?(control.pwm[2]-1000) / 1000.0f:0;
// lose 0.7V at full throttle
float voltage = 12.6 - 0.7f*throttle;
float voltage = _sitl->batt_voltage - 0.7f*throttle;
// assume 50A at full throttle
float current = 50.0 * throttle;
// assume 3DR power brick