Commit Graph

290 Commits

Author SHA1 Message Date
Dominic Clifton 676b2dd6c0 Use the define USE_FLASH_M25P16. Only USE_FLASHTOOLS for some
development targets.
2015-07-13 03:28:34 +01:00
Dominic Clifton e48e50512e Merge pull request #1028 from borisbstyle/dterm_filter
Selective Software Filtering (Gyro, Dterm, Pterm)

Thanks for the code boris and thanks to everyone else for their testing and feedback
2015-06-29 16:00:49 +01:00
Michael Hope 41c0a7c262 build: use the first serial port for flashing.
Use wildcard to list all of the USB serial ports.  Pick the first.

This is useful on my machine as the board sometimes appears as
/dev/ttyUSB1.

Signed-off-by: Michael Hope <mlhx@google.com>
2015-06-29 04:16:47 +01:00
borisbstyle 10f2d35759 Soft Filtering (Gyro, Dterm, Pterm)
pterm_cut_hz added

Let's play with this as well to get more noise filtered

Code Cleanup

Make filter more flexible for reuse

rewrite correction pterm

Define static delta in filter

Fix array count

ident

return function for filter

Filter Function enhanced

Full software filtering (DTerm, PTerm, Gyro, Acc)

Normalize Variables

Revert Back gyro settings

Bugfix gyro/acc filter // (MPU60xx equalize lpf settings)

Moved filtering to mw.c

This has been done to prevent reusing old cycletime for filter function.

acc_cut_hz removed (not needed)

Harakiri zero fix
2015-06-27 14:13:10 +02:00
Dominic Clifton 2436ccbaf5 SPRacingF3 - Enable Softserial on CH4/5 and CH7/8 (RX/TX). 2015-06-26 15:16:52 +01:00
Michael Hope b26efd6256 ld: split the common linker commands out into a shared file.
Done to make it easier to add new sections (like a parameter registry
section) in the future.

Signed-off-by: Michael Hope <mlhx@google.com>
2015-06-22 08:49:16 +02:00
Dominic Clifton 084626a70f SPRacingF3 - Allow use of a different external mag. 2015-06-10 03:36:53 +01:00
Dominic Clifton 4ed6fdfea5 CC3D - Add sonar.
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
2015-05-22 22:35:41 +01:00
Dominic Clifton f28158a5a7 Cleanup debug code. 2015-04-14 13:59:11 +01:00
Dominic Clifton ef50a0648f Allow spcification of flash size on command line. 2015-03-26 01:29:00 +00:00
Dominic Clifton 1de9fa4db6 SPRacingF3 - Add sonar support. 2015-03-22 20:55:27 +00:00
Dominic Clifton bce6c6722c Merge branch 'port-changes' of https://github.com/ledvinap/cleanflight into ledvinap-port-changes
Conflicts:
	src/main/blackbox/blackbox.c
	src/main/io/serial.c
2015-03-09 22:23:04 +01:00
Dominic Clifton 266fe45b7e Temporarily disable autotune on the CC3D OPBL binary. 2015-03-02 11:50:15 +00:00
Nicholas Sherlock af68517dda Merge remote-tracking branch 'upstream/master' into cc3d 2015-02-28 00:19:03 +13:00
Nicholas Sherlock 451d3d7ba2 Move zigzag encoding function to new common/encoding.c file, add tests 2015-02-26 13:27:09 +13:00
Nicholas Sherlock 57fcde05a3 Blackbox dataflash: Experimental CC3D support 2015-02-25 00:52:25 +13:00
Petr Ledvina 3abcbace72 Generate phony targets in auto-dependencies
This will fix problem with missing dependencies where #include changes
2015-02-23 09:18:51 +01:00
Dominic Clifton 070b556a07 Enable blackbox flash logging only on SPRacingF3 and Naze rev5 targets. 2015-02-22 21:49:53 +00:00
Dominic Clifton 2f09b7d1d9 Merge branch 'blackbox-flash' of https://github.com/sherlockflight/cleanflight-dev into sherlockflight-blackbox-flash 2015-02-22 17:24:39 +00:00
Dominic Clifton 9057d70410 Allow excluding of servo code at compilation time.
This is in preparation for backbox on CJMCU/64k.

Flight tested on CJMCU.
2015-02-22 16:21:03 +00:00
Dominic Clifton a1b01807cf Merge branch 'lowpass' of https://github.com/fusterjj/cleanflight into fusterjj-lowpass
Conflicts:
	src/main/flight/mixer.c
