This affects how soon after a backtransition the vehicle has the
full hover controller running again. Specifically it reduces the
duration of the ramp down of the motors prior to tilting them.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
COM_ARMABLE is set to "Disabled" will prevent arming.
This allows to set the parameter when ground demoing a drone or
if it's in maintenance for safety reasons.
const char *data = "www\r\n";
Defines a cstring of 6 bytes: 'w', 'w', 'w', '\r', '\n', '\0'
type of data: char const*
type of &data: char const**
So when we call
write(_fd, &data, strlen(data));
then strlen(data) == 5
and we send the 4 byte memory address of data
+ some additional random byte.
Correct is
write(_fd, data, strlen(data));
where char const* gets casted to const void * and we pass
the pointer to the content of data.
The fundamental problem here is write() not being typesafe.
Before this the ESC calibration aborts if battery detection doesn't work.
The problem is if the user still connects the battery as he gets instructed
and the calibration aborts then the ESCs are in calibration mode and
after abortion calibrate to the wrong value.
Also I realized there's no additional safety by aborting the calibration
if the battery cannot be detected during the timeout because a pixhawk
board without power module will report a battery status from the
ADC driverand in it that no battery is connected which is the best
it can do. In this situation the motors will still spin if the
ESCs are powered.
Some ESCs e.g. Gaui enter the menu relatively quickly if the
signal is high for too long. To solve that it's kept high shorter.
Also all tested ESCs detect the low signal within a shorter time
so no need to wait longer.
- Change timings for a more reliable calibration.
- Make sure there's an error message when battery measurement is not
available also when it gets disabled after system boot in the power
just above the calibration button.
- Safety check if measured electrical current goes up after issuing the
high calibration value for the case the user did not unplug power
and the detection either fails or is not enforced.
Before:
When the mixed throttle for the motor was exactly zero the ramp went
from the disarmed PWM value to the minimum PWM value.
When the throttle was even just slightly different from zero the ramp
made a jump up to the commanded throttle scaled between
disarmed PWM and maximum PWM, then ramped between
disarmed PWM and minimum PWM and at the end jumped up again to
the commanded throttle scaled between minimum PWM and maximum PWM.
After:
The ramp goes from disarmed PWM value to the the
commanded throttle scaled between minimum PWM and maximum PWM.
If the commanded throttle changes during the ramp then the scale and
hence also end value of the ramp changes.
When at rest, directly fuse the gyro data as an observation of its bias.
This allows to strongly observe the gyro biases without having to fuse a
constant heading that makes the ekf too confident about its heading.