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

242 Commits

Author SHA1 Message Date
zedamota
e736b17cc4 Merge remote-tracking branch 'remotes/origin/next' into GCS_ChangesToUI-RuntimeCFG
Conflicts:
	ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp
	ground/openpilotgcs/src/plugins/config/configgadgetwidget.h
	ground/openpilotgcs/src/plugins/config/configstabilizationwidget.cpp
2011-08-14 15:48:16 +01:00
Corvus Corax
b75653a226 PiOS.posix: small corrections and bugfixes to make pios_com_udp work correctly. Telemetry works now. 2011-08-14 14:21:54 +02:00
Corvus Corax
5b240a2675 PiOS.posix: port pios_udp and pios_com to "next" 2011-08-14 14:21:54 +02:00
Stacey Sheldon
06cdeb7b61 rcvr: support multiple simultaneous receivers
Now also supports multiple instances of the Spektrum driver.
These are configured as Spektrum1 and Spektrum2.
2011-08-02 01:22:04 -04:00
James Cotton
2e5a36a4db Merge branch 'stac/refactor-usart-com' into camera_stabilization 2011-07-30 10:55:16 +09:00
James Cotton
b2d2114ede Disable auto registration of all objects. Later the uavobj_init linker scripts
should be deleted to not carry around old code.
2011-07-30 10:24:46 +09:00
James Cotton
96c2d24253 Merge branch 'next' into camera_stabilization
Conflicts:
	flight/CopterControl/Makefile
	flight/CopterControl/System/coptercontrol.c
	flight/Modules/Actuator/actuator.c
	flight/Modules/GPS/GPS.c
	flight/Modules/ManualControl/manualcontrol.c
	flight/Modules/Stabilization/stabilization.c
	flight/Modules/System/systemmod.c
	shared/uavobjectdefinition/manualcontrolsettings.xml
	shared/uavobjectdefinition/stabilizationdesired.xml
2011-07-30 10:06:10 +09:00
Stacey Sheldon
c2fb0d8b43 com: allow run-time allocation of buffers 2011-07-29 15:33:14 -04:00
Stacey Sheldon
5f8760a55c com: Move buffering out of USART/HID layer and into COM layer
This allows the spektrum and sbus receiver drivers to bind
directly to the usart layer using a properly exported API
rather than overriding the interrupt handler.

Bytes are now pushed directly from the usart layer into the
com layer without any buffering.  The com layer performs all
of the buffering.

A further benefit from this approach is that we can put all
blocking/non-blocking behaviour into the COM layer and not
in the underlying drivers.

Misc related changes:
 - Remove obsolete .handler field from irq configs
 - Adapt all users of PIOS_COM_* functions to new API
 - Fixup callers of PIOS_USB_HID_Init()
2011-07-27 19:45:38 -04:00
James Cotton
abee34e551 Getting posix simulation compatible with init and receiver changes 2011-07-22 07:50:06 -05:00
Stacey Sheldon
8dbace5ee2 Merge branch 'rcvr_mem_reduction'
Conflicts:
	flight/PiOS/STM32F10x/link_STM32103CB_CC_Rev1_sections.ld
