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

215 Commits

Author SHA1 Message Date
peabody124
8a32d88b10 OP-265 CC: More work to get it running
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2425 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-14 01:38:47 +00:00
peabody124
f0c36b13a4 PiOS/USART: Use the buffer size defined in the board file
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2421 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-14 01:38:37 +00:00
peabody124
79caad654b CopterControl: Don't need altitude sensor support
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2418 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-14 01:38:30 +00:00
peabody124
07798bb2db PIOS/WDG: Add back the returned delay for code that wants to clear WDG more
rarely

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2403 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-13 19:01:33 +00:00
zedamota
691c58a583 OP-268/PipX Bootloader - Changed the size of BL def.
New naming convention for the linker files:
link_(board_name)_(density)_(bl usage).ld

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2401 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-13 17:34:22 +00:00
peabody124
d846288cec OP-14 I2C: Remove delay in I2C IRQ handlers
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2378 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-11 03:50:23 +00:00
peabody124
bbbd9a10e3 OP-14 I2C Diagnostics: Improve the logging so that the events going into FSM
are logged, and separately the erirq and evirq logs are exported

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2368 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-10 05:42:53 +00:00
peabody124
b173d74821 OP-237 I2C ESC support. This _will_ require you to reconfigure your
ActuatorSettings although for PWM aircrafts it should be done exactly as before

Actuator: Store the update times and maximum update time

OP-14 I2C: Start tracking short history of events and states in driver for
logging
OP-237 Flight/Actuator: Support for I2C based ESCs

OP-237 MK_ESC: Send all four motors as one atomic transfer

OP-237 Flight/Actuator: Allow channels to be mapped to MK I2C interface.  Currently
mixer channels are either PWM or MK but in the future this will change to
support more than 8 channels.

OP-16 PiOS/I2C: Further work to try and make I2C more stable, mstly special case
handline in IRQ

OP-237 I2C ESC: Support for Astect 4 channel ESCs

OP-237: When the I2C Actuator write update fails track this

OP-237 Actuator Settings: Change the way motor types are selected to keep that
information more appropriately within ActuatorSettings instead of MixerSettings

Also make motors stay at or above neutral when armed and throttle > 0

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2366 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-10 01:11:44 +00:00
peabody124
ed11e64bb2 OP-251 Watchdog: Get rid of the old extra watchdog module and instead have
tasks directly update a flag for each module (which they register) and when all
flags set clear the watchdog then.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2365 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-10 00:16:30 +00:00
peabody124
5734e1f437 OP-176 PIOS/ADC: Decrease the priority of the ADC DMA/IRQ
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2360 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-09 20:49:43 +00:00
peabody124
0175e25ddf Flight/ADC: If there is a DMA error for the ADC transfer dont copy those values
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2359 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-09 20:49:39 +00:00
peabody124
0f07d7f671 OP-240 OP-176 Flight: Setting the priority group back to 4 (anything higher
priority preempts) and adjusting the priorities around to be more sensible.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2355 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-09 20:49:26 +00:00
peabody124
d8022a320d OP-238 PiOS/USB: Fix for problem Ed's being see where being plugged into usb
but not having telemetry causes a reset.  If the buffer got full enough it
would never start to transmit again.

Note: also making Telemetry non-blocking

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2346 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-08 08:05:02 +00:00
edouard
3bad347386 Reverted a change which caused resets on the MB under certain conditions. Should be back to normal now.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2311 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-30 19:24:57 +00:00
sambas
0b2a0884ae OP-22 Flight/PiOS: Spektrum improvements, removed my zero throttle glitch
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2306 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-28 18:37:36 +00:00
peabody124
7ab6dfeeba PiOS/USB_HID: Lower priority of USB interrupt
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2280 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-24 17:16:07 +00:00
peabody124
1142b1fb1e PiOS/USB_HID: No longer clear buffer after getting a NAK. This was required
before because if transmission got NAK then sending would stop.  Now the next
time data is added to the buffer a new send will be attempted.

