It was noticed that GPS startup time increased when the change was made
from using EGNOS by default to using AUTO by default.
The default is still AUTO but faster GPS startup times may be achieved
by telling the GPS receiver what region you are in.
This also removes more unfinished MTK gps provider support.
The primary reason is to support the D4R-II with it's much faster PWM
frequency. The PWM RSSI code could not keep up, and since there are no
timers free for using capture compare of PWM signals in hardware one
solution is to use the ADC at a slow sample rate.
RC2 is used as before and it expects a signal between 0 and 3.3v. An
inline smoothing capacitor may help.
This commit also removes the cli command adc_power_channel since the
reading was never actually exposed anywhere.
Also support FrSky 1khz RSSI. See documentation also added in this
commit.
This commit also cleans up the PWM mapping code. 'mask' didn't need to
be a mask and it wasn't possible to add another 'type' since there were
only 4 possible values when it was a mask and they were already defined.
Combined with switching to using 16 bits instead of 8 for the mapping
configurations, it's now possible to have 256 types instead of 4 at the
expense of a few bytes of flash.
Moved the RSSI calculation into rx_common.c, previously it was in the
main loop.
The index is not really a user concern and leads to confusion. gps
baudrate is not set like any other baud date and the determination of an
appropriate index is hidden from the user.
If the user specifies a baudrate that is not supported the default index
is used which is current the index for 115200.
This also allows GPS to work on softserial ports at up to 19200.
The old code was using f.ACC_CALIBRATED to mean 'flash the warning led'
and 'prevent arming'
There was another flag called f.OK_TO_ARM which really meant 'prevent
arming after failsafe unless using a switch to arm' - this meant the
comment in the code was incorrect since it did not mention the switch.
There was code which every ~71 minutes would set f.ACC_CALIBRATED to
FALSE and would toggle the LED, even when flying.
There was code that was run during every cycle that did not need to be
run when armed.
There was code that was run during every cycle which did not need to be
run when waiting for calibration to finish.
The warning light was toggled regardless of actual accelerometer
calibration state.
This commit fixes all that and prevents the user from arming after a
failsafe landing until the system is reset, regardless of wether a
switch is used to arm or not.
This commit also flashes the warning led during barometer calibration
and will not let you arm until it has completed.
Add a 5 second delay on startup to failsafe to prevent failsafe from
activating in the case of TX/RX gear with long bind procedures before
they send out valid data.
Failsafe now only prevents re-arming if a landing was forced.
In the case when you power on your RX without your TX on the beeper
sounds and failsafe warning ligts are activated. When the FC then
detects a signal the lights go off and you can then arm.
There's a number of changes in this commit, all related.
Improved efficiency of preparing HoTT messages.
All HoTT message data is no-longer reset each time, going forward old
data is re-used unless it is updated. This should help with GPS
co-ordinates too since they were erased from subsequent responses when
ideally the last-known co-ordinates should be transmitted each time.
The previous update was sending one too many bytes due to the
aligned/padded uint16_t values in the HoTT data structures. There were
two solutions, use #pragma to pack the structure or avoid larger types
in the structures, the latter made sense and results in more portable
code since it's a wire format.
Updated HoTT structures to use latest message structure from Ardupilot.
Currently the variables are in underscore_format, that will likely
change in future.
Cleaned up and deleted old ported code that was #ifdef'd out. Some test
code still remains for now. This will be deleted in due course.
Introduced bitmask for EAM alarm flags.
Corrected documentation.
systems and Parallel PWM/PPM systems.
Added setting for failsafe_max_usec. Renamed failsafe_detect_threshold
to failsafe_min_usec.
Failsafe now detects when a PPM/PWM RX isn't sending ANY data out on
CH1-4. See documentation notes regarding Graupner receivers in
Failsafe.md.
Documented failsafe system.
own dedicated serial port.
Added a feature to enable/disable RX_MSP.
Renamed feature SERIALRX to RX_SERIAL.
Renamed feature PARALLEL_PWM to RX_PARALLEL_PWM
Renamed PPM to RX_PPM.
Update serial configuration checking to better support Serial RX and
telemetry by verifiying serial port features and supported baud rates.
It's now possible to use a low-speed serial rx provider via softserial -
only problem is all the current serial rx providers are 100000/115200
baud. The code changes however open the door for using serial rx and
any capable serial port such as uart3-5 on the STM32F30x
It's also now possible to use GPS at low speeds on software serial
ports.