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

503 Commits

Author SHA1 Message Date
pip
b3d1c1f822 Added a return code test when calling WMM_GetMagVector() function. If returned code is error then don't set home location.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2382 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-11 11:15:27 +00:00
peabody124
5bcdfd6edd OP-239 OP-210 GPS memory usage: Pip catching the memory on the stack in the WMM
means this task only needs 800 bytes (of which only 120 is for the WMM).  Free
heap is now 9k.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2376 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-10 21:31:31 +00:00
peabody124
2fee1781ec OP-239 OP-210 HomeLocation: This was causing resets on the board due to not
enough memory.  Increase task memory a little.  I'm not sure that it's possible
to make the WMM memory usage less.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2372 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-10 18:45:16 +00:00
peabody124
3abcfc9608 OP-251 UAVObject/WatchdogStatus: Sorry forgot files earlier for monitoring what
triggered previous watchdog resets

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2369 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-10 05:42:57 +00:00
peabody124
bbbd9a10e3 OP-14 I2C Diagnostics: Improve the logging so that the events going into FSM
are logged, and separately the erirq and evirq logs are exported

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2368 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-10 05:42:53 +00:00
peabody124
aae4d113f5 OP-237 Actuator: Woops, typo
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2367 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-10 01:13:55 +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
vassilis
1e78cc7a30 Flight/FlightPlan: First release of flight plan scripting. The scripting engine is based on the PyMite Python VM. The released code is able to execute a simple python script on the target. However it is currently disabled from the makefile due to a few issues with more complex scripts. When the library is enabled in the makefile a python interpreter will be needed to compile the firmware since some intermediate code is generated by PyMite.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2364 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-09 22:36:15 +00:00
peabody124
e393000c34 OP-238 PIOS/SPI: Decrease pin clock rate from 50 to 10 Mhz. Since data at
1.125 MHz this should slow down the slew rates

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2361 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-09 20:49:46 +00:00
peabody124
24c4e92b12 OP-176 FreeRTOS task priorities a bit more sensible
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2357 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-09 20:49:33 +00:00
peabody124
85b7619617 OP-176 OP-238 Flight/IRQ and DMA: Increased the priority of the AHRS DMA
transfer, seems to reduce CRC errors

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2356 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-09 20:49:29 +00:00
peabody124
0f07d7f671 OP-240 OP-176 Flight: Setting the priority group back to 4 (anything higher
priority preempts) and adjusting the priorities around to be more sensible.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2355 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-09 20:49:26 +00:00
vassilis
b851c11f53 Flight/Stack sizes: Reduced task stack sizes to free-up memory in preparation of the scripting release. If the firmware is unstable there might be a possible stack overflow, test carefully!
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2350 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-09 00:03:19 +00:00
vassilis
407e660c97 Flight/TaskMonitor: Create TaskMonitor library, used to monitor the remaining task size of all running tasks.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2349 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-08 23:43:34 +00:00
peabody124
d8022a320d OP-238 PiOS/USB: Fix for problem Ed's being see where being plugged into usb
but not having telemetry causes a reset.  If the buffer got full enough it
would never start to transmit again.

Note: also making Telemetry non-blocking

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2346 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-08 08:05:02 +00:00
cwabbott
050ade4899 PiOS.win32: UAVObject changes, and double the timer tick length to accommodate the MMCSS-set timer tick and be more in line with PiOS.posix.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2341 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-05 22:47:47 +00:00
pip
75793a1687 Now using down-sampling on the baro temperature & pressure readings.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2338 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-05 12:19:49 +00:00
pip
572284966d Forgot to add "#ifdef ALT_PRES_MAF" into init code.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2337 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-05 11:28:04 +00:00
pip
cb8e9ef07b Added a moving-average-filter to the pressure reading, and increased BMP085 oversampling from 2 to 3
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2336 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-05 11:26:47 +00:00
peabody124
0e7661539e OP-238 AHRS Comms: Bring down clock rate of comms to AHRS to 2.25 MHz. Decrease
to only transmitting one object per transmission too to keep size down.
Also move to using the driver structure so the paramter is in a clear place.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2333 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-05 10:34:42 +00:00
peabody124
3e9ee37c73 Flight/ManualControl: Require the roll signal to only go to 0.90 to arm and
disarm

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2332 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-05 10:34:39 +00:00
corvus
a59d08b7af AHRS: Support for Linear Temperature Compensation Factors for Gyroscope X,Y,Z
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2327 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-04 00:54:31 +00:00
andrew
af77839747 OP-84
Battery module for Power Sensor version 2
This is the first checkin of code for the new sensor board.
This has been tested for Voltage calibration bit not Current yet.
This will set and clear system alarms appropriately.


