1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00
Commit Graph

144 Commits

Author SHA1 Message Date
stac
d02a3325d9 altitude: Add altitude module which reads BMP085
This module reads from the BMP085 pressure sensor.  It periodically
updates the pressure (kPa) and temperature (C) as well as the
calculated altitude (m).

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@640 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-19 04:55:56 +00:00
sambas
b7601c9765 OP-25 Flight/GPS: changes for OPGPS
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@639 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-18 12:49:47 +00:00
sambas
0e81831399 OP-25 Flight/GPS: port speed corrected for OPGPS
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@638 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-18 11:42:57 +00:00
stac
514d46f5b6 freertos: fix RTOS API calls from interrupt level
FreeRTOS has a strict requirement that even interrupt-safe API calls (ie.
those ending in "FromISR") can only be called from ISRs that are at lesser
or equal priorities to configMAX_SYSCALL_INTERRUPT_PRIORITY.  See the
"configKERNEL_INTERRUPT_PRIORITY and configMAX_SYSCALL_INTERRUPT_PRIORITY"
section at:
  http://www.freertos.org/a00110.html

The interrupt numbers used on the Cortex-M3 CPU has a somewhat backward
representation of the interrupt numbers so 255 = lowest priority and
0 = highest priority.

The calculation is further complicated by the STM32 implementation only using
the upper 4 bits of the priority value.  Only 0x00, 0x10, 0x20, ..., 0xE0, 0xF0
represent useful interrupt priorities.

FreeRTOS requires that MAX_SYSCALL and KERNEL interrupt priorities are expressed
as raw unshifted 8-bit values to be programmed directly into the BASEPRI register.

The priority values passed to the NVIC initialization, however, are expected
to be 4-bit values and are shifted up by 4 within NVIC_Init() for you.

The end result is that we need this arrangement:

[highest priority]
   NVIC_0 (Non-maskable-interrupt)
   NVIC_1
   NVIC_2
[Must NOT call FreeRTOS APIs above here]
   configMAX_SYSCALL_INTERRUPT_PRIORITY (now at 48 = 0x30 = NVIC_3)
   PIOS_IRQ_PRIO_HIGHEST (cur. NVIC_4)
   PIOS_IRQ_PRIO_HIGH    (cur. NVIC_5)
   PIOS_IRQ_PRIO_MID     (cur. NVIC_8)
   PIOS_IRQ_PRIO_LOW     (cur. NVIC_12)
   configKERNEL_INTERRUPT_PRIORITY (240 = 0xF0 = NVIC_15)
[lowest priority]

The previous config had configMAX_SYSCALL_INTERRUPT_PRIORITY set at
191 (0xBF) which is effectively NVIC_11.  This was allowing all of
the MID, HIGH and HIGHEST interrupt handlers to preempt the OS in
its critical sections.  Since some of these ISRs were calling
FreeRTOS APIs, this would result in corrupting internal data structures
within the OS.

It should be ok to move the configKERNEL_INTERRUPT_PRIORITY to a higher
priority as long as it is less than configMAX_SYSCALL_INTERRUPT_PRIORITY.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@637 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-18 04:50:38 +00:00
vassilis
6b6740109e OP-32 Flight Initial release of Actuator (ServoOut) and ManualControl (ServoIn) modules, still work in progress (not fully tested).
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@632 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-17 01:58:38 +00:00
FredericG
3f79770f7f More debug state info
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@631 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-16 18:07:41 +00:00
sambas
66fa56a1da OP-22 Flight/PiOS: Spektrum simple decoder works, getting seven working channels with my DX7 tx
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@630 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-16 10:04:07 +00:00
sambas
76cd72915d OP-22 Flight/PiOS: first tests done with spektrum satellite, I can read binded receiver serial stream
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@629 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-16 08:35:38 +00:00
stac
56f1e8b547 uavobjects: Move generated python classes
Moved the generated python classes from the flight directory to the
ground directory since they are only used on the host, not the
embedded targets.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@628 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-16 03:05:10 +00:00
sambas
26aecf720d OP-22 Flight/PiOS: Spektrum satellite protocol started
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@626 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-15 18:22:03 +00:00
stac
e05f4cf068 uavobjects: Added support for generating python classes
The uavobjectgenerator can now generate python classes for each
UAVObject definition.  This is useful for writing simple test
applications in python that can exercise the UAVObject handling
code on the embedded boards.

This is a work in progress so the structure of the generated
classes is likely to change.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@623 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-14 04:32:30 +00:00
gussy
ff73ab5a80 More updates to cross-target compatibility.
Added PIOS_I2C into AHRS code.
Added PIOS_HMC5843 Module.




git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@617 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-12 08:18:49 +00:00
gussy
8f3c2dbafb Changes to PiOS to be compatible with the AHRS.
Updates to AHRS code.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@615 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-11 13:36:13 +00:00
sambas
1bb32e78f1 Flight/telemetry: Missed one 38400 relates stuff
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@614 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-08 16:47:12 +00:00
sambas
9922df3524 Added 38400 for my XBEE
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@613 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-08 16:22:41 +00:00
vassilis
6dfd8caffb OP-4 Flight/Telemetry Add connection timeout detection
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@608 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-08 04:11:03 +00:00
vassilis
a31215293d Flight\Telemetry Implement telemetry settings object, added functions for changing the baud rate in PiOS
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@607 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-08 02:44:26 +00:00
vassilis
a337de22c7 OP-4 Flight/Telemetry Flush telemetry queues while connection is not yet established (to remove stale data)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@605 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-08 00:22:07 +00:00
gussy
7544aab7fe Comment out testing task.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@595 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-05 17:24:39 +00:00
stac
42c4c9b343 Lower priority of HIDTest task
Commit @583 uncomments the HIDTest task creation.  HIDTest task is configured to run at
priority 4 (== tskIDLE_PRIORITY + 4) which is higher priority than the "System" task at
priority 3 (== tskIDLE_PRIORITY + 3).

