Commit graph

2704 commits

Author SHA1 Message Date
Dominic Clifton
94623289fd Fix building of targets that don't define LED_STRIP. 2014-09-15 03:27:37 +01:00
Dominic Clifton
043ed0f0bc CJMCU - fix flash size to 64k. 2014-09-15 03:23:56 +01:00
Dominic Clifton
9d4bc1aaa0 Improve readability of itoa and _i2a type conversion methods. 2014-09-15 03:21:43 +01:00
Dominic Clifton
460256cc23 Fix typo in led strip documentation. 2014-09-15 03:20:39 +01:00
Dominic Clifton
6ce5736990 Update LED strip code to allow configurable LED strips.
See documentation for details.
2014-09-15 03:15:11 +01:00
Dominic Clifton
3ef769bf7b Avoid using flash size register on STM31F103 since some chips are
manufactured incorrectly.  Fixes #71.
2014-09-14 16:33:32 +01:00
Dominic Clifton
e3ea15f3dc Fix various minor IDE warnings. 2014-09-14 16:33:32 +01:00
Dominic Clifton
93d041c3f5 Fix being unable to set lowpass filter to 5 for the MPU6000. 2014-09-14 16:33:14 +01:00
Dominic Clifton
f58de05e94 Fix currentmeter on STM32F10X, closes #74 2014-09-13 02:24:05 +01:00
Dominic Clifton
c1569d6319 Add OLED documentation. 2014-09-12 21:56:34 +01:00
Dominic Clifton
853fdb20b1 Display sensor readings (acc/gyro/compass) and battery readings on OLED
screen.
2014-09-12 21:56:34 +01: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
0c77e27f33 Add link to configuration in chrome web store to the readme file. 2014-09-12 08:55:19 +01:00
Dominic Clifton
eee766e2ec Bump config version, required due to
275089eca1.
2014-09-08 11:03:43 +01:00
Andreas Tacke
275089eca1 Make disarming via AUX switch independent of throttle value configurable
Conflicts:
	src/cli.c
	src/config.c
	src/mw.c
	src/mw.h
2014-09-08 11:02:02 +01:00
Dominic Clifton
b4620235dd Adding note about potential flash usage optimization in GPS code. 2014-09-08 10:41:17 +01:00
Dominic Clifton
801c5d9ed6 Latest binary with AUX5-8 bug fix. 2014-09-06 00:42:43 +01:00
Dominic Clifton
5a36db26c9 Fix bug where aux configuration for channels 5-8 were ignored.
The bug was introduced by a recent refactor which was in error.

Fixed using TDD by first creating a failing unit test and then fixing
the code.
2014-09-06 00:28:48 +01:00
Dominic Clifton
ca72890964 Adding unit test for updateRcOptions 2014-09-05 23:44:06 +01:00
Dominic Clifton
5b3d86e966 Update unit tests. 2014-09-05 22:46:33 +01:00
Dominic Clifton
05be7c922c Fallback to FakeGyro and FakeAcc (when enabled) after first searching
for other devices.

This helps when porting to new targets.
2014-09-05 20:51:39 +01:00
Ben Hitchcock
66fce423bb Code allowing the use of sonar without requiring a barometer.
This code has been flight tested on a Naze32 acro, with no barometer onboard.  It also works when the target doesn't have BARO defined.
2014-09-05 11:28:55 +08:00
Dominic Clifton
2ae62d1977 Add git commit number to cli version command output. 2014-09-04 00:27:28 +01:00
Dominic Clifton
d577b93026 Alternate layout for a 31-LED quad - disabled by default. 2014-09-03 15:58: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
9977fce4bb STM32F3 - Disable PWM timeout monitoring on CH1 due to interrupt handler
loop.

CH2-CH8 still monitored.

See c0a349ed60.
2014-09-02 00:38:32 +01:00
Dominic Clifton
f22953b37a Latest binary. 2014-08-28 01:38:28 +01:00
Dominic Clifton
00a1858faa Cleanup and fix the use of permenant box ids. 2014-08-27 23:59:52 +01:00
Dominic Clifton
59cddb21b4 Enable Serial RX on CJMCU target. 2014-08-26 23:25:14 +01:00
Dominic Clifton
78ebbcd8ee Latest binary with autotune. 2014-08-26 21:52:14 +01:00
Dominic Clifton
f9b630a2c1 Re-enabing autotune. 2014-08-26 21:51:52 +01:00
Dominic Clifton
972ceee1d4 Latest binary with minor fixes. 2014-08-26 21:29:29 +01:00
Dominic Clifton
1c6ea1d397 Fix ANGLE mode and HORIZON mode resetting the errorAngle when they are
both attempted to be enabled at the same time.  Angle mode now takes
precedence over horizon mode.

