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

1028 Commits

Author SHA1 Message Date
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
5734e1f437 OP-176 PIOS/ADC: Decrease the priority of the ADC DMA/IRQ
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2360 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-09 20:49:43 +00:00
peabody124
0175e25ddf Flight/ADC: If there is a DMA error for the ADC transfer dont copy those values
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2359 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-09 20:49:39 +00:00
peabody124
148ea6fdc1 Flight: Make PWM outputs default to 0 us to avoid either pushing servos to
exteremes or running up motors

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2358 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-09 20:49:35 +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
peabody124
ccc8bc089b OP-235 AHRS: Not sending the out of range values to the mainboard was blocking
calibration.  Now only don't send them to the EKF.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2342 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-06 16:44:40 +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
6eae425644 OP-235 AHRS: Because of range checking at initialization the EKF can be blocked
(which is good) but that stops the comms polling.  This makes it happen
ocassionally but not too much.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2335 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-05 10:34:48 +00:00
peabody124
77d798071e OP-235 AHRS: Check the downsampled data for either being ridiculously out of
range of NaN.  This would reflect a race condition probably from the SPI
interaction.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2334 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-05 10:34:45 +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
pip
4a91f20277 Turn AHRS orange LED on at bootup (to try and spot possible bootup hangs).
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2331 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-05 09:15:37 +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
edouard
3bad347386 Reverted a change which caused resets on the MB under certain conditions. Should be back to normal now.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2311 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-30 19:24:57 +00:00
pip
c8a1a6771c Added "AHRS_ADC_GetOverSampling" function
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2308 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-29 10:34:48 +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
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
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
peabody124
2b0c75e46d AHRS: Fix LED flashing light
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2300 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-28 02:10:52 +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
pip
26650724e4 Fixed coding error on line 317 .. changed while (xxx & xxxx) to while (xxx && xxxx)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2296 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-27 09:48:11 +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
peabody124
c364f45fb7 AHRS: If using mags then don't initialize until get a good mag update within
250 ms of init call (mag works at 10 Hz).

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2289 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-26 18:59:32 +00:00
peabody124
343b4095a3 Flight/WMM: Get rid of date structure and keep it on stack. Also don't need
error message for embedded stuff.

Note: this was only tested on PC although I'm fairly confident about it.
Please let me know about any errors.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2285 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-24 21:57:15 +00:00
peabody124
b8476bea20 WMM: Memory reduction, variables computes from flash constants on fly. This
will run slower but greatly reduce the memory footprint (360 floats less).

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2284 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-24 21:57:12 +00:00
peabody124
35bc1e7d9b Flight/AHRS: Make the mag raw data always update regardless of home location
settings but only be used when home location is valid.  Also discard any mag
data that is all zeros although we shouldn't see this.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2283 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-24 20:21:22 +00:00
peabody124
314a2fcf00 flight/AHRS: Make the 13 state INS default again, the accel bias drift can be a
little aggressive.  Also increased the drift rate of the gyro bias per Sambas'
testing (thanks) although not to the levels required for flying through 40 deg
C transitions.

Made the dump_ekf function handle both numbers of states

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2282 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-24 19:38:54 +00:00
peabody124
7ab6dfeeba PiOS/USB_HID: Lower priority of USB interrupt
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2280 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-24 17:16:07 +00:00
peabody124
1142b1fb1e PiOS/USB_HID: No longer clear buffer after getting a NAK. This was required
before because if transmission got NAK then sending would stop.  Now the next
time data is added to the buffer a new send will be attempted.

fifoBuf: in clearData just set the read pointer to the write pointer.  This is
safer for multiple people accessing it assuming the reader will be clearing it.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2279 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-24 17:16:04 +00:00
peabody124
ba8351f60a PiOS/USB_HID: When using FreeRTOS use a sempahore to stop multiple tasks
pushing data to the transmit buffer

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2278 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-24 17:15:59 +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
zedamota
14ef24a3de OP-21/Bootloader - Maximize flash space available for user code. Bring back delay on HID send (board->pc) it still hangs when blasted with data. AHRS is now Readable.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2263 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-21 17:25:24 +00:00