The HIDTest task never blocks so it prevents the system task (and any other task of priority
less than 4) from ever running.

This commit does not fix the root problem of HIDTest never blocking, but rather lowers
its priority to be equal to the system task so that they share the CPU.  This is a
temporary workaround.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@586 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-05 03:19:47 +00:00
gussy
a574f56961 HID Loopback test now working. GCS code now needs to be brought up to speed.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@583 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-04 19:56:06 +00:00
gussy
0aba12fe1f Loopback test of HID working. Still a WIP but committing what I have to show progress.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@582 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-04 18:54:43 +00:00
vassilis
7ca10bf5d7 OP-4 Flight/ObjectPersistance Implemented saving/loading of individual objects from the SD card
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@580 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-04 02:11:16 +00:00
vassilis
e10a16f1c3 OP-4 Flight/Telemetry Implemented telemetry connection manager
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@578 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-04 01:29:04 +00:00
FredericG
0c65a90a9d Write counter-value to memory in Task2
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@577 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-03 18:31:34 +00:00
FredericG
58514baa49 Fixed test
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@576 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-03 18:18:43 +00:00
fredericg
8cdd056d84 Start using 2 I2C devices from 2 different threads - Untested
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@566 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-01 14:57:26 +00:00
FredericG
192134967d Lock I2C before usage as it should
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@565 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-01 14:54:35 +00:00
FredericG
724e82712b Added vApplicationStackOverflowHook()
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@563 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-01 14:45:10 +00:00
FredericG
916f6163fd Configurable address
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@562 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-30 06:40:13 +00:00
vassilis
0999c1ce58 Flight/Objects Metaobjects are now also stored in CF and retrieved on power-up. At this time settings and meta objects are automatically loaded on startup if they have been saved in the CF card (to test use Save button in the object browser), if a file is not found in the CF card then the defaults specified in the XML file will be used.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@561 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-30 02:28:16 +00:00
vassilis
99b67388bf Flight/UAVObjects Added support for default field values (used to initialize settings with defaults)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@558 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-28 01:54:24 +00:00
vassilis
8c11a03129 Flight/Alarms Implemented Alarms library, now checking for stack overflow, out of memory, event and other errors (see the SystemAlarms object). All modules will be reporting their alarms using this library.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@554 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-27 01:55:28 +00:00
vassilis
613b17f970 OP-4 Flight/Telemetry Implement CRC in telemetry protocol
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@549 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-25 21:20:13 +00:00
vassilis
aaef72955e OP-4 Flight/Telemetry Make objectTransaction() fully reentrant
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@547 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-25 18:34:03 +00:00
vassilis
7b99c3d7f0 Flight/System Restructure start-up code, now all initialization in done after the RTOS is started
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@541 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-25 02:21:03 +00:00
vassilis
ecb83a52d3 OP-4 Flight/Telemetry Bug fixes and improved response when telemetry is fully loaded
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@539 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-24 04:05:39 +00:00
sambas
b8b5bffe4d OP-25 Flight/GPS: using strsep instead of strtok_r (thanks for the hint PeterG). Prepared for GPGSA.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@535 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-21 09:56:23 +00:00
vassilis
f999028753 Flight/UAVObjects Added support for named arrays (i.e. each array element can have a name - needed for alarms)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@531 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-21 02:49:11 +00:00
sambas
923ee3ccaf OP-25: gpsinfo removed, cleaned things up.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@522 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-18 07:37:55 +00:00
sambas
0ec2156f4a OP-25: More fields for GPS Objects, preparing gpsinfo remove
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@521 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-18 07:14:00 +00:00
vassilis
40beb15129 OP-4 Flight/System Created CPU utilization measurement and created object to report system information (load, heap and time)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@519 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-18 02:13:59 +00:00
vassilis
ef36a79e12 Flight Updated gpsobject XML file (made it a single instance - less protocol overhead)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@517 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-17 22:28:19 +00:00
vassilis
89a6dd30d1 OP-4 Flight/Telemetry Create new objects to report statistics of the telemetry link (plus a few bug fixes, heap size was also increased)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@515 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-17 22:16:20 +00:00
sambas
6c4cd936e5 OP-25: GPS Objects working. You need to raise configTOTAL_HEAP_SIZE in FreeRTOSConfig.h if all tasks enabled.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@514 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-17 08:49:19 +00:00
sambas
670ac85e79 OP-25: GPS object update
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@513 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-17 08:12:05 +00:00
sambas
03a012c347 OP-25: Initial GPS Object
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@512 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-17 07:38:28 +00:00
vassilis
bc472102b4 OP-4 Flight/Telemetry More bug fixes after testing telemetry
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@506 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-16 01:56:08 +00:00
vassilis
5889849060 OP-4 Flight/Telemetry Various bug fixes while testing telemetry (working but not fully tested)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@500 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-15 02:15:46 +00:00
sambas
402b4e8e24 Telemetry and HID work, ugly hacks atm. Endianess needs checking. HID transmit doesn't work at all. Serialport works both ways
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@472 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-10 16:22:08 +00:00