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

216 Commits

Author SHA1 Message Date
Oleg Semyonov
8ed23c76b7 spektrum: fix OpenPilot MB target (deprecated) after spektrum changes 2011-11-04 20:43:49 +02:00
Oleg Semyonov
a19bbba858 Merge branch 'next' into os/alternative_spektrum_driver 2011-10-25 11:55:05 +03:00
Oleg Semyonov
58d0812309 sbus: better frame syncronization, some cosmetic changes
In the previous version the decoder could in rare cases get synced from
the middle of data stream in case of data byte equal to the S.Bus start
of frame (SOF) byte (wrong data will be rejected but it was not perfect).
Now it waits for the real start of frame and then checks the SOF byte.
2011-10-22 00:44:09 +03:00
Oleg Semyonov
62bca651d5 spektrum: alternative DSMx (DSM2/DSMJ/DSMX) driver
- does not glitch when used in 2-frame mode (DM9, 9503, etc)
- does NOT provides yet DSMX stream decoding - do NOT merge
- uses a bit more time in the interrupt, but frees 16 bytes of RAM.
  This is done to help decoding the weird DSMX stream which does not
  contain explicit resolution/frame/lost frames info and needs special
  processing (to be done yet).
2011-10-21 23:35:17 +03:00
Corvus Corax
cb8d9c791c PiOS.posix: fixed missing defines in pios_config. removed platform specific inclde from Systemmod (pios_config.h gets included from pios.h) 2011-10-19 22:28:39 +02:00
Corvus Corax
425bc5abbe PiOS.posix: PIOS_RCVR : fix posix port of pios_rcvr to allow compilation on 64bit systems 2011-10-11 18:07:04 +02:00
James Cotton
01cd2ded57 Mainboard config: The rcvr port is used for PPM/PWM/Spektrum so make these one
setting that is mutually exclusive.
2011-09-10 14:20:51 -05:00
James Cotton
4847a04db8 Mainboard: Get PWM working again. Had to add extra timer IRQ handlers for
TIM5-8.  Also TIM1 was not handled probably (for CC either) as the name of the
IRQ is TIM1_CC and TIM1_UP for the capture compare versus update.  I haven't
checked the downstream code that the registers it uses to map from a context to
event is invariant under timer channel.
2011-09-10 14:20:40 -05:00
James Cotton
eb191d869a Mainboard: Get spektrum working again. 2011-09-10 14:19:54 -05:00
Stacey Sheldon
1e9bcf8426 openpilot: fix merge of unidirectional gps feature branch 2011-09-04 23:22:29 -04:00
James Cotton
b1e0366525 Merge remote-tracking branch 'origin/CorvusCorax_unidirectional-GPS-com' into next
Conflicts:
	flight/OpenPilot/System/pios_board.c
2011-09-04 13:33:52 -05:00
Stacey Sheldon
86ce79af1d openpilot: fix compile error on OP 2011-08-31 21:43:57 -04:00
Stacey Sheldon
2f86e4dd4f Make PWM/PPM and Servo drivers play nicely together
PWM and PPM can now coexist in the same load and be
selected at boot time via the hwsettings UAVObject.

This is basically a complete restructuring of the
way the drivers interact with the TIM peripheral in
the STM32.

As a side effect, the PWM and PPM drivers are now
ready to support multiple instances of each.

This also provides the first step toward being able
to reassign some of the PWM input pins to be servo
output pins.  Still more work required, but this is
a good start.
2011-08-27 21:39:56 -04:00
James Cotton
dc340596f5 Merge branch 'next' into GCS_ChangesToUI-RuntimeCFG
Conflicts:
	flight/CopterControl/Makefile
	flight/OpenPilot/System/pios_board.c
	flight/OpenPilot/UAVObjects.inc
	flight/PiOS/STM32F10x/pios_spektrum.c
	ground/openpilotgcs/src/plugins/config/config.pro
	ground/openpilotgcs/src/plugins/config/configgadget.qrc
	ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro
	shared/uavobjectdefinition/hwsettings.xml
2011-08-27 15:26:05 -05:00
James Cotton
55f64802d1 Also enable malloc error catching on OpenPilot 2011-08-27 00:12:16 -05:00
Corvus Corax
dfdea16065 Modules/GPS: Make GPS COM unidirectional (rx only) and use smaller, runtime allocated heap buffers 2011-08-25 14:46:30 +02:00
James Cotton
e4e952f270 Manual control settings needs to be initialized in OpenPilot board file for
spektrum to work
2011-08-21 02:21:09 -05:00
Corvus Corax
85aef9c7b4 OpenPilot: bugfix: Add GPS tx buffer by default (needed until GPS has been refactored to not send or only send when configured so) 2011-08-19 20:22:05 +02:00
Corvus Corax
9bba1f7ae9 Posix: fix object initialization where necessary 2011-08-19 18:36:30 +02:00
James Cotton
ab7e57ad2b Initialize objects for guidance in the correct place. Init some objects in
pios_board_posix since AHRSComms not around.
2011-08-19 09:52:05 -05:00
Corvus Corax
69f10cd6d0 PiOS.posix: bugfix in COM_UDP 2011-08-19 13:54:16 +02:00
Corvus Corax
adfb6eccc2 fixed usage of GPS buffer in sim_posix 2011-08-19 13:20:40 +02:00
Corvus Corax
01a844e0da Fixed redefinition of configCHECK_FOR_STACK_OVERFLOW in OpenPilot/System/inc/FreeRTOSConfig.h 2011-08-19 12:11:05 +02:00
James Cotton
f85ae84ec3 Merge branch 'camera_stabilization' into next
Conflicts:
	flight/OpenPilot/System/pios_board_posix.c
2011-08-19 01:48:24 -05:00
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