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().
separate concerns and help reduce and clarify dependencies.
cfg and mcfg are too similarly named and are not obvious. Renamed cfg
to currentProfile and mcfg to masterConfig. This will increase source
code line length somewhat but that's ok; lines of code doing too much
are now easier to spot.
This resulted in the removal of duplicate logic, duplicate code and the
removal of a temporary buffer per-driver.
The NAZE specific sensor alignment is now contained within the core code
instead of in the drivers.
The sensor alignment is determines by the sensor initialisation code.
The alignment of sensor readings is now performed once and only by the
appropriate sensor code, see usages of alignSensors().
The acc/gyro/compass driver code is now more reusable since it has no
dependencies on the main code.
each. relocated acc_t/gyro_t from sensors_common.h into
drivers/accgyro_common.h since they define an interface and the
dependency was pointing the wrong way from the drivers.
baro_t/acc_t/gyro_t dependences are all now pointing the right way.