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.
It was broken for South/West values.
Added additional tests for maximum long/lat values.
Requires field testing to make sure values are correct on the telemetry
display.
full gyro scale is used now
and a new pid with float calculations was added based on PIDrewrite
eeprom size was also increased from 1kB to 2kB
Conflicts:
src/config.c
src/drivers/accgyro_l3g4200d.c
src/drivers/accgyro_mpu3050.c
src/drivers/accgyro_mpu6050.c
src/flight_imu.c
src/mw.c
src/mw.h
src/serial_cli.c
src/serial_msp.c
src/utils.c
src/utils.h
BOXNAMES is repeated in case the first transmission is never received.
Each time sendMspTelemetry is called it executes one and only one
command. There was nothing wrong with the old approach which sometimes
sent more than one command each time sendMspTelemetry was called but
this is simpler and there is far less duplication.
The existing implementation that was ported over was trying to work with
different values. By writing a unit test for the code that stores
values in GPS_coord it was possible to have known values which could
then also be used to write a unit test for the HoTT telemetry which
finally enabled production code to be written.
Hopefully it will work, unable to test further since my GPS unit is
playing up.
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.