Since it uses DMA to receive it means that serialRx is broken because
the RX callback function is only used when DMA is NOT used.
Currently only serialRx uses USART callbacks.
Attempting to disable RX DMA didn't work, the USART2 IRQ handler is
never called.
TIM8 correctly. Software serial conficted with parallel PWM input. Fixed
crash due to incorrect timerConfig index calculation code.
The crash occurred when capture compare interrupt handlers attempted to
call an invalid callback.
Note: the crash does not affect existing baseflight code since the
formula is OK when using a 2 dimensional array with equal dimensions.
Formula details here:
https://docs.google.com/spreadsheets/d/1UuxnC0VKiprvt1wt3KXffefEWJUb_-ILFLQuP377Anw
The STM32F3DISCOVERY board would crash when setting GPIOA Pin_13 or
Pin_14 to analog mode so they are excluded in the gpio initialisation.
The USART GPIO configuration did not work when using the F10x code. The
USART status and DMA registers are different too.
Previously it was using a hardcoded value of 1500.
Without this commit it would mean that any midrc configuration was not
being applied to 3d flight.
lready applied in a6c22d2115
Conflicts:
src/flight_mixer.c
This is a large commit, from the commit it is clear that the mixer has
many dependencies, this is expected since it is central to the
application.
To achieve the decoupling many master config and profile members had to
be moved into structures.
Relocated throttle/pitch curves into rc_curves.c/h since it has nothing
to with rx code, this fixed the dependencies inside the rx provider
files.
Achieved by renaming MAX_MOTORS to MAX_PWM_MOTORS
Disambiguate MAX_MOTORS and MAX_SUPPORTED_SERVOS
Achieved by renaming MAX_SERVOS to MAX_PWM_SERVOS
It now shows there is a dependency on the pwm driver if MAX_PWM_* is
used.
Coupled pwm_common and timer_common by using USABLE_TIMER_CHANNEL_COUNT
since the current pwm driver and timer driver is only usable by the
STM32F103.
Rename yawdeadband to yaw_deadband to match other variables/cli
commands.
Fix a couple of usages of MAX_MOTORS where MAX_SUPPORTED_MOTORS should
be used instead.
calibration.
When the model is moved during the gyro calibration period too much the
code that detects the movement (gyroMovementCalibrationThreshold aka
'moron threshold') did not restart the calibration correctly and one too
few calibration cycles were used when restarting.
In addition to this there was unnecessary calibration reset code - the
reset of calibration variables is supposed to happen at the start of
calibration; due to the bug the first calibration cycle could not be
detected when restarting so the old reset code was required.
This commit also cleans up the Gyro code so the it is in a similar style
to the recently cleaned acceleration code.
In doing so accelerometer sensor and trim code had to be cleaned.
Added a new method to buzzer.c to avoid exposing toggleBeep.
Renamed current_profile to current_profile_index to avoid confusion.
Moved some GPS code from mw.c into gps_common.c.
Moved pid values into a pidProfile_t structure; this was done so that
gps_common.c does not have a dependency on config_profile.h.
pidProfile_t lives in flight_common.h now.
Moved gps profile settings from profile_t into gpsProfile_t for the same
reason.
Removed gps_common.c's dependency on masterConfig_t by passing needed
variables into gpsInit().