1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00
Commit Graph

4791 Commits

Author SHA1 Message Date
James Cotton
ab41bae071 Separately smooth the error estimate from the derivative 2012-02-08 11:15:33 -06:00
James Cotton
60c951843d Use backtracking to limit integral in altitude hold and smooth the velocity
error.  Initialize the throttle integral better.
2012-02-08 10:39:31 -06:00
James Cotton
d5207c19f0 Fix for accidentally including inssetings back into build 2012-02-08 09:46:51 -06:00
James Cotton
c6b1d6b8df Rework the altitude hold code a bit 2012-02-08 09:42:10 -06:00
James Cotton
49a03a868b Merge branch 'altitudehold' into revolution_overo
Conflicts:
	flight/OpenPilot/UAVObjects.inc
	flight/Project/OpenPilotOSX/OpenPilotOSX.xcodeproj/project.pbxproj
	flight/Revolution/Makefile
	flight/Revolution/ins.c
2012-02-07 23:00:29 -06:00
James Cotton
6ec0f06c80 Back to 1024 byte packets 2012-02-07 13:02:11 -06:00
James Cotton
2c60447200 Switch back to 512 byte packets and fix bug when writing the header size that
was smashing the crc
2012-02-07 11:32:04 -06:00
James Cotton
221a0c5e53 Add the number of dropped updates to the overosync stats 2012-02-07 09:13:26 -06:00
James Cotton
a89d425b23 Reset the received rate for overo sync object 2012-02-07 09:01:58 -06:00
James Cotton
02bec750bd In the attitude loop need to check all the queues even if unused or the event
system will have warnings
2012-02-07 08:46:34 -06:00
James Cotton
3bb571a1a7 Delete overo stubs to move into submodule 2012-02-06 15:48:30 -06:00
James Cotton
ae01936808 Add the portTickTime into the OveroSync stream 2012-02-06 10:00:02 -06:00
James Cotton
dbcb499d7f Add object to monitor the overo link status. Current just records the bytes/s
being sent and the connected status (based on sending more than 500 bytes per
second)
2012-02-06 09:37:31 -06:00
James Cotton
5b2376dbee Remove the semaphore for buffer swapping and make this occur during the receive
ISR.  This leads to a possible condition where a copy is taking place in
userspace and then a buffer swap interrupts it.  However, the copy should
always finish before the SPI DMA slave catches up to that place in memory at 10
MHz.

This fixes a common condition where the userspace task (low priority) was not
swapping buffers in time from user space and logs were corrupted.
2012-02-06 08:21:24 -06:00
James Cotton
179e66b754 Refactor how new packets are scheduled to avoid trying to start a transaction
from an ISR.  This was causing lock ups.  It's a bit higher latency probably
(trivially slow) but if we aren't keeping up with the Overo transactions then
using a proper DMA double buffer will be required.
2012-02-04 20:11:31 -06:00
James Cotton
4e190f99e2 Improved the revo overosync code to put multiple uavobjects into a packet 2012-02-04 12:06:03 -06:00
James Cotton
18a64e261f Going a bit overkill with this - deinit who SPI block between transactions. 2012-02-02 12:32:57 -06:00
James Cotton
c26154f303 Switch back to 256 byte packets and 0xFF pad the end 2012-02-02 11:40:49 -06:00
James Cotton
03cfb1453a DeInit SPI DMA between transactions. Somehow if this doesn't happen the next
transaction doesn't start at the beginning again.  Something is still not quite
right because first few bytes aren't getting across.  Need logic analyzer.
2012-02-02 11:37:35 -06:00
James Cotton
77a6abb341 For PIOS_SPI F4 do not enable the TX irq. Also do not wait for the
transmission to finish either.
2012-02-02 11:24:14 -06:00
James Cotton
8b1137c6a0 Align the tx and rx SPI buffers from Overosync 2012-02-02 11:23:40 -06:00
James Cotton
0a71a48c57 Sending all FF finally again 2012-02-02 10:36:09 -06:00
James Cotton
80b839d145 The SPI3 TX DMA channel was wrong 2012-02-02 10:13:09 -06:00
James Cotton
29237f97ae For SPI slave devices we need to handle the interrupt differently since
transactions should already be completed.  Also reset the callback so in the
case of noise on the IRQ line it will not keep firing interrupts.

