This also ensures that the PWM mapping does not use the sonar pins when
sonar is enabled in a board agnostic way.
Conflicts:
src/main/config/config.c
src/main/drivers/pwm_mapping.h
src/main/main.c
src/main/target/CC3D/target.h
This will allow to build an HEX file independently to the NAZE target
An ALIENWIIF3 may also come in the future based on STM32F303. Both
likely will share the same default settings. This is why I don’t use
ALIENWII32 as target name yet.
Note: not working on the sparky, MPU9150 needs passthough enabling but
when enabled the mag and gyro won't ack on the default addresses. Needs
further investigation.
This is first part of new softserial code. Main timer code is changed, changes to rest of code are kept to minimum.
macros for BASEPRI based synchronization are added to project (atomic.h)
TIMER_PERIOD fixed in pwm_rx.c
series development board.
These boards can be picked up for less than $11, coupled with a 10DOF
sensor board they make a great development platform or cheap expandable
FC.
Pretty much all pins are available to be used, unlike on the less
capable and more expensive OLIMEXINO.
gps.c now only has code that deals with gps hardware, state and
messaging.
navigation.c now only has code dealing with flight
navigation/waypoints/home/hold/etc
Cleanup '...' strings to reduce binary size. Change version
information.
With this change it's much more obvious what is and what is not included
in a profile.
Examples:
dump
dump profile
dump master
This makes the binary considerably smaller (73852 text with gcc
4.7.3, 71620 text with gcc 4.9.0 from TNT).
Build-tested only.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
This saves a bit more space and a reasonable thing to do since a
custom startup is used anyway.
Build-tested only.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
This removes a function that's no longer used, and inline specifiers
from include file (where they're useless anyway). This makes the whole
default project warnings-free with -Wall -pedantic.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
This rearranges Makefile a bit and enables Link Time Optimisation
which leads to a smaller code (77724 text with gcc 4.7.3).
Unconditionally adding -ggdb3 doesn't affect code size anyhow as all
the debugging info is stored in separate sections.
Build-tested only.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Conflicts:
Makefile
Output files were being left in the working directory.
Build needs to be tested on cygwin, if it fails find a different
solution or revert this commit.
Added documentation.
Added LED_STRIP feature, can only be enabled under certain circumstances
depending on target due to pin/timer mappings - see documentation.
This is an alternative to #ifdef's everywhere which is getting out of
hand.
Confirmed that the VCP is working on the STM32F3Discovery board and
ChebuzzF3 variant.
Latest naze binary.
Removing other binaries, git repo isn't really the place to store
binaries and they keep getting in the way. This is will be kept here
until the configurator is updated.
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.
Decoupled mpu6050 acc and gyro detection code.
This commit cleans up the #ifdef/#ifndef code which, due to the amount
of targets and variants, was starting to get a bit out of hand.
Now each acc & gyro is assumed to be used unless the respective
USE_ACC_* and USE_GYRO_* is #undef'd at the top of the file by a
particular target.
This commit also cleans up the mess of re-running all the mpu6050
detection code twice. Now the acc specific communication code is only
run once and only code that is actually needed to be run twice is run
twice, and the rest of the code is now only used once. This will
improve board startup time, albeit negligibly.
Sensor alignment is only known for the NAZE target so now the alignment
will be ALIGN_DEFAULT for all targets other than NAZE unless they are
known.
Finally, in the Makefile a file was included twice in the source list
for the STM32F3DISCOVERY target and now additional sensors are supported
for users that may want to try them on that board.
By decoupling everything the structures now only contain members they need. The mapping code is simplified. The calculation of timer periods is now where it belongs (with the output code, not with the mapping code). Also, since each motor output has it's own callback method it is technically possible to mix brushed and brushless motors if the brushed motors and brushless motors use different timers. Additional code would be required to fully support that.
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.
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.
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.
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.