2015-02-22 14:55:04 +00:00
Nicholas Sherlock acd4745a4e Merge remote-tracking branch 'upstream/master' into blackbox-flash 2015-02-15 01:54:50 +13:00
Dominic Clifton ed51428989 SPRACINGF3 - Enable DISPLAY. Specify serial port I/O in target.h. 2015-02-05 02:08:37 +00:00
Dominic Clifton 55cac2bdeb Finally rename flight.c/.h to pid.c/.h. Cleanup some dependencies.
Relocate more code.
2015-02-01 00:39:38 +01:00
Joel Fuster ec946ea7d5 Split filter into separate file for future reuse 2015-01-31 11:46:44 -05:00
Dominic Clifton fa18940087 Minor cleanups to allow CJMCU to build again. 2015-01-30 21:25:18 +01:00
Nicholas Sherlock f9e22a0461 Merge remote-tracking branch 'upstream/master' into blackbox-flash 2015-01-28 20:48:17 +13:00
Nicholas Sherlock 0624eb5067 Refactor blackbox IO routines out into separate file 2015-01-28 20:42:51 +13:00
Nicholas Sherlock 3eb28f16ea Basic read/write/erase flash functionality works from the CLI
Very little code coverage tested yet, only writes of small sizes
2015-01-28 17:45:36 +13:00
Michael Jakob 396731a428 Intitial support for ALIENWIIF3 target 2015-01-26 18:33:47 +01:00
Dominic Clifton 5760519a03 CC3D - Adding USB Virtual COM port suport.
You can now connect the configurator via the USB port.
2015-01-25 13:59:48 +01:00
Dominic Clifton 9e73dca591 CC3D - Use Flex port in I2C mode unless USART3 is used. Add I2C drivers
for compass, baro and display.
2015-01-22 19:19:43 +01:00
Dominic Clifton 71a61d2432 SPRACINGF3 - Use 128k flash. 2015-01-22 18:00:11 +01:00
Dominic Clifton e69718b49a Added missing Makefile change from
1a2ee0e5b9
2015-01-21 01:11:55 +01:00
Dominic Clifton 650389afb6 Disable ADC initialisation on CJMCU. Replace MASSIVEF3 with SPRACINGF3.
Conditional VCP code inclusion.  Other minor F1/F3 cleanups.
2015-01-20 23:33:03 +01:00
Dominic Clifton 1efe530ea3 Disable compilation of unused can/cec/crc libraries. 2015-01-08 05:02:23 +00:00
Dominic Clifton 53faaff63c Add CJMCU revision detection. Use LEDs to indicate Spektrum binding
activity.
2015-01-08 01:19:25 +00:00
Nicholas Sherlock 6c2ce5038c Merge remote-tracking branch 'upstream/master' 2015-01-04 10:35:59 +13:00
Michael Jakob 2b90f675b2 Support ALIENWIIF1 as an separate target
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.
2014-12-28 12:45:15 +01:00
Nicholas Sherlock dfd8e5b2b0 Merge branch 'master' of https://github.com/cleanflight/cleanflight 2014-12-26 11:56:00 +13:00
Dominic Clifton 36c0b6f106 Cleanup MPU9150 support. 2014-12-24 23:53:17 +00:00
Dominic Clifton e9c07675be Add MPU9150 support to STMF3Discovery. Use 7-bit I2C addressing on
STM32F30x.
2014-12-24 21:11:22 +00:00
Dominic Clifton e9bc6c9353 Merge pull request #224 from GruffyPuffy/xbus
Added initial version of JRPropo XBUS Mode B support.
2014-12-23 12:08:23 +00:00
Nicholas Sherlock 1b1a285b4a Syncing with Cleanflight upstream 2014-12-22 23:23:26 +13:00
Dominic Clifton 183c5f8e16 Add MPU9150 mag support and mag autodetection. Add AK8975 mag driver.
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.
2014-12-21 23:40:48 +00:00
Nicholas Sherlock c85a172370 Merge remote-tracking branch 'upstream/master' 2014-12-18 18:17:59 +13:00
Stefan Grufman 509f73853d Added initial version of JRPropo XBUS Mode B support. 2014-12-15 22:15:47 +01:00
Dominic Clifton 1c8416db2c GPS - handle data loss occurs in the start of a UBLOX frame 2014-12-13 01:42:35 +00:00
Dominic Clifton 6c96b8dd86 Support the Sparky board by peabody124 - work in progress, not flight
ready.