2011-07-17 17:14:40 -04:00
James Cotton
14370b5ac4 Reenable serial telemetry on OP main board 2011-07-15 19:10:00 -05:00
Stacey Sheldon
6580462916 rcvr: specify drivers for groups of channels
Each channel was previously tracking a separate driver.
Now, channels are grouped within a channel group to save
RAM used for tracking and to better reflect how channels
are actually mapped.
2011-07-14 23:22:42 -04:00
James Cotton
2fe7ee40b1 Merge branch 'OP-423_Mathieu_Change_Init_To_Reduce_Memory_Footprint' 2011-07-12 12:44:59 -05:00
James Cotton
557771d3ef Change to OP MB code to make it work with input changes. Previously tried to
register every possible input channel.  Slipped through review because
"obviously correct" change fixed previous bug masking this.  Woohoo testing :)
2011-07-12 11:41:21 -05:00
Mathieu Rondonneau
d38f6167e3 OP-423:
Also reduce heap has it does not fit in SRAM anymore (not with current compiler).
(that's ok since if there is more space available, it will be reclaimed).

Merge branch 'master' into OP-423_Mathieu_Change_Init_To_Reduce_Memory_Footprint

Conflicts:
	flight/CopterControl/System/inc/pios_config.h
	flight/Modules/ManualControl/manualcontrol.c
2011-07-08 06:29:34 -07:00
Stacey Sheldon
b86ef4de82 bootcfg: fix incorrect bounds checking on rcvr registration
This was preventing any receivers from registering their
channels.
2011-07-07 23:59:12 -04:00
Stacey Sheldon
226f095a2e bootcfg: remove baudrate #defines for USARTs
The initial baud rates of each interface are now forced in the
board init code.

Any modules using USARTs should have fields added to
their settings object to allow the user to change the
baud rate from the default by using the COM layer APIs.

Developers requiring custom baud rates before the settings
objects are in place should locally edit the cfg structs
to specify the desired baud rates.
2011-07-06 23:03:54 -04:00
Stacey Sheldon
e82539c654 bootcfg: additional validation during board init 2011-07-06 22:34:59 -04:00
Stacey Sheldon
dbf7574946 bootcfg: use UAVobj to control boot-time HW config
This should mark an end to the compile-time selection of HW
configurations.

Minor changes in board initialization for all platforms:
 - Most config structs are marked static to prevent badly written
   drivers from directly referring to config data.
 - Adapt to changes in .irq fields in config data.
 - Adapt to changes in USART IRQ handling.

Major changes in board initialization for CC:
 - Use HwSettings UAVObj to decide which drivers to attach to
   the "main" port and the flexi port, and select the appropriate
   device configuration data.
 - HwSettings allows choosing between Disabled, Telemetry, SBUS,
   Spektrum,GPS, and I2C for each of the two ports.
 - Use ManualControlSettings.InputMode to init/configure the
   appropriate receiver module, and register its available rx channels
   with the PIOS_RCVR layer.  Can choose between PWM, Spektrum and PPM
   at board init time.  PPM driver is broken, and SBUS will work once
   it is added to this UAVObj as an option.
 - CC build now includes code for SBUS, Spektrum and PWM receivers in
   every firmware image.

PIOS_USART driver:
 - Now handles its own low-level IRQs internally
 - If NULL upper-level IRQ handler is bound in at board init time
   then rx/tx is satisfied by internal PIOS_USART buffered IO routines
   which are (typically) attached to the COM layer.
 - If an alternate upper-level IRQ handler is bound in at board init
   then that handler is called and expected to clear down the USART
   IRQ sources.  This is used by Spektrum and SBUS drivers.

PIOS_SBUS and PIOS_SPEKTRUM drivers:
 - Improved data/API hiding
 - No longer assume they know where their config data is stored which
   allows for boot-time alternate configurations for the driver.
 - Now registers an upper-level IRQ handlerwith the USART layer to
   decouple the driver from which USART it is actually attached to.
2011-07-05 22:03:25 -04:00
Stacey Sheldon
6415fc84a5 rtc: allow registration of callbacks on RTC tick
This separates the RTC device and interrupt handling
from the devices that rely on the tick notifications.

Drivers can now register tick notification functions
that will be called on each RTC tick event.
2011-07-05 22:03:25 -04:00
Stacey Sheldon
740b5f1584 rcvr: convert PWM, PPM, SBUS and Spektrum to use PIOS_RCVR
All receivers now fall under the same driver API provided
by pios_rcvr.c.

This is part of a larger sequence of commits that will
switch the receiver selection over to boot time dynamic
configuration via UAVObjects.
2011-07-05 22:03:25 -04:00
Mathieu Rondonneau
b3740ec025 OP-423: Clean startup and add weak function call for stack swap. 2011-07-03 12:43:38 -07:00
Corvus Corax
fc62f6e522 Module initialisation rework ported to PiOS.posix 2011-06-26 00:25:06 +02:00
Mathieu Rondonneau
6683ce8570 OP-423: Make it more obvious that MODULE_TASKCREATE_ALL and MODULE_INITIALIZE_ALL are macro (for now):
- remove the ;
  - also encapsulate the macro by {} in his own scope.
2011-06-25 11:40:01 -07:00
Mathieu Rondonneau
dcd2774103 OP-423 Fix some comment from code review:
- update example module
- use module init macro for POSIX and WIN to make code cleaner.
2011-06-24 06:59:51 -07:00
Mathieu Rondonneau
0ff5e9a46f Merge branch 'master' into OP-423_Mathieu_Change_Init_To_Reduce_Memory_Footprint 2011-06-21 22:02:13 -07:00
James Cotton
8976d22fad Merge remote-tracking branch 'origin/OP-159_os_sbus' 2011-06-21 17:51:22 -05:00
Mathieu Rondonneau
fc1e3f574c OP-423: Split task create and module init in order to postpone task creation once the full heap is available.
Also implement some ordering (quite ugly still) in the module init and task creation order so we can decide which module to start/init first
and which module to start/init last.
This will be replaced/adapter with the uavobject list later (once it's implemented).
reserving some space for module init and task create parameters to customize module/task creation (this will be usefull once we get the list and customization from customer).

Changes have been made for OP and CC. Tested comped with CC,OP, sim_posix.
Only ran on bench with CC for couple of minutes (code increase expected but no dropping of stack which is good).

This gives task creation at the time wherethe all heap is available.
2011-06-19 22:35:40 -07:00
James Cotton
5044ea36de Start initializing objects in the modules that consume them. Shouldn't affect
OP yet but not tested.
2011-06-18 14:20:51 -05:00
Mathieu Rondonneau
b67a38661e OP-423: merge master into that branch, resolve conflicts and test with CC and bl_CC
heap reamining is low (about 500) but stacks can be ajusted (specially the 200 bytes from system) to give the level close to 1Ko if needed.

Merge branch 'master' into OP-423_Mathieu_Change_Init_To_Reduce_Memory_Footprint

Conflicts:
	flight/CopterControl/System/inc/FreeRTOSConfig.h
	flight/CopterControl/System/inc/pios_config.h
2011-06-17 19:04:09 -07:00
James Cotton
9720a8444f Make a few things optional if they are mostly for diagnostics to keep memory
down
2011-06-17 21:00:21 -05:00
Mathieu Rondonneau
65cf467ca4 OP-423: move the module initialize funtion into a specific section for OP and CC.
- create linker section for those <module>Initialize()
- later this list will incorporate parameters as well. (this probably will be more a OP feature to swap/remove/delete module on the fly.
- this is not done at compile time anymore by Makefile.
- this will allow us to have control on the module start at run-time (not implemented but build the ground for it).
- this simplify the startup (Part of code re-org).
- this change does not affect sim_posix and win32 (since they don't need that)
- ensure it's compiling for PiOS.posix
- port to PiOS.win32 but not tested (not compiled)
- tested on CC
- compile on OP.
- this free ~200 bytes.
- current avalable bytes (is we keep the same remaining bytes on the stack than before) is easily passed the 1.2Ko mark on CC with new gcc (4.5.2)
- this does not include init-reorg for each module (I still think more can be freed)
2011-06-16 22:13:19 -07:00
Oleg Semyonov
d8201ec45b sbus: provide a stub based on Spektrum driver (for CC only) 2011-06-15 22:35:21 +03:00
Mathieu Rondonneau
3780de8d3e OP-423 port to OP (heap2) the previous changes done in CC (heap1) (see c95b199166)
I managed to test CC with heap2 changes and the init stack claimed back to heap once scheduler starts.

the changes of this commit are OP related (just cleanup on CC side):
Arch specific stuff (in reset vector) to hide this from portable code:
     - switch back to MSP stack before starting the scheduler so that the sheduler can use the IRQ stack (when/if needed).
     - call the C portable function in heap2 to claim some stack back (the number to claim is taken from linker file).
     - start the scheduler from reset vector (I move this here from main because it make sense to not go back to C (so that I don't need to copy the rolled stack in case the sheduler returns). This make it more clean.
     - Also I have added the call to the mem manager if sheduler return. that way, we don't reset indefinitely if memory runs out. We will go to this handler and figure things out (right now, it's just looping but at least not rebooting. Probably trap NMI would be better (later improvement).
2011-06-14 20:10:53 -07:00
Mathieu Rondonneau
1f54e32ea9 OP-423 also add changes to OP. (I can not test it because I don't have a board so only compile test) 2011-06-13 17:10:14 -07:00
James Cotton
404c026188 Patch from Zippe to use cycle timer for CPU monitoring. 2011-06-13 00:24:30 -05:00
sambas
17fb31a7fa Spektrum rtc supervisor working, tested on CC and all outputs are activated. Needs review and testing before merge. 2011-05-29 14:52:22 +03:00
James Cotton
bdf862a712 PIOS/RTC: Add functions to get the rate. Also changed Start to Init to be more
consistent with pios.
2011-05-18 01:45:21 -05:00
Corvus Corax
59dd0637a3 PiOS_posix: Add support for pios_debug API, to allow building of GPS module in x86 environment 2011-05-05 14:57:30 +02:00
James Cotton
819bc9d441 Merge branch 'master' into OP-430_Ligi_UAVTalk-Code-Review 2011-04-26 12:49:32 -05:00
Corvus Corax
cdb6b65e64 Merge branch 'master' into OP-383_Edouard_CPUSerial_in_FirmwareIAP 2011-04-25 02:36:44 +02:00
marcus bueschleb
06ac71b784 do not force telemetry update when alarm is changed - this was bypassing the MetaData of the UAVObject and seem to be a relict from times where no metadata existed - now doing it the MetaData way with onchange as updatemode - see http://forums.openpilot.org/topic/4208-systemalarms-bypassing-updatemode-from-metadata/ and OP-431 2011-04-24 03:43:05 +02:00
Corvus Corax
357bc369db PIOS: Bootloader Helper functions should sit in HAL, not duplicated in every single architecture. 2011-04-23 19:40:41 +02:00
Corvus Corax
2bf7ea2271 Modules/GPS: Make code to deal with home location optional to allow a sleeker GPS module for RAM challenged systems 2011-04-23 16:49:07 +02:00
sambas
dabc33c71c OP-22 Flight/PiOS: fix for 11ms framerate, Spektrum supervisor timer must have atleast one interrupt between frames
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3134 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-04-09 14:51:39 +00:00
corvus
8a49dbb6ab OpenPilot_posix: Added ENABLE_QUATERNION_STABILIZATION define
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3116 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-04-01 15:14:33 +00:00
sambas
0eeacb44bd PPM driver for OP, first test
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3007 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-08 18:08:13 +00:00
FredericG
5f52ef6aaa fix: PIOS_DEBUG_Init() was no longer called
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2970 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-05 09:21:32 +00:00
peabody124
e4d9ef98a5 OP-315: Display run time as a percentage
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2944 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-03 04:28:45 +00:00
peabody124
ec29920a8d OP-315: Clean up RTC calls into a separate function. Unfortunately still need
to add function headers into portmacro.h

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2942 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-03 04:28:38 +00:00
peabody124
3e2c542eef OP-315 Use RTC at 65 khz as time base for task switching
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2941 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-03 04:28:34 +00:00
peabody124
528f74b512 OP-315: Extend TaskInfo to include run time stats. Still need to configure a
timer to run at around 10 khz.  RTC a good option.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2940 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-03 04:28:29 +00:00
peabody124
8930ec01de OP-313 Quaternion based stabilization, gets rid of lots of checking angle
signs, should be stable for all orientations

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2932 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-02 01:25:34 +00:00
osnwt
899c1fe0bf Moved CPU and heap alarm thresholds into pios_config.h.
Fixed heap thresholds for the CC (prevented arming).

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2886 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-26 11:46:39 +00:00
pip
c214833346 oops!! .. enabled PPM and disable PWM by default .. sorry
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2817 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-20 13:40:19 +00:00
pip
d733f08a0e Fixed PPM compile option (missing pin defines)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2816 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-20 13:12:08 +00:00
FredericG
ec634ef3e7 debug-pins, small fix
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2808 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-19 09:11:00 +00:00
peabody124
52f09e5d55 Add compile time flag (USE_SPEKTRUM) to enable spektrum support until the
dynamic switching is done.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2778 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-13 17:43:44 +00:00
sambas
f3bce1705b OP-22 Flight/PiOS: Spektrum fix, OP tested on ground not flown yet, CC not tested.
pios_rcinput.[ch] outdated

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2775 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-13 13:10:02 +00:00
stac
66a9d53d0a hwinit: Convert I2C driver to dynamic init
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2773 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-12 22:19:54 +00:00
stac
3fda65c5d3 hwinit: Convert SPI drivers to dynamic init
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2772 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-12 22:19:50 +00:00
stac
841b0d3d6d hwinit: Convert COM and USART to dynamic init
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2771 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-12 22:19:43 +00:00
stac
4e6b539086 debugpins: Add definitions for debug pins
Not yet used anywhere but will eventually allow
debug pins to be assigned during runtime init based
on configuration found in a new uavobject.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2741 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-06 01:03:06 +00:00
peabody124
f97d853c80 Make the PriTx queue optional which saves 700 bytes
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2729 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-05 10:52:52 +00:00
peabody124
cf2e9fb349 Memory: Also allow overriding Stabilization stack size
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2690 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-02 08:57:34 +00:00
peabody124
877bcca880 Delete hardcoded min and max servo PWM times, they weren't used. Use the
configuration settings.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2676 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-01 21:04:58 +00:00
peabody124
c3aa5ed8f3 Posix: Add the constants for telemetry queue sizes and also make the actuator
SetHz calls compatible with the PiOS API change

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2672 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-01 15:47:02 +00:00
sambas
ba5ebb6b13 OP-303 PIOS/Sonar: preliminary support for HCSR04 ultrasound altimeter module, tested and working :)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2610 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-28 19:21:22 +00:00
peabody124
ac031d9b0d OP-256 RC 3 is using TIM5 but wasn't previously handling this ISR. Passing to
the PWM ISR now.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2607 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-28 16:01:40 +00:00
sambas
d917ced2f6 Fix for pwm input reset problem? Try the line I commented out because I can't test this.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2606 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-28 13:30:12 +00:00
sambas
195b63b6bb OP-22 PIOS/Spektrum: Made spektrum input driver, NOT YET TESTED!!!, also preliminary support for CC, sync/supv timer not yet fixed.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2602 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-28 09:25:30 +00:00
peabody124
92dd78db51 OP-256 PIOS/PWM: Disable from the pios_board.c file when not using PWM
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2589 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 23:17:39 +00:00
peabody124
3b0be12b67 OP-291 PIOS/Servo: Fix a few interrupt mappins for OP
Also keep the priority of actuator at idle+4, dropping it down slipped through

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2580 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:52:20 +00:00
peabody124
7554021ed0 OP-256 PIOS/PWM: Set the interrupts correctly
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2577 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:52:11 +00:00
peabody124
99fcd089d4 OP-291 PIOS/Servo: Make the remapping of timers a part of the driver structure
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2569 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:51:48 +00:00
peabody124
da96ce15b9 OP-256 PIOS/PWM: Converting PWM input to use standard driver structure.
Beginning of unifying the input types into PIOS_RECEIVER.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2568 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:51:45 +00:00
peabody124
2d9f7f32d1 OP-291 PiOS/Servo: Converting output to use driver system
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2499 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-21 03:40:21 +00:00
vassilis
d7fd8a3bcd Flight/FlightPlan: Enable Python VM and test flightplan execution. From now on a Python executable needs to be in the system path as it is used in the Makefile.
A test script is statically linked (will eventually be uploaded by the GCS and stored in the VM), it can be found under: Modules/FlightPlan/flightplans/test.py

To start the script send the FlightPlanControl object with the Start command, to stop send the Stop or Kill commands.

Next release will be the OpenPilot python libraries and access to UAVObjects from the script.



git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2480 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-19 03:34:01 +00:00
peabody124
c2bdf624e8 OP-269 PIOS/ADC: Previous ADC driver update changed the PCLK2 divider for all
projects which messed up a timer on OP and serial on PipX.  Now this is only
changed for AHRS.  Ideally wouldn't even change for that but then ADC runs too
fast and we get a lot more CRC errors for dealing with all that data.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2459 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 23:00:48 +00:00
peabody124
0259b6d1f1 OP-269 PIOS/ADC: First part of conversion to driver structures
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2444 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 02:45:39 +00:00
peabody124
81b0c3fdb6 OP-269 PiOS/ADC: Moved AHRS ADC code to PiOS and made all the projects use it
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2440 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 02:45:22 +00:00
peabody124
c59a1ff018 OP-265 OP-266: FreeRTOS configuration per project because of available heap
size (may eventually need to be per revision if we get bigger ram).  Typo in a
the ifdefs to get allow disabling SDCARD

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2423 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-14 01:38:42 +00:00
cwabbott
0f965df11e SiTL: Updates for UAVObjects, and for the recent Actuator and Watchdog changes to compile with SiTL. Posix needs to be tested.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2387 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-12 00:39:18 +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
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
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
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
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
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
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
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
kokomojoe
6499da40e3 OP-185 Flight Added init function for PIOS_IAP helper functions.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1892 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-06 02:07:11 +00:00
zedamota
e8d6e7c557 Flight - Centralized board specific files, BL and User FW uses the same board definitions, no need to have 2.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1663 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-16 19:19:38 +00:00
pip
73c8194acc Added PIOS_COM_TELEM_BAUDRATE, PIOS_COM_GPS_BAUDRATE, PIOS_COM_AUX_BAUDRATE & PIOS_COM_SPEKTRUM_BAUDRATE defines in pios_board.h with '#if defines' in pios_board.c for easier baudrate changing.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1644 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 17:18:38 +00:00
stac
ac6989fbeb bmp085: fix configuration of EOC interrupt
The EOC EXTI interrupt configuration was incorrectly
pointing at GPIOG pin 8 rather than GPIOC pin 15.
This was preventing the EOC interrupt from working
properly.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1626 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-15 14:20:59 +00:00
stac
95595664c3 telemetry: fix comments around #ifdef
No functional changes.

The closing comment on some of the USB_HID related
ifdefs was outdated.  Fixed.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1541 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-05 23:10:34 +00:00
peabody124
a084d21804 Merge branch 'watchdog'
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1281 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-13 05:18:17 +00:00