serial_common.c/h. decouple runtime_config from serial ports. decouple
buzzer from serial ports. decouple opening of the main serial port from
the msp code. decouple serial rx providers from runtime_config. rename
core_t to serialPorts_t since it only contained serial ports. It's now
clear which files use serial ports based on the header files they
include.
of determining a revision code. Previously there was mpu6050 specific
code in cli.c (the status command).
Finally this commit has removed all non-serial port configuration
settings from core_t so that a future commit can refactor core_t to
reduce dependencies on serial port code.
In doing this I also noted from other source code that the MPU6050
accelerometer trim for some revisions appeared to be incorrectly set to
255 * 8 instead of 256 * 8.
and by the mixer. main.c now asks the mixer if it needs to use servos
and the mixer decides this in mixerInit(). Main already has a
dependency on the mixer. This allows future commits to further clean up
core_t which is still a source of dependency problems.
index instead of a servo middle when using MSP_SET_SERVO_CONF.
Old GUI clients can still be used to SET channel forwarding, but cannot
be used to READ the status of channel forwarding until they are updated
to use MSP_CHANNEL_FORWARDING/MSP_SET_CHANNEL_FORWARDING.
To the user it will mean their GUI may not match the stored
configuration. However there is no way to DISABLE channel forwarding
other than a reset if they have enabled it using an old client.
This situation is not ideal, but without this commit it would mean that
bad data could be stored and used incorrectly by baseflight if a user
enables channel forwarding using an old client.
capability flag which is returned by MSP IDENT (CAP_CHANNEL_FORWARDING).
Adds two new MSP commands that are specifically for configuring channel
forwarding (MSP_CHANNEL_FORWARDING/MSP_SET_CHANNEL_FORWARDING). Servo
'middle' and 'forward from channel' are now stored independently, as
they probably should always have been.
channels when using Spektrum 2048 - untested. Renamed and extracted
core_t.numRCChannels to rxConfig.channelCount so that future commits can
clean up core_t further since core_t contains completely unrelated
properties.
code into rx_common.c. Moved some GPS code into gps_common.c. Isolated
some GPS functions into gps_common.c that were called from mw.c/loop().
moved gimbal defines into gimbal.h. Moved sound & light code into
statusindicator.c
remove dependency on board.h and mw.h on a few files.
Moved rx configuration paramaters into rxConfig in order to remove the
dependency on config_t from the sbus rx code - sumd/spektrum to follow.
Avoided use of YAW/PITCH/ROLL in some files since those constants are
from an unrelated enum type.
Replaced some magic numbers with constants to remove comments and
improve code readability.
Note, due to the tight coupling and global variable usage it was
difficult to create a smaller commit.
This fixes a bug where buzzerFreq could be uninitialised before it's
use.
This improves performance by only checking whether to sound the battery
alarm after the battery voltage has been recalculated.
There were unused battery beep codes which have been deleted to save
code size.
Configuration structure extracted from mw.h into config.h.
Moved mixer configuration structures into flight_mixer.h.
Added a build_config.c in order to decouple pwm_common.h from config.h.
Finally, battery configuration values now live in a batteryConfig
structure which means that battery.c does not depend on config.h and all
of it's dependencies.
Fixed the use of plurals on defines that were not collection objects.
PIDITEMS and CHECKBOXITEMS are now PID_ITEM_COUNT and
CHECKBOX_ITEM_COUNT.
clear what all gpio/ledring drivers need to compile and what was
unnecessarily included before.
In attempting this it was clear that ledring had a dependency on the
multiwii code, this was removed by passing the led status update method
the values it needs.
It also turned out that the ROLL/PITCH defines were coming from
rc_alias_e and much unrelated code is coupled to these defines. This
commit also includes some cleanups relating to that problem.
what all i2c/spi drivers need to compile and what was unnecessarily
included
before.
Renamed printf_config.h into build_config.h, move SOFT_I2C toggle switch
to build_config.h.
clear what all altimeter drivers need to compile and what was
unnecessarily included before.
Moved some platform specific configuration from board.h into platform.h
do not include "board.h". It is now clear what all ADC drivers need to
compile and what was unnecessarily included before.
Note: FY90Q make target now compiles successfully, it was broken for
various reasons before.