Commit graph

2704 commits

Author SHA1 Message Date
Dominic Clifton
b957def2f3 Fix powerAdcChannel on STM32F1.
Initialisation of ADC was incorrect.
2014-05-26 17:50:33 +01:00
Dominic Clifton
4b58dc110d Latest binaries. 2014-05-26 13:32:21 +01:00
Dominic Clifton
57aab9ec0c Disable HoTT debug output. 2014-05-26 13:31:27 +01:00
Dominic Clifton
5ccb0ecf36 Fix PPM support when using 8 channels on STM32F10x.
This was broken when 12 channel support was added in combination with
the STM32F3 support.
2014-05-26 13:31:19 +01:00
dongie
09b7268ec1 hardware divider supports up to 8S, make it so in the code as well. 2014-05-26 20:24:14 +09:00
Dominic Clifton
8f6558156f Update HoTT GPS coordinate calculations.
It was broken for South/West values.

Added additional tests for maximum long/lat values.

Requires field testing to make sure values are correct on the telemetry
display.
2014-05-26 02:15:06 +01:00
Dominic Clifton
37051720fd Updating I term for newpid to be 0.6f for a more locked-in feeling, as
per Lux's feedback.
2014-05-26 01:06:03 +01:00
Dominic Clifton
38d554e958 Merge branch 'master' of github.com:hydra/cleanflight 2014-05-26 01:04:15 +01:00
Dominic Clifton
17dd005047 Updating the L3GD20 scale factor and resolution based on Lux's comments
and feedback.  

Apparently 500 is 'not enough unless you're just hovering'.  2000 is
needed.

Previously the scale factor was guessed, incorrectly.
2014-05-26 01:03:55 +01:00
Dominic Clifton
d5bb662139 Merge pull request #15 from nico-dh/master
adding doc for building in windows
2014-05-25 16:18:17 +01:00
Lukas S
cffdfb782c new Baseflight PID
full gyro scale is used now
and a new pid with float calculations was added based on PIDrewrite
eeprom size was also increased from 1kB to 2kB

Conflicts:

	src/config.c
	src/drivers/accgyro_l3g4200d.c
	src/drivers/accgyro_mpu3050.c
	src/drivers/accgyro_mpu6050.c
	src/flight_imu.c
	src/mw.c
	src/mw.h
	src/serial_cli.c
	src/serial_msp.c
	src/utils.c
	src/utils.h
2014-05-25 15:31:30 +01:00
grunbaum nicolas
9a085bebad addind doc for building in windows
Signed-off-by: grunbaum nicolas <grunbaum@gmail.Com>
2014-05-25 15:27:58 +02:00
Dominic Clifton
1df79e65fc Updating telemetry documentation. 2014-05-25 03:29:47 +01:00
Dominic Clifton
e40c890183 Latest binaries - Using latest GNU ARM Tools, (2014-q1). F30x targets
now with FPU enabled, HoTT GPS telemetry cleanups, MSP Telemetry.
2014-05-25 02:55:41 +01:00
Dominic Clifton
6dc88355b2 Updating developer docs. 2014-05-25 02:53:26 +01:00
Dominic Clifton
88254fa736 Refactor telemetry MSP.
BOXNAMES is repeated in case the first transmission is never received.

Each time sendMspTelemetry is called it executes one and only one
command.  There was nothing wrong with the old approach which sometimes
sent more than one command each time sendMspTelemetry was called but
this is simpler and there is far less duplication.
2014-05-25 00:44:16 +01:00
Dominic Clifton
41a4f6b5e0 Merge branch 'treymarc-master-cleanflight-msptelemetry' 2014-05-25 00:33:14 +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
Dominic Clifton
e087b37273 Merge pull request #14 from treymarc/fpu
use hardware fpu with target stm32f30x
2014-05-25 00:14:28 +01:00
treymarc
ac520b0676 usf hardware fpu with target stm32f30x 2014-05-24 20:40:12 +00:00
Dominic Clifton
10279c0178 Updated GPS logitude/latitude calculation.
The existing implementation that was ported over was trying to work with
different values.  By writing a unit test for the code that stores
values in GPS_coord it was possible to have known values which could
then also be used to write a unit test for the HoTT telemetry which
finally enabled production code to be written.

Hopefully it will work, unable to test further since my GPS unit is
playing up.
2014-05-24 21:16:02 +01:00
Dominic Clifton
49781b5080 Updating documentation. 2014-05-24 21:04:30 +01:00
Dominic Clifton
d928404919 Updating Development docs. 2014-05-24 17:55:48 +01: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
b81f73cb5d HoTT code cleanup. 2014-05-24 15:59:50 +01:00
Dominic Clifton
279bba0e13 Latest binaries with RSSI PWM and reduced HoTT message preparation
update rate.
2014-05-24 00:09:08 +01:00
Dominic Clifton
7c48eb9487 Change the HoTT telemetry update to 5hz. 2014-05-24 00:07:50 +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
Dominic Clifton
1b80c76e30 Latest binaries 2014-05-23 15:42:26 +01:00
Dominic Clifton
3bf92a2523 Updating Olimexino board documentation to cover new HoTT telemetry port. 2014-05-23 13:08:18 +01:00
Dominic Clifton
9d9a9ae075 Add whitespace to ChebuzzF3 notes. 2014-05-23 11:54:22 +01:00
Dominic Clifton
f232b831d2 Replace cli command gps_initial_baudrate_index with gps_baudrate.
The index is not really a user concern and leads to confusion.  gps
baudrate is not set like any other baud date and the determination of an
appropriate index is hidden from the user.

