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

96 Commits

Author SHA1 Message Date
peabody124
99fcd089d4 OP-291 PIOS/Servo: Make the remapping of timers a part of the driver structure
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2569 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:51:48 +00:00
peabody124
da96ce15b9 OP-256 PIOS/PWM: Converting PWM input to use standard driver structure.
Beginning of unifying the input types into PIOS_RECEIVER.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2568 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:51:45 +00:00
peabody124
99f2f3c68b OP-291 CC Servo configuration: Gets S5 and S6 working
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2566 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:51:38 +00:00
stac
8223580783 jtag-revb: add eeprom config file
The floss-jtag-revb has an on-board EEPROM which can be used to
hold a serial number.  This greatly simplifies using OpenOCD
debug environments with more than one JTAG attached to the same
PC.

See the FLOSS JTAG revB section of this page for instructions on
how to configure the EEPROM on Linux:
  http://wiki.openpilot.org/display/Doc/Software+Development+on+Linux

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2540 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-23 08:06:13 +00:00
peabody124
2d9f7f32d1 OP-291 PiOS/Servo: Converting output to use driver system
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2499 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-21 03:40:21 +00:00
peabody124
18deba48c1 CC-6 PIOS/ADXL345: Helper functions for the ADXL345 chip. Need to add
semaphores for sharing the bus between the flash chip and this though.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2473 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-17 08:45:37 +00:00
peabody124
0259b6d1f1 OP-269 PIOS/ADC: First part of conversion to driver structures
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2444 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 02:45:39 +00:00
peabody124
d4460aa97f Deleting unused file from svn
Conflicts:

	flight/AHRS/ahrs_adc.c

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2442 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 02:45:31 +00:00
peabody124
33f3500e64 CC-3: New module for copter control
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2441 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 02:45:27 +00:00
sambas
f0b161f7b9 Updated my workspace files to support all boards known today
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2432 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-14 15:45:08 +00:00
peabody124
4528afe4de Update the makefile to allow compiling the PipX and XCode project
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2427 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-14 01:48:50 +00:00
peabody124
aa8d9eb178 OP-261 Magic Waypoint: Accel feedback for position hold
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2412 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-14 00:51:54 +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
7ccdb296ac AHRS: Add interface to get old dump_raw function working for Pip
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2305 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-28 17:48:45 +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
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
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
6ebc8ccd57 OP-163 Flight/Guidance: Add variations on position hold to try out. Only one will end
up in the final code.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2110 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-12 16:57:13 +00:00
peabody124
f950b9f6c0 Flight/ManualControl: Make it so the disarmed signal itself changes when GCS
lost.  Warning though: it takes ~5-10 seconds for the flight telemetry status
to go from connected so this solution still isn't great.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2070 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-04 02:30:53 +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
9944cdfcb0 Flight/RateDesired: UAVObject for monitoring the desired rate out of
stabilization for diagnostics

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2004 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-24 20:00:02 +00:00
sambas
0384e359ba My working eclipse workspace, atleast for windows
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1991 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-18 19:16:20 +00:00
pip
bd8ad90301 Added PipXtreme jtag cfg files.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1956 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-13 08:14:39 +00:00
peabody124
8308e4a4fe Whitespace change: get rid of CR
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1921 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-08 15:38:26 +00:00
peabody124
0c30101f54 AHRS: Made an object setting to allow the downsampling rate to be changed on the
fly (EKF rate up to a limit).  Also, now the algorithm selects if you are
indoor or outdoor as well as if you use a mag indoor (if you do set the z
variance higher than it calibrates to).

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1841 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-02 03:10:01 +00:00
peabody124
29b087703b Flight/AHRSComms: Decrease stack size, not needed to be that big. Also made
ActuatorDesired dT in ms like the uavobject indicates

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1839 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-02 02:17:32 +00:00
peabody124
c95b1e6117 Ground/UAVControl: Working joystick support although currently not configurable
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1794 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-29 03:59:03 +00:00
peabody124
a3ea9a5461 AHRS: Add a weak mag correction in indoor mode to remove gyro bias and try and
get a reliable heading

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1765 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-26 03:06:51 +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
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
peabody124
0875dc8442 AHRS: First pass refactoring the ADC code into another function. Still want to clean up a few constants make the downsampling go into a smaller circularbuffer nicely.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1614 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-14 07:03:34 +00:00
peabody124
dceb20b16d Flight: VTOLStatus object that returns the thrusts on all the engines
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1588 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 02:54:34 +00:00
peabody124
bba3b0c64a Flight: VTOLSetings object to contain the mixer settings for VTOL crafts
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1587 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-12 02:54:30 +00:00
peabody124
45e8131a30 Flight: Added ability to use additional TX inputs to tune attitude bias. Note this form of the calibration is temporary and will likely be replaced by a rotation matrix to deal with more general rotations.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1525 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-04 17:07:59 +00:00
peabody124
a406034ed9 OP-132 Flight/AHRS: Changed the heuristics regarding GPS quality and INSGPS updates. Now if satellites < 7 or PDOP > 3.5 it does not perform GPS updates. Professor is working on some code to fix parts of the covariance matrix. If indoor updates high a 0 position and velocity and high variance.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1515 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-04 02:19:00 +00:00
dschin
84d054c4ed gdb command file to enable debugging with interrupts in Eclipse
See http://forums.openpilot.org/topic/1671-debugging-with-interrupts-in-eclipse/
for details.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1511 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-03 13:10:04 +00:00
peabody124
a377bea862 Ground/CoordinateConversions: Found out from Dschin that rotation matrix inverse is rotation matrix transpose. Now should convert correctly from NED to ECEF. I will check tomorrow by frolicking around with a plane.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1494 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-01 03:12:06 +00:00
cwabbott
f55e9cf819 Fixed a slight problem with the .metadata folder, the flight project wasn't pointing to the correct folder again.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1462 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-29 23:16:19 +00:00
dankers
7a1353506e Just added my plugins dir to what was already there, no guarantees to fix things!
Might just make them worse!