Fix using aux settings that are not applicable to in-use aux channels -
prior to this it was possible to configure aux4 and then switch to
RX_SERIAL using a 7 channel system (3 aux channels) and aux4 would still
have been processed.
2014-08-26 21:28:23 +01:00
Dominic Clifton
d15b56f14e Fixing mis-reporting of armed state - missed in b6a8e20. 2014-08-26 21:24:07 +01:00
Dominic Clifton
fd264772ba Latest binary with: SONAR support. Free RAM improvements. Prevent arming after connecting a battery when the throttle is in low; when using a switch to arm and when the switch is left in the ON position. PWM Failsafe improvements. MSP Telemetry on telemetry port. Support MSP on multiple ports.
This reverts commit bd42c12f32 - it turns out the binary was fine after-all, the configurator needed updating, see #59.
2014-08-25 21:28:18 +01:00
Dominic Clifton
bd42c12f32 Revert "Latest binary with: SONAR support. Free RAM improvements. Prevent arming after connecting a battery when the throttle is in low; when using a switch to arm and when the switch is left in the ON position. PWM Failsafe improvements. MSP Telemetry on telemetry port. Support MSP on multiple ports."
This reverts commit 67949872cc.
2014-08-25 09:42:29 +01:00
Dominic Clifton
67949872cc Latest binary with: SONAR support. Free RAM improvements. Prevent arming after connecting a battery when the throttle is in low; when using a switch to arm and when the switch is left in the ON position. PWM Failsafe improvements. MSP Telemetry on telemetry port. Support MSP on multiple ports. 2014-08-24 23:08:36 +01:00
Dominic Clifton
9b4ccdc73a Only set OK-to-arm flag when arm switches are disabled.
This prevents arming after connecting a battery when the throttle is in
low; when using a switch to arm and when the switch is left in the ON
position.

The previous solution was flawed because of the way rc input is handled.

This also removes an extra test of rcOptions by re-arranging the logic
that handles arming/disarming via a switch.
2014-08-24 22:59:59 +01:00
Dominic Clifton
f5d9589f0a Disable debug output. 2014-08-24 22:53:06 +01:00
Dominic Clifton
b6a8e20d8c Fix reporting of flight modes broken in 3f0754d
The conversion of the flags to bitmasks meant the mask was being bitshifted instead of 1 or 0.
2014-08-24 21:31:52 +01:00
Dominic Clifton
3f0754d295 Replace global flags with stateFlags, flightModeFlags and armingFlags.
Each flag was previously a whole byte, now all of the flags only take up
4 bytes as they are represented by bit masks.

This is cleaner because the different kind of flags are now separated.

Additionally this changes the behaviour of arming slightly.  When using
a switch to arm the aircraft will not arm unless the switch has been in
the off state once.  This prevents arming if you power the aircraft with
a low throttle and the switch in the on position.
2014-08-24 12:11:30 +01:00
Dominic Clifton
1ea014ae25 Support MSP telemetry on ports marked as TELEMETRY instead of MSP, this
follows the pattern that HoTT and FrSky use.

Previously MSP telemetry was actually output on the MSP port, NOT the
telemetry port.

Baudrate for MSP telemetry currently fixed at 19200.
2014-08-23 01:14:06 +01:00
Dominic Clifton
4604403098 Merge branch 'master' into msp-on-multiple-ports
Conflicts:
	src/main/config/config.c
	src/main/io/serial_msp.c
2014-08-22 22:30:33 +01:00
Dominic Clifton
26cbe71858 Fix for resetting config to defaults.
This was missed in f51efaa7c0
2014-08-22 22:26:35 +01:00
Dominic Clifton
f51efaa7c0 Instead of copying a profile from the master config into memory again,
just use it in-place.  This saves ~308bytes of memory.

Prior to this there were 4 profiles in ram all the time, the 3 main
profiles and a copy of one of them.

This commit was aided by a side effect of the work done to clean up the
output of the cli dump command since it is now easy to conditionally
apply the changes to the memory addressed used to read/write cli
variables.  See 8c3a869251.
Conflicts:

	src/main/io/serial_msp.c
2014-08-22 22:05:35 +01:00
dongie
bc34fc3744 making boxes[] in serial.c static const to move them to rodata and free ~200bytes RAM 2014-08-22 22:01:29 +01:00
Dominic Clifton
71e7feebd9 Move 'boxes' out of ram and into flash - saves quite a bit of ram. 2014-08-22 22:01:04 +01:00
Dominic Clifton
8ebdb245c2 Instead of copying a profile from the master config into memory again,
just use it in-place.  This saves ~308bytes of memory.

Prior to this there were 4 profiles in ram all the time, the 3 main
profiles and a copy of one of them.

This commit was aided by a side effect of the work done to clean up the
output of the cli dump command since it is now easy to conditionally
apply the changes to the memory addressed used to read/write cli
variables.  See 8c3a869251.
2014-08-22 21:53:23 +01:00