This allows the spektrum and sbus receiver drivers to bind
directly to the usart layer using a properly exported API
rather than overriding the interrupt handler.
Bytes are now pushed directly from the usart layer into the
com layer without any buffering. The com layer performs all
of the buffering.
A further benefit from this approach is that we can put all
blocking/non-blocking behaviour into the COM layer and not
in the underlying drivers.
Misc related changes:
- Remove obsolete .handler field from irq configs
- Adapt all users of PIOS_COM_* functions to new API
- Fixup callers of PIOS_USB_HID_Init()
firmware include and delete all the extra foss-jtag config files. There is now
a legacy file for the revA board a second for AHRS that changes the port
This file is exactly the same used in the video published on the wiki
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3159 ebee16cc-31ac-478f-84a7-5cbb03baadba
Stabilization, carries the desired rate or attitude as well as a flag on how to
intepret it.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2930 ebee16cc-31ac-478f-84a7-5cbb03baadba
breaks CC. This should be done by the GPS alarm being set only when
appropriate (i.e. by AHRS on OP when needed) and not by the GPS module.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2824 ebee16cc-31ac-478f-84a7-5cbb03baadba
Beginning of unifying the input types into PIOS_RECEIVER.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2568 ebee16cc-31ac-478f-84a7-5cbb03baadba
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
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
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
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
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
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
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
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
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
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
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
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
Eclipse Workspace:
- Made project in Eclipse workspace point to trunk/flight
- Re imported launch configurations from previous version
OpenOCD
- added "ft2232_device_desc "Dual RS232-HS"" back to jtag cfg files because windows didn't like it w/o it.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1305 ebee16cc-31ac-478f-84a7-5cbb03baadba
The gdb init files would previously reset the target immediately
when gdb started up. This is sometimes an unpleasant side-effect
of running gdb.
In order to connect to the target, use the new "connect" function.
To reset the target use "mon reset".
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1236 ebee16cc-31ac-478f-84a7-5cbb03baadba
1) floss-jtag.arhs.cfg
2) floss-jtag.openpilot.cfg
But the Eclipse project the "external tools configurations" for the OpenOCD Debug is looking for the "floss-jtag.cfg" file in the command line arguments. The added file "floss-jtag.cfg" is a simply a copy of "floss-jtag.openpilot.cfg". The .arhs.cfg doesn't play well by itself.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1129 ebee16cc-31ac-478f-84a7-5cbb03baadba
Split the floss-jtag.cfg file into separate versions
for OP and AHRS.
Push AHRS onto non-default ports for gdb, tcl and
telnet.
Update the AHRS gdb setup script to point at the new
gdb port.
Add (commented out) example sytax to support distinguishing
between multiple floss-jtag boards that don't have serial
numbers. Uses the usb bus address of each device as the
selector. See this patch posted to the openocd mailing list
for how to add this functionality to openocd:
http://lists.berlios.de/pipermail/openocd-development/2010-June/015785.html
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@755 ebee16cc-31ac-478f-84a7-5cbb03baadba
This fixes the gdb stepi command to allow the M3 core to make
forward progress even when interrupts are pending. M3 Core interrupts
are masked/unmasked in pre and post command hooks.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@636 ebee16cc-31ac-478f-84a7-5cbb03baadba
The gdb commands step, next and finish on the M3 core would
never make forward progress since there is almost always an
interrupt pending. This is a known problem on the M3, and is
fixed by adding pre and post command hooks which mask and unmask
all ISRs on the M3 core.
Step, next and finish now work as expected, but care should be
taken when using these commands across any part of the code that
actually _needs_ the interrupts in order to make forward progress.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@622 ebee16cc-31ac-478f-84a7-5cbb03baadba