https://github.com/TauLabs/TauLabs/wiki/Sparky

http://buildandcrash.blogspot.co.uk/2013/05/sparky-testing-and-building-no-crashing.html
2014-12-09 03:12:38 +00:00
Nicholas Sherlock 8c41772584 Add Blackbox 0.1.0 2014-12-08 22:06:57 +13:00
Petr Ledvina 4157cf5315 Fix double constatns
some constants were double, M_PI was sometimes inherided as double

added -Wdouble-promotion to makefile warnings
2014-11-20 08:31:35 +01:00
Frank Zhao 0000d3e65e added smartport telemetry
Conflicts:

	src/main/telemetry/telemetry.h
2014-11-12 00:11:13 +00:00
Petr Ledvina 3ee60ef857 Merge remote-tracking branch 'refs/remotes/upstream/master' into feature-timer 2014-11-11 12:50:11 +01:00
Dominic Clifton d0f622bb81 PORT103R - Initial support for the Waveshare Port 103R development
board.
2014-11-10 00:53:48 +01:00
Petr Ledvina 98c0d0b5dd Code cleanup / fixed missing TIM8_UP handler 2014-11-08 15:25:16 +01:00
Petr Ledvina aa7f5c4a1e New timer implementation
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
2014-11-07 15:38:26 +01:00
Dominic Clifton 1f54424cb0 Ignore system dependencies. Fixes #140 2014-10-26 10:01:51 +00:00
Petr Ledvina 091941cd82 Makefile improvement
- root must be assigned when declared - with :=
- add autodependecy generation
2014-10-23 14:10:45 +02:00
Dominic Clifton 8ef70abaa0 NAZE32 - Add hardware revision detection. 2014-10-15 20:59:06 +01:00
Dominic Clifton da51b5c479 Add MPU6500 SPI driver. Move sensor initialisation defines into target
specific headers.
2014-10-14 00:22:54 +01:00
Dominic Clifton 3bc9dc7121 Move linker scripts to src/main/target. 2014-10-07 07:06:05 +01:00
Dominic Clifton 6beec3c6e9 MASSIVEF3 - Add new target. 2014-10-07 06:57:28 +01:00
Dominic Clifton acbede5492 CC3D - Allow building of a binary that is compatible with the OpenPilot
CC3D bootloader to allow easy switching between OpenPilot and
Cleanflight.