fifoBuf: in clearData just set the read pointer to the write pointer.  This is
safer for multiple people accessing it assuming the reader will be clearing it.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2279 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-24 17:16:04 +00:00
peabody124
ba8351f60a PiOS/USB_HID: When using FreeRTOS use a sempahore to stop multiple tasks
pushing data to the transmit buffer

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2278 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-24 17:15:59 +00:00
zedamota
14ef24a3de OP-21/Bootloader - Maximize flash space available for user code. Bring back delay on HID send (board->pc) it still hangs when blasted with data. AHRS is now Readable.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2263 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-21 17:25:24 +00:00
peabody124
f010502229 PiOS/I2C: Was throwing out repeated byte transmitted events but this is
required for longer sequences,  Need to deal with when it happens
inappropriately better.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2245 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-18 07:09:34 +00:00
peabody124
af99c31a61 PiOS/I2C: Fixed typo and also the values for I2C Diagnostics when disabled.
Enabled by default though.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2243 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-18 07:09:28 +00:00
zedamota
917f03121d Fixes a problem with the reset function introduced on the new ST libs migration, it was preventing the user space reset used with the bootloader to function properly.
I think someone still likes to honor his avatar :)

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2241 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-17 14:16:58 +00:00
peabody124
4b4a66c2d7 PiOS/I2C: Lots of small changes. Added a few weird bus events that are
sometimes thrown, and made errors not lock it up by default.  It works for me,
but since this has historically been associated with lots of lock ups please
check your systems carefully.

PiOS/I2C: Make the bus by default try to recover from errors instead of locking
up

PiOS/I2C: After a bus error and clocking all previous data create a STOP
condition to make sure bus is released (note, this also requires creating a
START condition first)

PiOS/I2C: If the same event hits the I2C bus twice in a row then disregard
second one, there is no situation where we should get the same event multiple
times that matters and this gets us out really quickly to catch the real
events.  I was seeing this with repeated 0x70084 which means byte transmitted.
This is related to STM32 bugs in the IRQ timings I believe.

PiOS/I2C: 1) Mask out some bits we don't care about in the event flags
2) Don't lock up if the give semaphore fails, although why it does is strange
3) Recover from bus failure through the "auto" state path instead of just
coding state

PiOS/I2C: Change the reset bus code to follow
http://www.analog.com/static/imported-files/application_notes/54305147357414AN686_0.pdf
(thanks for the reference Neontangerine).  Although this may actually NOT clear
the bus the first time through, subsequent bus errors should eventually clock
it out.  The up side is it is less likely to clock a bunch of 1s into an ESC
and make it run up.

PiOS/I2C: Some cleaned up code for getting a snippet of the history when
something strange happens

PiOS/I2C: Export logging information from I2C through a UAV object

PiOS/I2C: Improve the diagnostic information

PiOS/I2C: Need to handle the event 0x30084.  This seems to happen between a
byte transmitted and new byte started

PiOS/I2C: Handle the NACK condition by simply going to the stopping state.

PiOS/I2C: Add a new NACK state to handle sending the STOP signal after a NACK
following the STM documentation.  Other error conditions still are not dealt
with.