git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1460 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-29 22:15:38 +00:00
peabody124
8128c3bbfa OP-118 AHRS: Added 6 point calibration routine to AHRS config widget. To use it, click "Cal Mode", then place the AHRS on each of 6 sides of a cube then click save position. Finally click compute to push the updated scale abd bias terms to the AHRS. Also fixed a bug in UAVObjectField that would not allow you to setDouble for extra fields.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1449 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-28 18:48:51 +00:00
peabody124
16361dea12 AHRS: Making AHRS populate the NED/Vel fields of PositionActual. May rename object to PositionVelocityActual. Also created a GPSTime object which is populated from the GPRMC command. Also added a GPZDA parsing command, but by default OP GPS doesn't send this command. Made the computation of the world magnetic model use the current time to set the magnetic vector. Note: currently if you set your home location and save it to SD, this will not recompute the vector over time. I'm not sure how sensitive this is.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1435 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-27 19:59:25 +00:00
peabody124
4ca10e92c7 OP-121 OP-122 Flight: Improved USB HID communication.
1. Added reenumeration function and call it on USB init (device will appear after reprogramming now)
  2. Moved buffer.c to general flight/Libraries location
  3. Removed the 62 byte transmission limitation by adding a transmission buffer
  4. Sped up USB communication by increasing endpoint polling frequency

Note, that the nonblocking and blocking USB send functions are not blocking entirely correcting.  The blocking calls the nonblocking, and the nonblocking blocks until the last chunk has started tranmission if it's a big transmission.  The buffering I added would generalize to non-blocking nicely, but would require using the EP1(IN) callback to handle most of the tranmission.  This creates a lot of issues if one function is pushing data onto the buffer and the interrupt is sending.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1403 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-25 05:32:52 +00:00
peabody124
e94d3d3846 AHRS/Flight: Allow selecting simple algorithm as well as INSGPS
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1384 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-23 03:51:08 +00:00
peabody124
bd8fffe4d0 AHRS/Flight: Renamed AttitudeSettings to AhrsSettings to make it more intuitive. Added the ability to change the algorithm from GCS.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1383 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-23 03:39:13 +00:00
peabody124
5662d85c4e OP-120 AHRS: Tightened up the communication protocol so it runs more quickly. Looks ok in gdb but GCS not crashing right now (rendering error) so I can't test it properly.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1366 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-22 00:21:54 +00:00
peabody124
bb79ba66fa OP-119 AHRS: Converted the big data structures for the WMM calculation to be allocated on the stack, which forced a dependency on FreeRTOS :-( but keeps things on the heap. Also changed the HomeLocation object to include a Set field. When this is false, OP will try and update it whenever it gets a 3D fix. If it is saved to disk with this field as true, then it won't need to get a lock to send the magnetic flux vector to the AHRS.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1346 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 08:35:44 +00:00
peabody124
ef0b307353 [OP-119] Flight/AHRS: Created a HomeLocation object which is updated when the GPS gets an initial 3D fix and populated with the information to convert from LLA from the GPS to NED reference frame. Also added a message for passing the MagneticNorth vector to the AHRS and removed that computation from AHRS.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1337 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-19 20:38:27 +00:00
peabody124
3c4def13cc AHRS: Added message to pass GPS information into AHRS from OP. This is then converted
into NED reference frame and used in the INSGPS algorithm, although currently this
information isn't propagated back to OP.  Data structures related to the GPS position
into the algorithm and the position estimate out will likely be in flux.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1334 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-19 05:18:34 +00:00
peabody124
cfd20922cd AHRS: Added the filtered data to the attitude raw object. Even though this seems like an oxymoron it's still raw to the EKF algorithm, and nice to see the real values after filtering to make sure nothing weird is going on. However, if people don't like this I'm open to suggestions/patches. I'd maybe suggest the whole attituderaw object be converted to ahrsraw anyway since it's more like that (eg. none of the values are actually attitude estimates).
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1325 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-18 14:54:24 +00:00