diff options
author | px4dev <px4@purgatory.org> | 2012-09-03 23:21:41 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-09-03 23:21:41 -0700 |
commit | 62682d805ec234ecb4f5396ca2c7a072ce3f753c (patch) | |
tree | c5d757713a9c4601dcb0c9a3a5f96cdd9b47dcd1 /apps/systemlib | |
parent | 5c692e29710666bb85efa8ac397526fed72edaee (diff) | |
download | px4-firmware-62682d805ec234ecb4f5396ca2c7a072ce3f753c.tar.gz px4-firmware-62682d805ec234ecb4f5396ca2c7a072ce3f753c.tar.bz2 px4-firmware-62682d805ec234ecb4f5396ca2c7a072ce3f753c.zip |
Avoid a couple of unnecessary promotions to double.
Diffstat (limited to 'apps/systemlib')
-rw-r--r-- | apps/systemlib/mixer/mixer_multirotor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/systemlib/mixer/mixer_multirotor.cpp b/apps/systemlib/mixer/mixer_multirotor.cpp index 7d1605917..e2576a848 100644 --- a/apps/systemlib/mixer/mixer_multirotor.cpp +++ b/apps/systemlib/mixer/mixer_multirotor.cpp @@ -141,7 +141,7 @@ MultirotorMixer::MultirotorMixer(ControlCallback control_cb, _roll_scale(roll_scale), _pitch_scale(pitch_scale), _yaw_scale(yaw_scale), - _deadband(-1.0 + deadband), /* shift to output range here to avoid runtime calculation */ + _deadband(-1.0f + deadband), /* shift to output range here to avoid runtime calculation */ _rotor_count(_config_rotor_count[geometry]), _rotors(_config_index[geometry]) { @@ -179,7 +179,7 @@ MultirotorMixer::mix(float *outputs, unsigned space) fixup_scale = 2.0f; } for (unsigned i = 0; i < _rotor_count; i++) - outputs[i] = -1.0 + (outputs[i] * fixup_scale); + outputs[i] = -1.0f + (outputs[i] * fixup_scale); /* ensure outputs are out of the deadband */ for (unsigned i = 0; i < _rotor_count; i++) |