Submitted by Alessio Morale -
http://forums.openpilot.org/topic/43569-baseflightcleanflight-ported-to-cc3d/?p=372149
2014-09-26 14:10:12 +01:00
Dominic Clifton 35280abfed Allow disabling of I2C for targets that do not use it. 2014-09-26 01:32:57 +01:00
Dominic Clifton a5d57e7b87 STM32F3 - Cleanup serial port usage. 2014-09-26 01:02:27 +01:00
Dominic Clifton c898ca4634 OLED Display - Add two pages: RX info and Welcome.
The RX info page shows channel letters and bar graphs for the first 8
channels.
The Welcome page shows the target and cleanflight git revision.
2014-09-21 05:09:01 +01:00
Dominic Clifton a4c21b5e57 SUMH - Initial cut of support for Graupner SUMH Serial RX protocol. 2014-09-20 09:39:42 +01:00
Dominic Clifton 0b4f5804bc Update led strip code to use HSV instead of RGB. 2014-09-18 20:53:28 +01:00
goebish 9f18ad474b fix typo preventing rebuild 2014-09-16 13:46:27 +02:00
Dominic Clifton 2e959dfd04 Make display support configurable per-target, enabled by default for
NAZE and EUSTM32F103RC.
2014-09-12 21:56:33 +01:00
Dominic Clifton f29168a998 Working OLED in test mode. 2014-09-12 21:56:33 +01:00
Dominic Clifton 9ce6dde1e7 Work-in-progress. 2014-09-12 21:56:33 +01:00
Dominic Clifton 2ae62d1977 Add git commit number to cli version command output. 2014-09-04 00:27:28 +01:00
Dominic Clifton 3d382ea4c7 EUSTM32F103RC - First cut of support for this High-Density STM32F103
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.
2014-09-03 01:38:27 +01:00
Dominic Clifton 59cddb21b4 Enable Serial RX on CJMCU target. 2014-08-26 23:25:14 +01:00
Dominic Clifton f1af9d434f Removing cruft from makefile that was accidentally committed when
working on the CJMCU target.
2014-08-22 19:19:20 +01:00
Dominic Clifton aa719dfe4f CJMCU - Use 64k/128k flash specific linker scripts scripts 2014-08-18 21:04:35 +01:00
Dominic Clifton d0338eac19 Cleanup sonar support for Naze/Flip32/Olimexino. Add Sonar
documentation.
2014-08-13 22:01:39 +01:00
Dominic Clifton 9906294cd8 Split navigation functionality from io/gps.c into flight/navigation.c.
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
2014-08-07 14:23:05 +01:00
Dominic Clifton 8c3a869251 Update CLI so that you can dump all, master or profile settings.
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
2014-08-02 12:39:18 +01:00
Dominic Clifton 582503c0e6 Delete unused pwm rssi code - rssi adc is used instead since the rate
used (8khz) by some frsky receivers is too fast to be detected using the
pwm rssi code without bogging down the cpu in interrupt handlers.
2014-08-02 01:38:09 +01:00
Dominic Clifton 25ede3e6e0 Fix PWM in RSSI - accidentally excluded when adding CJMCU support. 2014-08-02 00:43:06 +01:00
Dominic Clifton 4d9a672d9c CC3D / NAZE - Adding support for hardware controlled inverter for use by
SBUS RX.
2014-08-02 00:43:06 +01:00
Dominic Clifton 94784dfa04 STM32F30x - Update compiler flags. Disable -pedantic on F30x targets
due to the hundreds of warning the CMSIS library generates when it is
enabled.
2014-08-01 22:06:39 +01:00
Dominic Clifton 2d6a61c8c7 Remove -Wshadow, the warnings are not useful.
See https://lkml.org/lkml/2006/11/28/253
2014-08-01 19:58:39 +01:00
Dominic Clifton 61bdc2ad5d Fixed problem with debug build and _sbrk, caused by missing -lc linker
option.

Re-ordered some makefile statements to be in-line with baseflight for
easier merging.
2014-08-01 18:39:47 +01:00
Dominic Clifton b96d1ae71d Update makefile so it builds with DEBUG=GDB without _sbrk linker error.
Enable additional warnings.

