Dominic Clifton
7b91524ba2
Replace gimbal_flags with FEATURE_CHANNEL_FORWARDING and gimbal_mode.
...
Gimbals are only one use of channel forwarding, PWM video switchers and
PWM buzzers are others.
2015-07-08 16:41:29 +01:00
Dominic Clifton
8b727ecbf9
Fix pwm servo initialisation when using custom airplane.
2015-07-08 15:38:39 +01:00
Dominic Clifton
ea6a6ccb3d
First cut of custom servo mixers.
...
Main rule logic and MSP commands ported from baseflight.
Gimbal mixer updated to use rules. This allows us to remove more
conditional logic. Operation of gimbal servos is now different.
2015-06-28 23:06:56 +01:00
Dominic Clifton
d26a2ceef2
SPRacingF3 - Allow SoftSerial1 (CH5/6) to be used when Sonar is used
...
(CH7/8).
2015-06-26 15:18:08 +01:00
Michael Hope
920cac5253
various: re-work designated initialisers to work with G++
...
G++ supports a more limited version of designated initialisers.
Reorder fields to be in the right order. Make nested initialisers
explicit.
Signed-off-by: Michael Hope <mlhx@google.com>
2015-06-04 22:34:27 +02:00
Michael Hope
5c6760fd82
various: tidy up various things found when building with a C++ compiler.
...
Remove duplicate consts.
Pull in the include files where functions and variables are declared.
Mark file local but duplicated variables as static.
Mark some variable declarations as extern.
Remove duplicated variable definition.
Signed-off-by: Michael Hope <mlhx@google.com>
2015-06-04 22:32:31 +02:00
Dominic Clifton
0c1a6c5c2f
Merge branch 'lock_active_features' of https://github.com/ProDrone/cleanflight into ProDrone-lock_active_features
...
Conflicts:
src/test/unit/rc_controls_unittest.cc
2015-05-29 20:05:25 +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
a370d60595
Support UART3 and I2C on Paris Air Hero 32 Flex port (aka Naze32_SP).
...
This change also allows serial ports to be removed at runtime. e.g.
UART3 on Naze32 and SoftSerial 1 & 2 when softserial is not enabled.
2015-05-22 20:49:33 +01:00
ProDrone
bbb86b30fa
Delayed motor PWM enable when using Oneshot
2015-05-22 00:30:29 +02:00
ProDrone
a153302b48
Minor comment update.
2015-05-21 02:03:09 +02:00
ProDrone
b75de91f35
Instead of trying to latch the desired features...
...
...and apply them after a soft reset (which also required an additional
write to flash), it is now such that features and settings are modified
and stored in flash as before.
After initialisation completes, the active features are latched and are
not to be modified until the next startup. This guarantees that all
saved modifications are persistent even when power is switched of
(without a reset in between).
When a soft reset is required, the active features and the currently
configured features are used to detect if the oneshot feature has
changed state, in which case motor PWM outputs are stopped and soft
reset is done after a 1.5 second delay.
During normal operation the active features will not change and all
changes to features ordered via MSP commands or the CLI are applied to
the configuration that gets saved to flash.
The required effect of modifying features without changing the actions
in the running mainloop is achieved. The user needs to be aware that
changes to features are not applied immidiatly.
2015-05-21 01:27:45 +02:00
Dominic Clifton
d0a9d14b87
Allow CLI to be compiled out.
...
First cut, as proof-of-concept. This allows CJMCU target to be built
without CLI and with Blackbox.
2015-05-19 23:42:41 +01:00
atomiclama
713e138c42
Changed idle pulse width from fixed 1ms to that configured.
...
Stops motors, that have none standard pulse ranges, from running up
after a save or exit from cli.
2015-05-19 16:02:27 +01:00
Dominic Clifton
e0af5f41ef
Merge pull request #697 from Supersopp/sonar_and_ADC_current_sensor
...
Updates sonar so that it can be used together with ADC current meter
2015-05-06 22:14:52 +01:00
Dominic Clifton
b04be157b1
SPRacingF3 - Allow Sonar and Parallel PWM (drops 2 input channels).
...
Naze32 - Fix initialisation of outputs 5/6 when Parallel PWM and
Sonar are used together with a mixer that needs more than 4 motors.
2015-05-06 21:33:34 +01:00
Dominic Clifton
c0aec95e14
STM32F303 - Skip UART3 pins in PWM mapping when UART3 is used.
2015-05-06 20:38:39 +01:00
Dominic Clifton
519586a5ce
Merge branch 'refactoredBeeperCode_181_1' of
...
git://github.com/ethomas997/cleanflight into
ethomas997-refactoredBeeperCode_181_1
Conflicts:
src/main/flight/failsafe.c
src/main/io/beeper.c
src/main/mw.c
2015-04-23 01:21:27 +02:00
Dominic Clifton
f28158a5a7
Cleanup debug code.
2015-04-14 13:59:11 +01:00
E Thomas
f02d7403af
Port of refactored beeper code 181_1
...
This the "Port of refactored beeper code #669 " modification applied to
version 1.8.1 (4/4/2015) of the code.
2015-04-04 17:54:44 -04:00
Nicholas Sherlock
86ddf27515
Don't allow softserial ports to be opened if softserial isn't enabled
2015-04-02 00:24:28 +13:00
Per Magnus Auby
b83b9040f9
Updates sonar so that it can be used together with ADC current meter
...
Check if ADC current meter is enabled in sonarInit() and change
sonar pins to pwm 5 and 6 if it is. Same as when RX_PARALLEL is enabled.
2015-03-31 13:47:17 +02:00
Dominic Clifton
730d0fe45c
Ensure serial runtime data structures are set before they are used.
...
Fixes #636
2015-03-20 18:37:50 +01:00
Dominic Clifton
3b77626dd8
Only enable VBat ADC when VBat feature is enabled.
...
Fixes #612
2015-03-13 22:28:10 +01:00
Dominic Clifton
e40a3663d2
Remove failsafe vtable usage.
2015-03-09 23:19:21 +01: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
dca984ff88
Merge branch 'master' into serial-cleanup
...
Conflicts:
src/main/telemetry/hott.c
2015-03-03 17:21:43 +00:00
Nicholas Sherlock
af68517dda
Merge remote-tracking branch 'upstream/master' into cc3d
2015-02-28 00:19:03 +13:00
Dominic Clifton
b6509dd1eb
Merge branch 'master' into serial-cleanup
...
Conflicts:
src/main/blackbox/blackbox_io.c
src/main/config/config.c
2015-02-26 22:43:29 +00:00
Nicholas Sherlock
57fcde05a3
Blackbox dataflash: Experimental CC3D support
2015-02-25 00:52:25 +13:00
Dominic Clifton
b9e1283809
Ensure motors are stopped before a reboot. Ensure hard fault handler
...
doesn't use potentially unitialised data to update the motors. Pause
for 50ms before rebooting after updating disabling the motors to ensure
the timer hardware and ESCs havea chance to react.
This commit might help with #123
2015-02-23 14:02:47 +00:00
Petr Ledvina
a67d2f8a9e
Whitespace fixes
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
b4e4684ac7
Avoid resetting page cycle index when re-enabling page cycling so that
...
it is possible to stop on a page, inspect it, and then resume cycling at
the point that it was stopped.
2015-02-22 14:42:43 +00:00
Nicholas Sherlock
e636d8b945
Merge remote-tracking branch 'upstream/master' into blackbox-flash
2015-02-20 13:34:59 +13:00
Dominic Clifton
021496b244
Merge branch 'master' into serial-cleanup
2015-02-19 21:57:54 +00:00
Dominic Clifton
c45efac812
Cleanup sensor detection. Less code required and a similar pattern is used for each type of sensor.
2015-02-19 16:15:14 +00:00
Dominic Clifton
7dcc7b2fb5
Multiple telemtry providers can now be active at the same time on any
...
serial port.
MSP telemetry can now be at any baud rate.
A pattern is emerging in each telemetry provider, code is duplicated to
get things working, refactoring can come later.
2015-02-18 23:10:36 +00:00
Dominic Clifton
3e64ce883c
Merge branch 'master' into serial-cleanup
...
Conflicts:
src/main/main.c
src/main/rx/sbus.c
src/main/version.h
2015-02-18 19:41:53 +00:00
Nicholas Sherlock
d628bc6dcd
Merge remote-tracking branch 'upstream/master' into blackbox-flash
2015-02-16 21:50:33 +13:00
Nicholas Sherlock
d6911e8b86
Avoid synchronous flushes to flash during Blackbox shutdown
2015-02-15 23:23:53 +13:00
Dominic Clifton
02166a4fd0
Ensure mixer is configured so that PWM initialisation is correct.
...
The isMixerUsingServos() was returing the wrong value in 9a7de3cf3c
2015-02-15 09:20:33 +00:00
Dominic Clifton
9a7de3cf3c
Improve ESC compatibility by enabling PWM output as soon as possible.
...
A user reported a problem where if the board was powered up before
connecting the main battery the ESCs would work, however when the board
and ESCs were powered at the same time the ESCs would not initialise
correctly.
2015-02-14 23:49:55 +00:00
Nicholas Sherlock
acd4745a4e
Merge remote-tracking branch 'upstream/master' into blackbox-flash
2015-02-15 01:54:50 +13:00
Nicholas Sherlock
6423ac7db1
Rename FLASHFS to USE_FLASHFS
2015-02-14 09:45:56 +13:00
Dominic Clifton
d12d1952eb
Fix PWM/UART2 clash on F1 targets caused by using wrong #define value.
2015-02-12 01:58:59 +00:00
Dominic Clifton
5163bef0b2
Refactor serial port configuration, stage 1.
...
Tested and working:
* multiple MSP ports at different baud rates.
* cli on any MSP port.
* GPS
* gps passthough on currently active cli port.
Example config used for testing:
feature SOFTSERIAL
feature GPS
feature RX_PPM
serial_port_1_functions = 1
serial_port_1_baudrate = 115200
serial_port_2_functions = 128
serial_port_2_baudrate = 115200
serial_port_3_functions = 1
serial_port_3_baudrate = 19200
serial_port_4_functions = 0
serial_port_4_baudrate = 0
Known broken:
* Telemetry and shared serial ports
* Telemetry when unarmed.
Probably broken:
* Blackbox on shared port.
Untested.
* Serial RX.
* Blackbox.
2015-02-12 01:28:53 +00:00
Nicholas Sherlock
5651e65a0b
Add support for discovering beginning of free space on flash chip
2015-02-10 13:44:18 +13:00