I suspect we should probably disable interrupts in this handler to prevent
refiring.
2012-02-02 10:13:09 -06:00
James Cotton
88b9f20cda Fix nasty bug in the DMA stream configuration 2012-02-02 10:13:09 -06:00
James Cotton
95abb56d5e Added module to send updates out the SPI port 2012-02-02 09:19:25 -06:00
James Cotton
e434ab94a9 Enable SPI port for revolution to overo communications 2012-02-02 01:42:38 -06:00
James Cotton
7114b9a721 Start writing the ARM UAVTalk server client 2012-02-01 13:29:52 -06:00
James Cotton
c8464848b5 Merge remote-tracking branch 'revo/amorale/revolution' into revolution 2012-01-31 17:51:20 -06:00
Alessio Morale
5449408763 Merge branch 'amorale/timerprescaler' into inoutch8 2012-02-01 00:23:53 +01:00
Alessio Morale
cb2dadd0ea fix Motor 8 out not working 2012-02-01 00:20:50 +01:00
Alessio Morale
322ced44a1 Solve PWM Input 8 not working 2012-02-01 00:16:48 +01:00
James Cotton
72be7bb809 Don't use usleep for the poor windows kiddies. 2012-01-31 16:32:15 -06:00
James Cotton
71ba2c06a8 Merge remote-tracking branch 'revo/stac/revo-config-widget-fix' into revolution4 2012-01-29 08:35:52 -06:00
James Cotton
c4abfcff91 Merge remote-tracking branch 'revo/stac/dfu-util' into revolution4 2012-01-29 08:35:36 -06:00
Stacey Sheldon
f5e9a9365c gcs config: fix case on revo config gadget includes 2012-01-28 21:00:15 -05:00
Alessio Morale
820e8ac062 Handle different prescaler values for timers on APB1 and APB2.
The PIOS_MASTER_CLOCK has been removed in favor of
PIOS_SYSCLK (the master clock value,168000000 for revolution)
PIOS_PERIPHERAL_APB1_CLOCK and
PIOS_PERIPHERAL_APB2_CLOCK
Look at STM32F4xx_Revolution.h for the list of timer/peripheral and APB them belongs.
2012-01-28 20:04:55 +01:00
James Cotton
0b778667b3 Improve log processing code 2012-01-28 10:11:34 -06:00
James Cotton
a778c45d6f For L3GD20 sensor task run at the sensor speed 2012-01-28 10:11:30 -06:00
Stacey Sheldon
3318979714 dfu-util: Add dfu-util install target to Makefile
This tool can be used to read/write the interal device flash
in an STMF4 MCU via the built-in bootloader.

dfu-util can be downloaded and installed using this command:
  make dfuutil_install

The homepage for this tool is at:
  http://dfu-util.gnumonks.org/
2012-01-28 09:28:57 -05:00
James Cotton
13447ac907 Fix the MPU6000 implementation 2012-01-28 00:21:58 -06:00
James Cotton
e07fca0465 Commit the revolution board_hw_defs.c file 2012-01-26 23:32:36 -06:00
James Cotton
e0fc4c30ee Small fix to revo sensor log processing. Also check in allan analysis. 2012-01-26 23:31:12 -06:00
James Cotton
b4435d0b35 For L3GD20 sensor task on revo update gyro once per physical sample 2012-01-26 23:29:12 -06:00
James Cotton
f311700804 Flashfs: Whenever failing out of a transaction unlock the semaphore 2012-01-26 14:14:50 -06:00
James Cotton
85bfa7dcf9 Flashfs: Missed calculation of the header crc for monolitihic write 2012-01-26 13:32:53 -06:00
James Cotton
84dd1dbc40 A bit more lenient settings for CC sensor timings 2012-01-26 13:00:06 -06:00
James Cotton
ad3d470f40 Flashfs and Flash: Add new function to write a series of blocks in one flash
write transaction to improve efficieny.
2012-01-26 12:39:35 -06:00
James Cotton
80705cdba1 Flash: Because on CC/CC3D the flash is initialized before FreeRTOS is started
we cannot use the transaction lock or the delay while saving.
2012-01-26 11:50:05 -06:00
James Cotton
4fc907ad0d Add a transaction semaphore to flash and flashfs to make sure multiple saves
or loads can't be attempted between threads
2012-01-26 11:36:07 -06:00