1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00
Commit graph

676 commits

Author SHA1 Message Date
Dominic Clifton
126f94b2c1 fix include file order on flight imu unit test 2014-05-13 16:22:55 +01:00
Dominic Clifton
89d2c3152f Code formatting and style fixes. 2014-05-13 16:02:18 +01:00
Dominic Clifton
4d572800ee Documentation formatting. 2014-05-13 15:08:33 +01:00
Dominic Clifton
c4dc65f832 Latest binaries for STM32F103 platforms. 2014-05-12 14:15:13 +01:00
Dominic Clifton
4c4c7b311f STM32F103 - Fix ADC initialisation, somehow the changes got lost when
implementing the STM32F303 ADC code.  Now this is inline with the
STM32F303 initialisation.

This also deletes some redundant code due to better initialisation
sequence.
2014-05-12 14:13:23 +01:00
Dominic Clifton
22a5e4ceae Updating documentation. 2014-05-12 13:48:57 +01:00
Dominic Clifton
e7092ee120 Updating readme to point at documentation sources. 2014-05-12 13:32:13 +01:00
Dominic Clifton
8d0f37a624 Latest binaries. 2014-05-12 13:24:31 +01:00
Dominic Clifton
5d460766e9 RXMSP is no longer a serial rx provider since it uses MSP and not it's
own dedicated serial port.
Added a feature to enable/disable RX_MSP.
Renamed feature SERIALRX to RX_SERIAL.
Renamed feature PARALLEL_PWM to RX_PARALLEL_PWM
Renamed PPM to RX_PPM.

Update serial configuration checking to better support Serial RX and
telemetry by verifiying serial port features and supported baud rates.

It's now possible to use a low-speed serial rx provider via softserial -
only problem is all the current serial rx providers are 100000/115200
baud.  The code changes however open the door for using serial rx and
any capable serial port such as uart3-5 on the STM32F30x

It's also now possible to use GPS at low speeds on software serial
ports.
2014-05-12 13:23:20 +01:00
Dominic Clifton
a947ef8fbb BUGFIX - Linker script for F10x was not reserving the last 2kb which
meant that 1kb of code could be overwritten when saving the config.  

Fixed EEPROM write address for F30x so that code is also not overwritten
when saving the config.
2014-05-12 01:36:59 +01:00
Dominic Clifton
c77c93c8b7 Update battery voltage calculation to use a hex value for the 12bit ADC
value.
2014-05-12 00:20:15 +01:00
Dominic Clifton
9f39cad2f9 Disable L3GD20 debug output. 2014-05-12 00:17:41 +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
b3ee895f97 Merge branch 'multiwii-master'
Conflicts:
	src/board.h
	src/buzzer.c
	src/config.c
	src/drivers/serial_common.h
	src/drivers/system_common.c
	src/drv_gpio.h
	src/drv_pwm.c
	src/drv_timer.c
	src/drv_uart.c
	src/flight_imu.c
	src/mw.c
	src/rx_sbus.c
	src/sensors.c
	src/serial_cli.c
2014-05-12 00:16:03 +01:00
treymarc
cabc57774c format code properly
match the comment from pullrequest about spacing
remains : some hand alignment for comment and wrong /** */ usage.
Conflicts:

	src/board.h
	src/buzzer.c
	src/config.c
	src/drivers/serial_common.h
	src/drivers/system_common.c
	src/drv_gpio.h
	src/drv_pwm.c
	src/drv_timer.c
	src/drv_uart.c
	src/flight_imu.c
	src/mw.c
	src/serial_cli.c
2014-05-11 18:04:05 +01:00
kh4
ab2273f93e Enable input filtering on input capture timers.
Conflicts:

	src/drv_pwm.c
2014-05-11 17:11:04 +01:00
Dominic Clifton
4a79774fb4 Delete unused duplicate extern statement. 2014-05-10 17:48:44 +01:00
Dominic Clifton
d0559b1423 Cleanup GPS variables and delete unused code. 2014-05-10 17:43:31 +01:00
Dominic Clifton
be3a4c9944 Cleanup variables that can be made static. 2014-05-10 17:43:07 +01:00
Dominic Clifton
7b37bb8525 Latest binaries 2014-05-10 17:09:40 +01:00
Dominic Clifton
56d6e9012f Improvement - Ensure memory used only during system init is returned to
the heap.

This saves at least 18 bytes of ram.
2014-05-10 17:05:08 +01:00
Dominic Clifton
eeb13b427d CHEBUZZF3 - Cleanup USART irq handler. Disable UART2 DMA for now. 2014-05-10 16:40:02 +01:00
Dominic Clifton
bf90246c95 Add callback support to software serial.
Also fixed problem with shared serial port detection.
2014-05-10 16:12:26 +01:00
Dominic Clifton
5c4bfd4e58 Configuration validation.
This enables a new feature setting for PARALLEL_PWM which is enabled by
default.

