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

288 Commits

Author SHA1 Message Date
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
zedamota
d57441e8f4 OP-21/Bootloader - forgot to commit this too..sorry (check last commit)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2137 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-21 22:58:14 +00:00
zedamota
98b0f406dc OP-21/Bootloader - fixes GPS connected issues, enhances timings problems, further work on serial support
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2136 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-21 19:37:40 +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
kokomojoe
2fe266650f OP-185 Flight - support files for Firmware IAP object
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1891 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-06 02:06:13 +00:00
kokomojoe
20c6e2292a OP-185 Flight helper functions for the firmware IAP object. Allows setting/clearing of back-up registers
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1890 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-06 02:02:37 +00:00
peabody124
ea3fb03c7f Flight/AHRS Communications: Switch to Les' very nice UAVObject communication
scheme

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1835 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-02 02:17:18 +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
peabody124
77b68e5169 Flight/Guidance: Initial template for guidance module
Flight: Create PositionDesired (the active waypoint) UAVObject and make the FlightSituationActual no update since it not used.
Flight: New velocity desired object that passes information between the look computing the desired velocity and the PID loop to get it (updated at different rates)
UAVObjects/PositionActual: Remove unused GPS fields
UAVObjects/PositionActual VelocityActual: Split the velocity into a separate object.  ALso make sure all the information telemetered around is in cm to avoid using floats.
UAVObject/GuidanceSettings: New guidance settings object for the guidance module
Flight/Posix: Add the new objects to the Posix sim
Flight/Guidance: Computes a desired velocity based on position error than runs a PID loop to control roll and pitch to achieve that velocity.  All distances are in cm, and updated the PositionActual fields to reflect this and use int32.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1760 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-26 03:06:27 +00:00
peabody124
a01783b2a8 OP-140 AHRS: Explicilty deal with if it is initialized or not, use that to
determine retransmitting calibration, home location and such.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1755 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-25 21:05:38 +00:00
peabody124
9b28f2d72c OP-167 OP-157 AHRS/Calibration: Added mag scale and really cleaned up calibration.
Calibration should take less time now too (using second moments to estimate
variance in one pass).  Now need to change to multiple messages to get the
calibration in to keep the request message size minimal.  Also currently
running sensor calibrate doesn't store the gyro bias so if you want to use this
you'll have to tweak it manually.  I'll fix that step tomorrow.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1741 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-25 09:20:38 +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
87dc0908ce OP-21/Flight Bootloader - Bug fix
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1695 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-20 16:29:34 +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
zedamota
c9752a6a3a OP-21/Flight Bootloader - some changes for the bootloader to work
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1682 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-18 23:11:42 +00:00
peabody124
8e0c5136c0 AHRS/Comms: Make the polling delay 1ms instead of 20ms to make sure if a message isn't ready we don't pause for a long time.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1673 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-17 18:12:25 +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
zedamota
e8d6e7c557 Flight - Centralized board specific files, BL and User FW uses the same board definitions, no need to have 2.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1663 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-16 19:19:38 +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
peabody124
885c966e53 AHRS: Added a tracker for number of ADC updates the EKF misses. Also updated the Telemetry autogenerated files to accomodate the 11500 baud rate.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1652 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-16 02:59:00 +00:00
peabody124
19e80da928 AHRS: Update UAVObject with information about AHRS rate
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1650 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-16 01:54:21 +00:00
zedamota
3e89e388fa OP-21/Flight Bootloader
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1643 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 17:09:27 +00:00
zedamota
c72a5b1cfe OP-21/Flight Bootloader
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1642 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 17:08:24 +00:00
zedamota
f972b78bfb OP-21/Flight Bootloader
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1641 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 17:07:43 +00:00
pip
89fb0b8582 Made pios_hmc5843_data_ready volatile (accessed by both interrupts and main exec loop).
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1638 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 17:00:36 +00:00
stac
55d90970ed hmc5843: hide internal #defines and functions
Way too much was being exposed in the API for the
HMC5843.  This commit properly hides internal
details of the driver.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1629 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:21:04 +00:00
stac
0e7a801e9e hmc5843: Add support for DRDY signal from magnetometer
The DRDY signal from the magnetometer is connected to PB8
on the STM32.  This pin is now configured as an external
interrupt and is now used to signal when new data is
available from the magnetometer.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1628 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:21:02 +00:00
stac
4ac001553d hmc5843: convert line endings from CRLF to LF
No functional changes.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1627 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:21:00 +00:00
stac
88e73906d0 i2c: Add recovery code for i2c bus errors
I2C bus errors are now recoverable.  The bus is properly reset
and an error indication is now provided to the caller whenever
a bus error occurs during processing of the transaction list.

For now, the users of the I2C layer just retry infinitely on
failure.  The BMP085 and HMC5843 code should be changed to
report errors to its callers to allow a more sensible retry
strategy.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1625 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:20:57 +00:00
stac
0122394481 i2c: consolidate handling of AUTO transitions
AUTO transitions in the FSM are now handled immediately
after processing each newly injected event rather than only
at the end of the EV ISR.

This consolidation allows the upcoming addition of event
injection from both the EV and ER ISR contexts.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1624 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:20:56 +00:00
stac
7d5463e5e6 i2c: Move polling for bus stopped from ISR to task/mainloop
Occasionally, the I2C driver races with the STM32 I2C peripheral
at the end of a bus cycle.  This leaves the bus in an errored
state and the stop condition is not properly asserted on the bus.

The polling for the stopped condition was previously implemented
in ISR context since it was expected to be nearly instananeous.
In the error condition, however, the stop condition will never
happen.  The polling for this case is now done by the initiating
task (or mainloop on the AHRS) to prevent the timeout condition
from triggering the watchdog.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1623 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:20:55 +00:00
stac
65ad2caf8a i2c: Make transaction initiator available in txn list
The info field in the pios_i2c_txn list can now be used
to provide a const string which describes the context
for this transaction.

This is very helpful when diagnosing an error that occurs
somewhere in the middle of the I2C FSM since the FSM runs
primarily in the ISR where the original context for the
transactions is no longer available in the traceback.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1622 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:20:53 +00:00
stac
85c60479c1 i2c: rename FSM faulted state
Differentiate the _FSM_ faulted from the (soon to
exist _BUS_ faulted state.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1621 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:20:52 +00:00
pip
cc3860daaf Added 'uint32_t PIOS_SYS_getCPUFlashSize(void)' into pios_sys.c/h files.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1616 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-14 09:18:55 +00:00
pip
8bfaa997d3 made curr_state 'volatile' in pios_i2c_priv.h to prevernt compiler optimization lockup.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1611 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-13 20:52:56 +00:00
zedamota
66560786f4 Flight - #ifdefs to make it work with both normal and bootloader packet formats.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1609 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-13 17:08:52 +00:00
zedamota
257b4d2c95 flight - BL AHRS Comms - fixes to make it compile, not tested yet.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1601 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 21:08:43 +00:00
pip
d0b8a9755d Added USB_LED_ON/USB_LED_OFF and checks to see if they are defined to the PIOS_USB_HID_ChangeConnectionState function ..
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1596 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 10:47:20 +00:00
pip
9fca16db41 Added an RTOS detection is 2 places because I'm using this file on the modem (without an RTOS). #if defined(PIOS_INCLUDE_FREERTOS) ...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1595 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 10:33:45 +00:00