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

264 Commits

Author SHA1 Message Date
edouard
d8edab8371 Added a (fake) pios_servo module in PiOS.posix, this makes it possible to compile the Actuator module and see servo output values, or at least
what they would be on a real board. Also fixed a typo in stabilization.c which made me lose time when trying to understand the code...




git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2260 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-20 16:38:17 +00:00
osnwt
801568269c 2251 rev changes reverted. Let someone change UAVObjects to provide calibrated altitude and/or offset to HomeLocation and/or take off location (which can be quite different including elevation). But please do not forget that many of users do not have the GCS with Internet at field and/or do not have sufficient weather/baro/altitude condition info for their country. So the solution should provide also a way to 'drive-power-launch'.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2259 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-20 05:20:06 +00:00
osnwt
7d084aca49 Added power-up barometric altitude calibration. Height accuracy is not sufficient, for better results we may want some filtering and/or another sensor/ADC. But at least now the BaroAltitude.Altitude object provides meaningful data comparing to uncalibrated zero height.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2251 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-18 23:40:17 +00:00
cwabbott
0b985b2168 PiOS.win32: Various fixes to get it working again, added a sim_win32 option to the main makefile.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2249 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-18 18:41:37 +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
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
zedamota
c034a35d2c OP-21/Bootloader - Changes to the IAPObject. Implements MB and AHRS user mode IAPObject. Added user mode reset command to the CLI. To many changes to bootloading system to write here, a Wiki page will have to be writen.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2238 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-15 19:06:28 +00:00
edouard
4be34fdb0f Modified all channel naming internally to use Channel 1 to Channel 8, instead of the previous convention of Channel0 to Channel7.
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
2010-12-13 23:54:30 +00:00
peabody124
9250470c98 Guidance: In velocity control use maximum groundspeed to cap the velocity
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2229 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-13 07:03:04 +00:00
peabody124
fd10c6ffff Guidance: Small sign error
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2209 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-10 17:14:35 +00:00
peabody124
d218e18ded AHRS: Make arm timeout of 0 disable feature for planes. Don't want them arming
out.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2205 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-08 20:07:34 +00:00
pip
49e99ea180 Added more telemetry baudrate options
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2195 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-06 08:23:20 +00:00
peabody124
4e8c6588b6 OP-156 AHRS: Run the accel data through a fifo so it can output raw data faster
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
2010-12-04 17:34:29 +00:00
peabody124
e861bcb9d0 Flight/Guidance: Convert PositionPID mode to PositionPI + Velocity feedback.
Needs AHRS with accel_bias estimation to behave well.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2187 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-04 17:34:19 +00:00
peabody124
a04e33ccc6 OP-192 Flight/ManualControl: Add an ArmedTimeout field to the
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
2010-12-04 17:34:16 +00:00
peabody124
4f21bee0d7 OP-192 Flight/ManualControl: Correctly convert to ms in timeout code so system
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
2010-12-01 22:12:01 +00:00
andrew
c94c76ce40 Minor change to give back manual control to an axis when it is set to stabilization = None
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2165 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-27 04:03:37 +00:00
peabody124
d2b468d661 Flight/Stabilization: Need to either set or clear the alarm, but the way it was
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
2010-11-23 17:13:42 +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
peabody124
54aa09ce27 OP-163 Flight/Guidance: Take current position as desired position
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2111 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-12 16:57:16 +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
5850c1804d OP-199 Flight/Stabilization: Increment a counter in actuatorDesired whenever an
update takes longer than 15 ms

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2109 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-12 04:36:04 +00:00
peabody124
834eecfc1f OP-200 Flight/Watchdog: Have flag that is set from actuator, ahrs_comms, manual
and stabilization that is monitored by watchdog.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2078 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-05 14:28:21 +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
7bdd900409 Flight/Manual: Cleaner solution to deal with timer wraparound
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2069 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-04 02:30:51 +00:00
peabody124
1f87715719 OP-192 Flight/ManualControl: Add a timeout to the armed signal. Leaving throttle < 0
for 30 seconds disables it.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2068 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-04 02:30:49 +00:00
peabody124
c69c4157f1 Flight/Actuator: Add failsafe for when flying via GCS to disarm at
lost connection

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2067 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-04 02:30:47 +00:00
peabody124
34bd4b7524 OP-198 Flight/GPS: Remove dependency on buffer.c, also made the detection of start and
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
2010-10-30 18:15:52 +00:00
sambas
3f62776253 OP-97 flight/GPS: Few more fixes
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2028 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-28 14:58:39 +00:00
sambas
365a2a121a OP-97 flight/GPS: Few fixes
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2025 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-28 13:50:34 +00:00
sambas
3e462b1434 OP-97 flight/GPS: Disable speed threshold command for those who knows it's needed, check gpsTask->DISABLE_GPS_TRESHOLD
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2014 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-27 15:51:33 +00:00
sambas
f1ba558fa1 Flight/GPS: Some updates
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2011 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-27 10:39:38 +00:00
peabody124
a2e0cd2240 Stabilization: Dont make queue respond to both raw sensors and attitude because
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
2010-10-24 20:00:05 +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
ligi
523b6ad8f7 added hint on how to better distinguish FC/NC
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2001 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-22 12:36:47 +00:00
peabody124
098b2fd693 Flight/System: Double heart rate when system is armed. This is per request in
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
2010-10-20 05:31:24 +00:00
corvus
50574841bd Moved non primary Stabilization modules into Branches
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
2010-10-19 19:12:37 +00:00
corvus
8cb04a372f Stabilization: new stabilization variant based on les stabilization module, with several options for coordinate system transformation
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1990 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-18 14:46:45 +00:00
cwabbott
dff66607c7 More UAVObject fixes, stuff to get PiOS.win32 compiling again.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1962 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-16 12:15:47 +00:00
les
6d6ec37474 Manual control: Changed 'Position' stabilization mode to 'Attitude'
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1944 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-11 17:58:11 +00:00
peabody124
dc10998152 Flight/Stabilization: Make any throttle < 0 reset the pid integral windup
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1933 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-10 00:46:06 +00:00
peabody124
5f601bf5ab Flight/Guidance: Enable for any type of quad airframe
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1932 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-10 00:46:04 +00:00
peabody124
ea85e98d7a Flight/Stabilization: Move update time storage to before the set to make sure
it goes

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1922 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-08 15:38:28 +00:00
peabody124
4e6f100ae5 Flight: Swap to Les' code for main line
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1920 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-08 15:38:23 +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
les
7ddb0f6f80 Stabilization: Changed to new switch format. Both position and rate modes work.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1886 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-05 14:51:33 +00:00
les
1e26ca11ee Manual control: Added some extra room at throttle zero when detecting a faulty signal
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
2010-10-05 14:50:03 +00:00
les
b2c81aceee Actuator: Fixed motors not going to min throttle in failsafe.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1884 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-05 14:47:48 +00:00
peabody124
ba3ecada1d Flight/ManualControl: Implemented settings to change what the Mode switch does
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
2010-10-04 19:48:09 +00:00
peabody124
f03669733b Flight/Guidance: Merge back into one task because memory requirements of a task
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
2010-10-04 02:01:34 +00:00