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

991 Commits

Author SHA1 Message Date
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
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
zedamota
7f00e88321 OP-21/Bootloader - House cleaning only, shouldn't brake anything.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2250 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-18 20:41:13 +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
ac24d86f40 AHRS Makefile: PT accidentially turned on DEBUG=YES when checking in
FirmwareIAP to get me back for breaking Sys_Reset.  You got me! :)

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2246 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-18 08:56:12 +00:00
peabody124
f010502229 PiOS/I2C: Was throwing out repeated byte transmitted events but this is
required for longer sequences,  Need to deal with when it happens
inappropriately better.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2245 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-18 07:09:34 +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
zedamota
917f03121d Fixes a problem with the reset function introduced on the new ST libs migration, it was preventing the user space reset used with the bootloader to function properly.
I think someone still likes to honor his avatar :)

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2241 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-17 14:16:58 +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
peabody124
08e888ac8c Bootloader: Don't make it hang in bootloader by default. That's mean PT!
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2236 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-14 01:59:15 +00:00
peabody124
36ea75bc0d Flight/HID: Change how the HID code handles the transmit buffer getting empty
and starting transmission again.  This should address the bootloader locking up
on verify.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2235 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-14 01:43:16 +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
68c656a724 AHRS: Add back the old 13 state INS if wanted and also code for tracking accel
bias as gravity vector facing down (bad for planes) which is diabled by
default.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2232 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-13 15:15:50 +00:00
peabody124
1086a6b567 Flight: Changes to STM library to work with our code. Basically all the
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
2010-12-13 07:03:28 +00:00
peabody124
18858571ce Flight: Updated to the latest StdPeriph libraries
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2230 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-13 07:03:24 +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
peabody124
f30aa1d719 AHRS Comms: Send FirmwareIAP object to AHRS so that it can be remotely
rebooted.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2214 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-10 21:03:29 +00:00
zedamota
cc5a4c2bb9 OP-21/Bootloader - NOT FUNCTIONAL
Implements RS232(Telemetry) uploads using Kokomo's protocol.
This is a test version, the code will never timeout and jump to user space code.
If USB is connected on Power Up it will be used, if not RS232 will be used instead.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2211 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-10 19:11:29 +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
5e91f46633 Added more telemetry baudrate options
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2198 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-06 08:31:24 +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
e6a21977f1 OP-156 AHRS: Make the account for the fact the analog data is downsampled two
times for each EKF update

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2193 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-04 18:13:08 +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
45e3ed27a7 OP-156 AHRS_ADC: Make the ADC system use a callback to better separate ADC code
from the AHRS code (which will facilitate code integration with new INS) and
also will help set up a fifo queue for the downsampled data to allow gyro data
output from AHRS faster than EKF output.  Also decreased ADC interrupt priority
so the SPI comms don't drop out.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2190 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-04 17:34:27 +00:00
peabody124
6f1e7b4e41 AHRS: Add a configuration to export the sensor data either with or without INS
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
2010-12-04 17:34:25 +00:00
peabody124
81b2f88e75 AHRS: Swap to new code which tracks accel_bias and export the accelerometer
bias

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2188 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-04 17:34:22 +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
0679e8d472 AHRS: In indoor mode correct with a high variance 0 for position to keep it
bounded.  Velocity variance still comes from AHRSCalibration.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2186 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-04 17:34:18 +00:00