git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2323 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-03 01:23:04 +00:00
corvus
c01676eed2 sim_posix: Makefile: fixed line ending - and added missing UAVObject
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2314 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-31 19:31:55 +00:00
sambas
0b2a0884ae OP-22 Flight/PiOS: Spektrum improvements, removed my zero throttle glitch
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2306 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-28 18:37:36 +00:00
andrew
c396279a37 Preparing Battery module for Power Sensor version 2
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2304 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-28 05:46:14 +00:00
andrew
eda227ec8b Added BatterySettings UAVObject in preparation for updates to PowerSensor code.
As this changes UAVObjects both flight and GCS software will need to be recompiled to stay in sync.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2303 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-28 05:13:19 +00:00
andrew
76be2b991b Update to FlightBatteryState UAVObject in preparation for updates to PowerSensor code.
As this changes UAVObjects both flight and GCS software will need to be recompiled to stay in sync.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2302 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-28 04:28:39 +00:00
andrew
2f38fe2269 Updated Alarms.c Modified flight alarm code to NOT set SystemAlarms to an "Uninitialised" value on startup.
This allows the UAVObjectGenerator generated code to set the default values.


git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2301 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-28 04:19:41 +00:00
andrew
bdb2982ca5 Added alarm processing for GPS module.
Error when GPS disconnected
  OK when >=7 satellites and PDOP <3.5
  Warning when only 3Dfix
  Critical otherwise

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2297 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-27 19:59:43 +00:00
andrew
e7e0f6740b Modified flight alarm code to set SystemAlarms to an "Uninitialised" value on startup.
This means that any defined alarms that don't have their flight module compiled in will show uninitialised rather than OK

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2295 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-27 07:30:36 +00:00
andrew
39cb30d56f Update to SystemAlarms UAVObject.
Added:
Battery
Flight Time
I2C
GPS
Also added new alarm state of "Uninitialised"

no code to set these alarms yet.

As this changes UAVObjects both flight and GCS software will need to be recompiled to stay in sync.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2294 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-27 07:25:52 +00:00
pip
d072c30ba1 Settings additions.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2274 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-22 22:16:44 +00:00
cwabbott
7715a6d6cd PiOS.win32: Add MMCSS support for Vista onward, and smarter priority boosting to XP. Also, add the Actuator module and the fake pios_servo.c. If you run this using Windows 7 or Vista, then you need to run OpenPilot.exe as administrator once to set up the registry.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2270 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-22 14:47:42 +00:00
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
corvus
1aa6a206db Sim_Posix: Updated Makefile to include some recently changed/new UAVObjects
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2253 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-19 11:29:24 +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
pip
e84b222272 PipX modem settings update .. note that they do not yet function.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2248 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-18 13:54:35 +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
pip
9ceda82fba Updated UAVObjects
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2227 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-12 18:26:51 +00:00
pip
d5f6504aa2 Updated UAVObjects
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2224 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-12 18:16:24 +00:00
pip
b4e4d4ed5e Adding PipX modem settings/status UAVObjects
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2219 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-11 10:56:42 +00:00
pip
8b2e1c32d7 Adding PipX modem settings/status UAVObjects
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2218 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-11 10:56:33 +00:00