Later commits will fix warnings.
2014-08-01 14:12:39 +01:00
Paul Fertser 900f872058 Makefile: switch to newlib-nano
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>
2014-08-01 12:29:00 +01:00
Paul Fertser 941b42a269 Makefile: link with -nostartfiles
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>
2014-08-01 12:28:55 +01:00
Paul Fertser 76f4f31cf3 Make code warnings-free with -pedantic
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>
2014-08-01 12:28:44 +01:00
Paul Fertser f218d3c040 Makefile: enable LTO
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
2014-08-01 01:25:16 +01:00
Dominic Clifton 326a10b1dc Allow autotune to be compiled in/out. 2014-08-01 01:14:23 +01:00
Dominic Clifton a6f4633272 Show sizes after build. 2014-08-01 01:07:06 +01:00
Dominic Clifton 1d5ef51373 CJMCU - Add compass driver. Update I2C configuration. Use PPM and
Brushed motors by default.
2014-08-01 00:56:28 +01:00
Dominic Clifton 125f6d1450 CJMCU - Allow various features to be compiled out to support. 2014-08-01 00:18:37 +01:00
Dominic Clifton 8f473f9b20 Initial support for CJMCU target (work-in-progress, compiles but doesn't link yet) 2014-07-31 14:01:01 +01:00
Dominic Clifton 5f16cfb72a CC3D - Support MPU6000 Gyro/Acc and SPI 1/2. 2014-07-17 22:12:21 +01:00
Dominic Clifton 1fb75890d5 Initial OpenPilot CC3D commit. 2014-07-16 01:06:09 +01:00
Dominic Clifton 623da881bc Removed apparently unneeded PRECIOUS statement (OSX).
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.
2014-07-01 18:52:11 +01:00
Dominic Clifton 364ada8110 Keep .s files so that compiler output can be easily verified. 2014-07-01 18:50:26 +01:00
Dominic Clifton 8d0509dbfb Move altitude hold code into separate files. 2014-06-21 23:57:14 +01:00
Dominic Clifton 9afcb20b7e Cleanup mismatch of buzzer/beeper terminology. Beep and Beeper should
be used from now on.
2014-06-21 23:32:58 +01:00
Dominic Clifton 1730e3dfd3 Relocated led strip user code into separate file.
Added documentation.

Added LED_STRIP feature, can only be enabled under certain circumstances
depending on target due to pin/timer mappings - see documentation.
2014-06-09 19:11:31 +01:00
Dominic Clifton 3c09b6a8c7 STM32F30x - Support WS2811 LEDs. 2014-06-08 15:43:00 +01:00
Dominic Clifton 578585db74 Extract STM32F10x specific WS2811 code into separate file, ready for
STM32F30x port.
2014-06-08 15:42:49 +01:00
Dominic Clifton da52b2d67c Hack WS2811 led strip. Proof-of-concept. 2014-06-08 12:58:18 +01:00
Dominic Clifton ad1b7dd216 Update Olimexo to support a 10DOF board.
Sensors on it are: MPU6050 HMC5883L BMP085.

BMP085 not connected to GPIO pins.
2014-06-08 12:57:30 +01:00
Dominic Clifton fd9d58110b Disable unused LED ring code.
Although it was compiled in for the NAZE target the ledringDetect()
method is never called.  Removing the feature for now too.
2014-06-07 16:53:25 +01:00
Dominic Clifton 32622da0ab Continuation of extracting peripheral configuration into drivers. 2014-06-04 14:53:34 +01:00
Dominic Clifton 8f2da892a6 Extract led and buzzer hardware initialisation from system.c. 2014-06-02 19:57:49 +01:00
Dominic Clifton d407a4d15e Start to break up drv/system.c to avoid #ifdef. 2014-06-02 18:43:47 +01:00
Dominic Clifton 7f027e7e24 Update makefile to use target specific files.
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.
2014-06-02 18:13:28 +01:00
Dominic Clifton c84d03d24d Update makefile for non-NAZE32PRO targets. Enable VCP on
STM32F3DISCOVERY.
2014-06-02 13:16:40 +01:00
Dominic Clifton 3f8a6c0e20 Add VCP driver (work in progress) 2014-06-02 01:54:25 +01:00
Dominic Clifton 4b437e8e08 Relocate battery code to sensors directory. 2014-06-01 16:58:16 +01:00
Dominic Clifton 805c9b4251 Update Makefile to place .hex files in 'obj' instead of 'obj/main'.
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.
2014-05-31 23:27:09 +01:00
Dominic Clifton 14448f4734 Merge branch 'naze32pro' - work in progress
Conflicts:
	Makefile
2014-05-31 22:50:05 +01:00
Dominic Clifton d19a5e7046 Cleanup project structure. Update unit test Makefile to place object
files in obj/test
2014-05-31 22:43:06 +01:00
dongie a3476cf59c Remove FY90Q support.
Conflicts:
	Makefile
	src/board.h
	src/drivers/adc_fy90q.c
	src/drivers/pwm_fy90q.c
	src/drv_adc.h
	src/sensors.c
	src/startup/startup_stm32f10x_md_fy90q.s
2014-05-30 09:45:15 +01:00
Dominic Clifton d0ec7e25ce Merge branch 'master' into autotune
Conflicts:
	obj/cleanflight_CHEBUZZF3.hex
	obj/cleanflight_NAZE.hex
	obj/cleanflight_OLIMEXINO.hex
2014-05-28 13:37:40 +01:00
Dominic Clifton 5484e5fddd Replace PWM RSSI with ADC RSSI.
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.
2014-05-28 03:30:53 +01:00
Dominic Clifton f7c38af7fc Initial commit for implementation of autotune. 2014-05-27 18:11:55 +01:00
Dominic Clifton e5c5339306 Merge branch 'master-cleanflight-msptelemetry' of github.com:treymarc/baseflight into treymarc-master-cleanflight-msptelemetry
Conflicts:
	src/serial_msp.h
	src/telemetry_common.h
2014-05-25 00:32:41 +01:00
treymarc ac520b0676 usf hardware fpu with target stm32f30x 2014-05-24 20:40:12 +00:00
Dominic Clifton b0e1c934d4 Adding unit test for some gps conversion code to demystify it. 2014-05-24 17:54:57 +01:00
Dominic Clifton 1925df26ca Add RSSI PWM on CH2 input.
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.
2014-05-24 00:01:59 +01:00
Trey Marc c245dc1868 Update Makefile
ARCH_FLAGS was never set to cortex-m4 , cf line 63
2014-05-20 03:53:51 +02:00
Dominic Clifton dcffbdba4b Initial commit of support for Naze32Pro (rev 1). 2014-05-15 15:34:18 +01:00
Dominic Clifton 4be9d953ac CHEBUZZF3 - Implement ADC driver for 3 ADC channels. Use STM32F3 linker
script so it uses the right values for RAM and FLASH size.
2014-05-12 00:17:14 +01:00
Dominic Clifton 5043370b2f Disable some acc/gyros on Olimexino. 2014-05-10 14:09:38 +01:00
Dominic Clifton 90d36b6869 Cleanup sensor auto detection code.
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.
2014-05-07 23:20:24 +01:00
Dominic Clifton 3b1801cacd CHEBUZZF3 - Update makefile and sensor initialisation code to support
ChebuzzF3 target.
2014-05-07 22:11:38 +01:00
Dominic Clifton 6721587566 Split PWM code into appropriate separate files - mapping, rx and output.
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.
2014-05-06 11:08:45 +01:00
treymarc 9e8b05dc0e add serial_rx msp
Conflicts:

	Makefile
	src/board.h
	src/main.c
	src/mw.h
	src/serial_cli.c
2014-05-03 18:20:17 +01:00
Dominic Clifton 9a3c922efc STM32F30x - de-duplicate common uart code. 2014-05-02 21:19:19 +01:00
Dominic Clifton 7e79a245c2 Cobbled together some bits of code to read and format the gyro data from
the L3GD29 gyro.  Some code borrowed again from AQ32PlusF3 and the
existing MPU6050 driver.
2014-04-28 22:29:51 +01:00
Dominic Clifton 4febeb3969 Ported some I2C code from AQ32PlusF3 which itself looked ported from the
STM32 examples.
2014-04-28 19:18:57 +01:00
Dominic Clifton f9ceb0c40f fix transposed gpio driver filenames and content 2014-04-25 01:17:08 +01:00
Dominic Clifton 0598704872 First commit of port to STM32F3DISCOVERY board.
work-in-progress, it does compile and run though but hangs early on in
main() because of unimplemented features.
2014-04-25 01:09:19 +01:00
Dominic Clifton 695db3523a Remove flight_mixer.c's dependency on mw.h/board.h.
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.
2014-04-24 00:18:24 +01:00
Dominic Clifton 53b7edd843 Add the name of the fork to the output of the cli version command. 2014-04-23 00:01:07 +01:00
treymarc b14b058fa0 add msp telemtry 2014-04-22 13:48:57 +02:00
Dominic Clifton fe89d40fa0 Remove main.c's dependency on mw.h/board.h.
Moved pidControllers out of mw.c into flight_common.c/h.
Moved appropriate code into rc_controls.c/h.
2014-04-22 01:58:23 +01:00
Dominic Clifton 9b8a10a09f Updating makefile so the binaries are build with the name of the fork,
in this case 'cleanflight'.  Updating binaries to reflect this change.  

Also renamed the 'startup' folder from 'baseflight_startups'.
2014-04-21 03:34:29 +01:00
Dominic Clifton e969d184e6 decouple failsafe from the rest of the system.
Note: the pwm_common driver has a dependency on the main failsafe code,
the solution is probably to move some of the code into rx_pwm.
2014-04-21 00:46:16 +01:00
Dominic Clifton a7e4c859bd decouple cli/msp from each other. relocated non-msp code into
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.
2014-04-19 01:01:31 +01:00
Dominic Clifton f68fc17627 Cleaned up RX initialisation. Updated Spektrum RX code to support 12
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.
2014-04-18 17:25:53 +01:00
Dominic Clifton d777bac39d move printf and typeconversion to common to reduce visual clutter of
main source directory.
2014-04-18 14:03:42 +01:00
Dominic Clifton a85bfa51e3 Remove config.c's dependencies on the mw.h/board.h files. Moved some RX
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
2014-04-18 12:13:37 +01:00
Dominic Clifton f06c8bb99b Relocate common code which can be used by drivers and by main into
'common'.  Cleanup includes.  Fix FY90Q target compilation.
2014-04-17 23:50:13 +01:00