PiOS/I2C: Should handle the NACK condition from all the write cases.  Need to
think about read cases

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2239 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-17 07:01:58 +00:00
peabody124
36ea75bc0d Flight/HID: Change how the HID code handles the transmit buffer getting empty
and starting transmission again.  This should address the bootloader locking up
on verify.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2235 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-14 01:43:16 +00:00
peabody124
1086a6b567 Flight: Changes to STM library to work with our code. Basically all the
configuration structures are const which keeps them in flash instead of ram.
However the library needs to declare them const for the compiler to work.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2231 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-13 07:03:28 +00:00
peabody124
18858571ce Flight: Updated to the latest StdPeriph libraries
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2230 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-13 07:03:24 +00:00
pip
0cae6df8b0 Aligned fifo buffers to 32-bit for possible speed improvement.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2173 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-28 11:06:45 +00:00
pip
d4c24de556 Updated to use the new fifo_init function
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2172 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-28 11:00:20 +00:00
peabody124
cfbdad5e0d Flight/USB_HID: Change to deal with buffer filling up when GCS not ACK'ing the
usb transmissions.  Clear TX buffer after any NAK.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2147 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-23 19:29:10 +00:00
peabody124
e89911bb8a OP-203 PIOS_USART: Don't disable interrupts for receive buffer since
only one receive task.  This is less generally safe but decreases the
frequency of resets in our current configuration

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2144 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-23 17:13:49 +00:00
peabody124
a454f06bf8 OP-203 PIOS_UART: Tweaked the way the interrupts are reenabled to get comms
stable again

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2143 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-23 17:13:48 +00:00
peabody124
300a3bc8ad OP-203 PIOS_USART: Get TX buffer using fifo_buffer
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2142 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-23 17:13:46 +00:00
peabody124
e3dd542609 OP-203 PIOS_USART: Make USART Rx code use fifo_buffer
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2141 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-23 17:13:44 +00:00
osnwt
ed49f7fc40 Prevent some compiler warnings treated as errors during RELEASE build (possible use of uninitialized variables - CodeSourcery under Windows build system). It may be done with some #pragma as well, but this way is more portable.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2132 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-21 13:09:05 +00:00
sambas
c74c9cc08e OP-73 Flight/PiOS: deinits started, still just for review
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2107 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-11 20:38:44 +00:00
sambas
f94dc41712 OP-73 Flight/PiOS: runtime RC input change, initial files just for review, not integrated to build yet
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2106 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-11 19:09:39 +00:00
peabody124
42a02e5662 Flight/HID: USB priority to 8 instead of 1. Probably Need to make the HID layer use a
similar driver format to the PIOS_USART system.  (p.s. are you happy now, PT?)

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2029 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-28 15:07:07 +00:00
peabody124
b9f74a86c3 OP-198 Flight/Libraries: Swap to using circular buffer code from Pip because it
supports thread safe write/read simultaneously

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2027 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-28 14:30:03 +00:00
peabody124
0bdaf4d0df OP-197 Flight/USB: Make non-blocking send return -2 instead of -1 for not enough space
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2026 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-28 14:30:00 +00:00
peabody124
acc6df4c2d Flight/USB_HID: Make the userspace command wait until not in interrupt before
running and block the interrupts while modifying the buffers

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2003 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-24 01:35:30 +00:00
peabody124
cd04845c3d Flight/HID: NAK instead of stall USB bus (former was mistake) and change
polling time to 4 ms

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1996 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-20 05:21:25 +00:00
dankers
4ed3359f6f Comment was misleading.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1992 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-19 17:25:07 +00:00
les
498f3d0fa6 PIOS SPI: Added a function to detect if the channel is busy
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1829 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-01 16:52:20 +00:00
sambas
2d90a80e22 Flight/PiOS: this patch makes dosfs work with both MBR and VBR formats. Backup your SD files in case this messes something!! Testing needed.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1798 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-29 16:29:38 +00:00
kokomojoe
6f1f990d85 OP-21 AHRS/Bootloader - Moved start of user code to 0x08002000. Must be used with latest AHRS Bootloader compiled with DEBUG=OFF.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1788 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-28 02:21:48 +00:00
peabody124
3c021c09d9 Flight/PiOS: Whitespace changes
find ./flight/PiOS/inc/ \! \( -name '*~' -a -prune \) -type f    | xargs -I{}
bash -c 'echo {}; dos2unix {}; gnuindent -npro -kr -i8 -ts8 -sob -ss -ncs -cp1
-il0 -hnl -l150 {};'

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1777 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-27 07:28:45 +00:00
sambas
24840b461d OP-22 Flight/PiOS: added failsafe and recovery "watchdog" timer
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1697 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-20 18:00:31 +00:00
zedamota
3ba6372dc4 OP-21/Flight Bootloader - Clean up and linker files for the AHRS
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1691 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-19 18:27:53 +00:00
peabody124
a6ca5b82e7 OP-155 Flight/HID: Make the HID stall when buffer full. Not sure the consequences on ground (i.e. if it handles the stall correctly)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1665 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-16 20:23:02 +00:00
peabody124
110c46216e OP-155 Flight: Increase the pios_com buffer size to support these larger objects. If this gets worse and we don't want to use as much OP memory we can make it stall the USB bus when the buffer is full.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1657 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-16 05:57:03 +00:00