1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00
Commit graph

111 commits

Author SHA1 Message Date
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
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
Dominic Clifton
8a7edb17ed Merge branch 'softserial-enabled' of git://github.com/sherlockflight/cleanflight-dev into sherlockflight-softserial-enabled 2015-04-01 20:06:08 +01:00
Dominic Clifton
b0b1eaf9c7 Add first unit test for some code in serial.c. Fix compiler warnings in
other tests.
2015-04-01 14:12:24 +01:00
Nicholas Sherlock
dce873434b Use SERIAL_PORT_NONE identifier to mark ports which are unavailable 2015-04-02 01:55:13 +13: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
Nicholas Sherlock
159f57f583 Add new serial port options field (inversion, stop bits, etc) 2015-03-19 12:56:11 +13:00
Nicholas Sherlock
cbaa67f1d0 Add 230400 & 250000 baud rates, 2 stop-bits port mode 2015-03-06 20:07:07 +13:00
Dominic Clifton
946f65601f Cleanup some enum values - using topic_type instead of type_topic. 2015-03-03 22:35:40 +00:00
Dominic Clifton
a156d915f4 Only index into the configurable baud rate list when needed. 2015-03-03 17:30:35 +00:00
Dominic Clifton
1a8500c768 Transition to new per-port & per-function baud rate configuration. 2015-02-27 01:05:37 +00:00
Dominic Clifton
00f04e0ea2 Fix frsky telemetry which was needlessly checking for incoming data.
Maybe it needs to check that the serial port has SENT the data?
2015-02-19 00:34:24 +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
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
Dominic Clifton
e81cc9696e CC3D - Support serial RX on UART1. 2015-01-29 21:25:50 +01:00
Dominic Clifton
7b8ad20af6 Fix max baud rates on CC3D / F3 targets that were broken in merge of
6048a2e.
2015-01-29 21:24:51 +01:00
Krzysztof Rosinski
34cd8f466e MSP command for sonar altitude 2015-01-29 15:17:15 +01:00
Dominic Clifton
6048a2ec57 Merge pull request #299 from GruffyPuffy/xbus_jr01
Suport for Align DMSS RJ01 remote receiver
2015-01-25 14:34:27 +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
83748bac98 STM32F3 - Fix serial port constraints and functions when VCP is not
used.
2015-01-25 00:52:27 +01:00
Stefan Grufman
12f45b4f04 Merge branch 'master' into xbus_jr01 2015-01-24 13:54:58 +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
Stefan Grufman
0a3a8667d1 Merge branch 'master' into xbus_jr01 2015-01-15 20:15:36 +01:00
Nicholas Sherlock
6c2ce5038c Merge remote-tracking branch 'upstream/master' 2015-01-04 10:35:59 +13:00
Stefan Grufman
bf3aca8240 Merge branch 'master' into xbus_jr01
Conflicts:
	src/main/io/serial.c
2015-01-03 17:23:21 +01:00
Dominic Clifton
73e82b8446 Adding new (private) MSP commands for configurating serial port
scenarios and baud rates.
2015-01-03 00:54:24 +00:00
Stefan Grufman
e8e53ab7f1 Added initial suport for Align JR01 DMSS (i.e. satellite receiver for JR systems) support. 2014-12-27 14:01:40 +01:00
Nicholas Sherlock
c85a172370 Merge remote-tracking branch 'upstream/master' 2014-12-18 18:17:59 +13:00
Dominic Clifton
693307d51d STM32F30x - Add support for UART3 - untested. 2014-12-09 03:12:35 +00:00
Nicholas Sherlock
8c41772584 Add Blackbox 0.1.0 2014-12-08 22:06:57 +13:00
Dominic Clifton
365f3eebed Merge pull request #178 from ledvinap/fix-serial-feature
Fix feature check (all features must be set to use port)
2014-11-21 23:25:03 +00:00
Dominic Clifton
56a1458eed Merge pull request #170 from Pierre-A/cc3d-updates-pa2
Correction of typo and consequences
2014-11-21 23:23:48 +00:00
Petr Ledvina
4a23814532 Fix feature check (all features must be set to use port) 2014-11-20 14:58:54 +01:00
Pierre-A
e99fbe863f Correction of typo and consequences 2014-11-15 11:37:39 +01:00
Dominic Clifton
668c9c0457 Allow smartport to be configured. Fix shared port flag calculation. 2014-11-12 01:30:05 +00:00
Frank Zhao
6311dc8f8c added single wire half duplex UART
Conflicts:

	src/main/telemetry/telemetry.h
2014-11-12 00:29:42 +00:00
Frank Zhao
0000d3e65e added smartport telemetry
Conflicts:

	src/main/telemetry/telemetry.h
2014-11-12 00:11:13 +00:00
Dominic Clifton
2461973dd6 There was a little more fixed to do when telemetry was not eanbled.
Tested arm/disarm/arm/disarm with telemetry on and off, all working now.

See #155.
2014-11-08 01:11:10 +00:00
Petr Ledvina
8d22a85222 Fixed some whitespace around operators
one compiller warning about possible uninitialized variable supressed
2014-11-06 17:36:40 +01:00
Dominic Clifton
db36cfe12e Fix arm/disarm/arm bug when using shared msp/telemetry ports.
All msp ports are now re-initialised when disarming.

Bug wa introduced by c06fd78b83 - see
#144.

Runtime serial port scenario should not have been erased.

Fixes #144 and #155. Cleanup #125.
2014-11-05 20:23:59 +00:00
Dominic Clifton
c06fd78b83 Fix being unable to change port function of serial port during runtime.
Closes #144.

Thanks @frank26080115
2014-10-28 15:49:02 +00:00
Petr Ledvina
e179218caf Trivial changes
- use inline functions for gpio (typesafe, no speed penalty)
- fix sortSerialPortFunctions (original was IMO broken)
- allow softserial port on sonar pin when FEATURE_SONAR is not enabled
- minor style changes and comments
2014-10-23 15:08:57 +02:00
Dominic Clifton
f9f6b05aac Fix opening softserial ports - missed a #ifdef check. 2014-10-20 20:13:30 +01:00
Dominic Clifton
91c7407806 Cleanup CC3D softserial - it only has enough pins/timers for one port.
PR #124 incorrectly re-used the same timer hardware for the second port
which was bad.
2014-10-20 19:34:10 +01:00
Pierre-A
20c4dae7c2 SoftSerial port for CC3D 2014-10-19 11:20:55 +02:00
Dominic Clifton
6f3aa6fb86 Add extra MSP commands to allow settings to be made via a GUI in
addition to setting via the CLI.

Note: MSP_CONFIG from baseflight
bc68d89983d762d35cc1cf5e3fa0c2cf03287b70 will not be supported because
more specific commands exist in cleanflight.

MSP_MISC and MSP_CONFIG are good examples of single responsibility
violations.
2014-10-17 01:33:47 +01:00
Dominic Clifton
a5d57e7b87 STM32F3 - Cleanup serial port usage. 2014-09-26 01:02:27 +01:00
Dominic Clifton
d60183d91d Normalize all the line endings 2014-09-15 23:40:17 +01:00
Dominic Clifton
e14347bf47 Disable softserial port 2 on Naze and Olimexino targets when SONAR is
enabled without RX_PARALLEL_PWM because they use the same pins.
2014-09-15 21:29:17 +01:00
Dominic Clifton
0b353341f8 Limit MSP ports to 2 for normal usage scenarios. 2014-08-14 00:50:17 +01:00