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
BEWARE: I have not flown my quad with this code, so please be careful, test, and report!
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2234 ebee16cc-31ac-478f-84a7-5cbb03baadba
than the ekf runs and also be more tolerant of timing jitter
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2191 ebee16cc-31ac-478f-84a7-5cbb03baadba
bias correction. This is useful for stabilization to get rid of the gyro bias.
Making it an option is important for calibration.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2189 ebee16cc-31ac-478f-84a7-5cbb03baadba
ManualControlSettings so that planes can disable the timeout
feature for gliding (holding roll on a plane not so good).
Note: This will require you to reconfigure your ManualControlSettings
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2185 ebee16cc-31ac-478f-84a7-5cbb03baadba
will automatically disarm after 30 seconds without motor. This behavior will
need to be parameterized for planes which might idle for a while.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2181 ebee16cc-31ac-478f-84a7-5cbb03baadba
indoor from the name since it's used for both indoor and outdoor mode now.
Increased default value to 0.4 to better reflect the GPS accuracy.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2156 ebee16cc-31ac-478f-84a7-5cbb03baadba
Changes in ahrs.c for new initialization and to fix issues with outdoor algorithm. The changes in ahrs.c are pretty messy, but committed mostly to get the code to Peabody for more extensive restructuring of ahrs.c.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2150 ebee16cc-31ac-478f-84a7-5cbb03baadba
before cleared at the end of each loop - including one after an alarm
Flight/Actuator: Similar change to make sure not having updates from
stabilization (i.e. no AHRS) doesn't trigger a watchdog reset
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2140 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
end characters occur while sentence coming in instead of reprocessing whole
sentence for each character
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2041 ebee16cc-31ac-478f-84a7-5cbb03baadba
by PipX modems. This is a change to UAVTalk so GCS and the hardware must all
be updated.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2016 ebee16cc-31ac-478f-84a7-5cbb03baadba
parallel for this update. Also removed comment for rawhid
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2012 ebee16cc-31ac-478f-84a7-5cbb03baadba
causes it to trigger most of the time every 1 ms which is consuming tons of
CPU. Also lower the failsafe timeout since its likely due to overloading the
event system and we don't want to delay 100 ms.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2005 ebee16cc-31ac-478f-84a7-5cbb03baadba
IRC, but suggestions are welcome. In the long run we probably need a sensible
way of embedding some information in the LED but it's not obvious to me. Also
could have done with callback - sue me. ;)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1997 ebee16cc-31ac-478f-84a7-5cbb03baadba
simple - outdated - won't compile
Experimental - outdated - won't compile
les - development version - not stable
les+corvus - development version - not stable
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1993 ebee16cc-31ac-478f-84a7-5cbb03baadba
uavobjectgenerator to support multiple fields (thanks Les!). Also
changed default scale on mag to +/-6g
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1899 ebee16cc-31ac-478f-84a7-5cbb03baadba
Before, moving your throttle trim slightly could cause ManualControl to think the receiver was not connected
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1885 ebee16cc-31ac-478f-84a7-5cbb03baadba
so it can also change parameters of Stabilization. Please check your aircraft
behavior with this patch, but default behavior should be unchanged.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1878 ebee16cc-31ac-478f-84a7-5cbb03baadba
exceed CPU requirements of PID. Also add add lesstabilization UAVObject to Makefile
to fix compile errors.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1870 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
yaw angle crosses the zero-360 mark, beware.
You can disable yaw stabilization by setting all PID gains to zero for yaw.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1828 ebee16cc-31ac-478f-84a7-5cbb03baadba
and removed the unused field from actuator settings (old setting time and all
the aircraft specific stuff).
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1820 ebee16cc-31ac-478f-84a7-5cbb03baadba
update since now drive by events. This means StabilizationSettings object
changing so write down your settings.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1819 ebee16cc-31ac-478f-84a7-5cbb03baadba
THIS MEANS YOU MUST RETUNE YOUR PID LOOP IF YOU'RE FLYING WITH IT
Alternatively divide Kd by 1000 and multiply Ki by 1000
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1782 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
determine retransmitting calibration, home location and such.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1755 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
The system settings UAVObject is updated, you will have to recompile your firmware. If you want to take a look and let me know, please do!
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1737 ebee16cc-31ac-478f-84a7-5cbb03baadba
Removing some Experimental and Incomplete Modules and their UAVObjects not suited for 1.0
- they will be moved into an experimental branch:
Navigation : experimental code only
FlightSituation: experimental code only
Guidance : preliminary draft - possibly to be replaced by peabody124 position hold code if finished in time.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1729 ebee16cc-31ac-478f-84a7-5cbb03baadba
Creating GuidanceModule together with PositionDesired UAVObject (as discussed),
so dschin and me can work on it :-)
Will compile and (on sim_posix) execute, but PID logic is yet untested and preliminary.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1722 ebee16cc-31ac-478f-84a7-5cbb03baadba
This is functionally the same as having a heading hold gyro in hardware.
Code is copied from the simple stabilisation routine and is a bit rough at the minute, but initial testing looks good.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1670 ebee16cc-31ac-478f-84a7-5cbb03baadba
The EOC EXTI interrupt configuration was incorrectly
pointing at GPIOG pin 8 rather than GPIOC pin 15.
This was preventing the EOC interrupt from working
properly.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1626 ebee16cc-31ac-478f-84a7-5cbb03baadba
Change from using vTaskDelay to using vTaskDelayUntil to
ensure that we're trying to stay periodic rather than
just waiting a fixed amount of time after each loop of
processing.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1580 ebee16cc-31ac-478f-84a7-5cbb03baadba
No functional changes.
The closing comment on some of the USB_HID related
ifdefs was outdated. Fixed.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1541 ebee16cc-31ac-478f-84a7-5cbb03baadba
The resultant error could range from -360º -> +360º
Since this is only used for Helicopters / multi rotors, and the aircraft can rotate in any direction, I added the modulo logic so that it is now from -180º -> +180º this should now take quickest path to correct the error.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1464 ebee16cc-31ac-478f-84a7-5cbb03baadba
The Wiki (http://wiki.openpilot.org/Unit_Standards) states this should be 0 - 360º
Made the code match the wiki.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1463 ebee16cc-31ac-478f-84a7-5cbb03baadba
This creates a new UAVObject called GPSSatellites to hold
information about which satellites the GPS receiver can see
and the quality of their signals.
NMEA GSV sentences are now parsed. The full set of GSV data
may be split across multiple GSV sentences, each containing
info for at most 4 satellites. Once an entire set of GSV
records has been collected, the GPSSatellites UAVObject is
updated.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1453 ebee16cc-31ac-478f-84a7-5cbb03baadba
Remove asserts on bad data, only assert on coding errors.
Remove unnecessary inline qualifier to reduce code size.
Handle more lat/lon precisions in conversion to fixed-point.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1452 ebee16cc-31ac-478f-84a7-5cbb03baadba
Change from spaces to <TAB> to match the formatting in
the template. No functional changes, just whitespace.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1451 ebee16cc-31ac-478f-84a7-5cbb03baadba
GPS module now updates GPSPosition UAVObject
rather than the PositionActual object. The
GPSPosition object is intended to be consumed
only by the AHRS. The AHRS will use this (and
other inputs) to compute a filtered version of
the position in the PositionActual object.
This commit will cause temporary breakage of the
GPS functionality in the GCS until the PositionActual
object is properly updated by the AHRS. Most of the
GCS should continue to use PositionActual. The only
exception to this might be any tool for specifically
visualizing the raw GPS state.
GPS.c is now only responsible for receiving a
complete NMEA sentence from the COM interface.
NMEA parsing is now factored out into NMEA.[ch]
which is where GPSPosition is now updated based
on the complete NMEA sentences obtained from the
GPS.
Latitude and Longitude are now encoded in a
fixed-point notation in units of degrees x 10^-7
to prevent truncation of precision due to encoding
into a float.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1431 ebee16cc-31ac-478f-84a7-5cbb03baadba
No functional changes. Whitespace/tab fixups only.
Use TRUE/FALSE instead of 1/0.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1430 ebee16cc-31ac-478f-84a7-5cbb03baadba
Since there are a lot of autogenerated changes the important ones are:
flight/OpenPilot/UAVObjects/inc/uavobjecttemplate.h - added description and define to make the ObjectReadOnly query
flight/OpenPilot/UAVObjects/uavobjecttemplate.c
flight/OpenPilot/UAVObjects/uavobjectmanager.c - added the UAVObjReadOnly query
ground/src/libs/uavobjgenerator/uavobjectparser.cpp - added parsing of description field
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1425 ebee16cc-31ac-478f-84a7-5cbb03baadba
This has throttle and pitch curves implemented and can be configured for many swashplate configurations.
This has flown a 450 clone (with training wheels) and the ccpm worked well.
Still need to neaten up some stuff and work out how to implement yaw stabilisation in manual mode.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1412 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
Adding settings for configuring CCPM mixing for Helicopters to ActuatorSettings and SystemSettings UAVObjects.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1402 ebee16cc-31ac-478f-84a7-5cbb03baadba
This object is not yet populated or used. This
will soon hold the raw position data from the GPS
receiver. PositionActual will be converted to
hold the computed position from the AHRS.
Contents of this object are still subject to change.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1355 ebee16cc-31ac-478f-84a7-5cbb03baadba
This is to align the object names to matches the UAVObject
architecture doc. No functional changes.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1351 ebee16cc-31ac-478f-84a7-5cbb03baadba