If the user specifies a baudrate that is not supported the default index
is used which is current the index for 115200.

This also allows GPS to work on softserial ports at up to 19200.
2014-05-23 11:54:00 +01:00
Dominic Clifton
8103449129 Adding Olimexino notes and details of the Olimexino Shield V1 (by
Dominic Clifton)
2014-05-23 11:42:01 +01:00
Dominic Clifton
38a1c0def4 Update binaries to include warning led and failsafe fixes and cleanups. 2014-05-22 22:49:10 +01:00
Dominic Clifton
d6c1ce323d BUGFIX - Warning LED / arm prevention code fixes.
The old code was using f.ACC_CALIBRATED to mean 'flash the warning led'
and 'prevent arming'
There was another flag called f.OK_TO_ARM which really meant 'prevent
arming after failsafe unless using a switch to arm' - this meant the
comment in the code was incorrect since it did not mention the switch.
There was code which every ~71 minutes would set f.ACC_CALIBRATED to
FALSE and would toggle the LED, even when flying.
There was code that was run during every cycle that did not need to be
run when armed.
There was code that was run during every cycle which did not need to be
run when waiting for calibration to finish.
The warning light was toggled regardless of actual accelerometer
calibration state.

This commit fixes all that and prevents the user from arming after a
failsafe landing until the system is reset, regardless of wether a
switch is used to arm or not.

This commit also flashes the warning led during barometer calibration
and will not let you arm until it has completed.

Add a 5 second delay on startup to failsafe to prevent failsafe from
activating in the case of TX/RX gear with long bind procedures before
they send out valid data.

Failsafe now only prevents re-arming if a landing was forced.

In the case when you power on your RX without your TX on the beeper
sounds and failsafe warning ligts are activated.  When the FC then
detects a signal the lights go off and you can then arm.
2014-05-22 22:46:54 +01:00
Dominic Clifton
d1be2ed5e2 Add special failsafe handling for PPM whilst still keeping failsafe code
out of the PWM RX driver.
2014-05-22 21:22:31 +01:00
Dominic Clifton
910d63a722 Latest binaries, includes HoTT updates and some serial port changes. 2014-05-22 17:29:35 +01:00
Dominic Clifton
b37bace5c1 HoTT update.
There's a number of changes in this commit, all related.

Improved efficiency of preparing HoTT messages.

All HoTT message data is no-longer reset each time, going forward old
data is re-used unless it is updated.  This should help with GPS
co-ordinates too since they were erased from subsequent responses when
ideally the last-known co-ordinates should be transmitted each time.

The previous update was sending one too many bytes due to the
aligned/padded uint16_t values in the HoTT data structures.  There were
two solutions, use #pragma to pack the structure or avoid larger types
in the structures, the latter made sense and results in more portable
code since it's a wire format.

Updated HoTT structures to use latest message structure from Ardupilot.
Currently the variables are in underscore_format, that will likely
change in future.

Cleaned up and deleted old ported code that was #ifdef'd out.  Some test
code still remains for now.  This will be deleted in due course.

Introduced bitmask for EAM alarm flags.

Corrected documentation.
2014-05-22 17:25:51 +01:00
Dominic Clifton
02a8e993f5 Use first MSP port opened for now, instead of the last one.
This works with the default configuration and when also enabling MSP on
soft serial 1/2 while leaving the uart1 scenario at it's default.
2014-05-22 14:13:02 +01:00
Dominic Clifton
a2531722f3 Adding Development documentation. 2014-05-22 12:42:39 +01:00
Dominic Clifton
51d28e19aa Update serial port code so that it's possible to open more than one port
per function.

Note: a future commit will enable MSP to work on additional ports in
order to support simultaneous combinations of Serial/Bluetooth
configuration, OSD, RX_MSP on otherwise unused ports.
2014-05-22 12:41:07 +01:00
Dominic Clifton
4f88ff1054 Cleanup accreditation and FIXMEs for uart drivers. 2014-05-22 10:02:35 +01:00
Dominic Clifton
1e357f7966 Moving telemetry documentation to it's own file. 2014-05-21 21:41:29 +01:00
Dominic Clifton
451b132764 Updating configuration examples to include HoTT via softserial. 2014-05-21 21:29:36 +01:00
Dominic Clifton
b8c620a2c7 Latest binaries. Working HoTT telemetry via softserial. 2014-05-21 21:04:49 +01:00
Dominic Clifton
b24472eca2 Fix softserial inverted head/tail usage.
This fixes softSerialTotalBytesWaiting() which means that HoTT now works
on SoftSerial.
2014-05-21 21:02:55 +01:00
Dominic Clifton
63a97b2ab5 Latest binaries with improved HoTT support. 2014-05-21 20:08:17 +01:00
Dominic Clifton
eb0beb70a9 Fix softserial loopback support compilation errors. 2014-05-21 20:06:53 +01:00
Dominic Clifton
49d411dcc7 Update HoTT telemetry processing.
This should be flyable now, the previous implementation would block
while calculating data and transmitting.

This implementation calculates packets on a 50hz schedule and transmits
data as close to the transmission spec as it can.  It's still possible
for other long-running code to interfere with the data transmission.  A
solution would perhaps be to use a timer/irq for the transmission
instead.

There is some cleanup to do still but this needs to be in the hands of
testers for early feedback.
2014-05-21 19:33:28 +01:00
Dominic Clifton
f374b01ca7 Update softserial bytes waiting calculation to use the same logic that
the uart code uses.
2014-05-21 19:27:51 +01:00