This starts to move much of the feature checking/excluding code that is
littered through into a single place - validateAndFixConfig().  Since
the config is known to be valid after the method is called other code
can just get on with it's job instead of checking for confliciting
features/settings.
2014-05-10 14:12:24 +01:00
Dominic Clifton
0fd127bf60 Allow the user to specify their serial port scenarios. 2014-05-10 14:11:01 +01:00
Dominic Clifton
5043370b2f Disable some acc/gyros on Olimexino. 2014-05-10 14:09:38 +01:00
Dominic Clifton
f1d38c0fa2 Rename serialrx_type to serialrx_provider to match gps_provider and
telemetry_provider.
2014-05-10 00:32:42 +01:00
dongie
17742315fa Merge pull request #95 from kh4/master
Enable input filtering on input capture timers.
2014-05-10 07:58:50 +09:00
dongie
a848ccc129 Merge pull request #102 from fnurgel/fnurgel/sbus_rx_failsafe_enable
Use rx failsafe when baseflight failsafe is not enabled for s.bus
2014-05-10 07:58:03 +09:00
Dominic Clifton
1777d8feda First cut of configurable serial port functionality.
Currently port usage is hard-coded to the default port layout, cli
commands are coming in a future commit.

This decouples all code from the global 'serialPorts' structure which
has been removed.  Any code that needs to use a serial port can use
findOpenSerialPort() and openSerialPort() and maintain it's own
reference to the port.

Ports can switch between functions.  e.g. by default
cli/msp/telemetry/gps
passthrough all use USART1.  Each port maintains it's current function.
see begin/endSerialPortFunction.

There are only certain combinations of serial port functions that are
supported, these are listed in serialPortFunctionScenario_e.

This commit also adds a few 'static' keywords to variables that should
have been.

There a a few other minor fixes and tweaks to various bits of code that
this uncovered too.
2014-05-09 23:39:10 +01:00
Dominic Clifton
533a1f9e48 CHEBUZZF3 - Fix software serial pwm mapping. 2014-05-08 22:11:11 +01:00
Dominic Clifton
185fd0f4c9 Fix the problem where RC channels would show up as 1498 with no receiver
connected instead of the 'midrc' value.

Achieved by deleting unnecessary legacy ardino code.

Discussion here:
http://www.multiwii.com/forum/viewtopic.php?f=8&t=5063&p=50635#p50634

Basically it was there because the Ardiuno PPMSUM timer resolution is
lower than the STM32 code we use.

With a Grapner GR-24 receiver using parallel PWM or PPM (12channel) the
values hardly fluctuate at all, slightly more noticable with parallel
PWM input.
2014-05-08 15:31:35 +01:00
dongie
399cc784be building current hex 2014-05-08 22:11:12 +09:00
dongie
509f6ae75e moved BMP085/BMP180 init before MS5611 - reports of calibration data inside BMP180 passing MS5611 PROM CRC could trigger false detection 2014-05-08 22:03:22 +09:00
dongie
842380bc31 check data returned from rcReadRawFunc() for being valid 2014-05-08 21:58:26 +09:00
Dominic Clifton
3c91ce6c8b Avoid uninitialised variable warning in rx_common.c. 2014-05-08 13:29:10 +01:00
Dominic Clifton
6704ba40b5 Decouple failsafe from RX drivers.
This removes a number of FIXMEs regarding driver dependencies on the
main code.

The code to verify pulse lengths is now in computeRC which means that
all RX drivers do not have to duplicate the pulse length checking code.

This means that failsafe can be used to validate serial RX providers as
well as PWM/PPM RX providers.
2014-05-08 13:28:14 +01:00
Dominic Clifton
3ed979e88c BUGFIX - pwmReadRawRC was broken in
2d248676f5. MSP RX ignored rc channel
mapping.

Symptoms: power up FC using parallel PWM or PPM with no receiver
attached.  Connect GUI tool to view receiver data.  Observe that each
channel has a reading of '2' instead of somewhere near 'midrc'.

Symptoms: rxMsp ignored rc channel map, cli 'map' command had no effect.

This commit re-instates the code that checked to see if an rc channel
value was in the correct range but moved it into computeRC where it
really belongs.

Additionally to the code to remap rc channels was moved from the rx
implementations into the computeRc method.  This results in smaller code
size, no duplication of logic avoids having to pass rxConfig to each rx
read method and finally fixes rxMsp so that channel mapping can be used.

Failsafe still works as intended, verified by using parallel PWM, arming
and then pulling out the throttle PWM inpout cable.

This also improves code cleanliness since now each rawRawRc method in
the RX implementations does not have to remap the channels.  The methods
now do only what their name says.
2014-05-08 12:07:15 +01:00
dongie
a667eda98e Merge pull request #106 from treymarc/format2
format code properly
2014-05-08 09:40:29 +09:00
treymarc
1f293795e7 format code properly
match the comment from pullrequest about spacing
remains : some hand alignment for comment and wrong /** */ usage.
2014-05-08 00:36:19 +00:00
Dominic Clifton
35f7ce06f3 Rename pwm_rx failsafeCheck variables. 2014-05-08 01:29:21 +01:00
Dominic Clifton
10f3835491 CHEBUZZF3 - Use timer configuration that matches the hardware. 2014-05-08 01:28:31 +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
a3d23de2ca Update notes.txt
CHEBUZZF3 - Update board orientation notes.
2014-05-07 22:17:55 +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
672627e7f4 ChebuzzF3 - add ChebuzzF3 target notes 2014-05-07 21:22:38 +01:00
Dominic Clifton
4bf0e9cfa2 Updating FIXME comments. 2014-05-07 18:56:55 +01:00
Dominic Clifton
3dbdedf1b2 latest binaries 2014-05-06 14:15:14 +01:00
Dominic Clifton
8322bba5f1 Fixing use of softserial for telemetry that was also broken in
92bed4a33d
2014-05-06 14:11:52 +01:00
Dominic Clifton
8919acb902 Fix PPM input that was broken in
92bed4a33d
2014-05-06 13:56:58 +01:00