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

1793 Commits

Author SHA1 Message Date
James Cotton
199db1362d Actuator: Found a bug in actuator that affects how throttle and pitch curves
were used.  Basically 80% was always 100%.  This should make hovering better
and fix heli swash pitch.
2011-09-09 19:40:58 -05:00
James Cotton
8f7712435f Merge branch 'safer_failsafe' into next 2011-09-06 16:23:11 -05:00
Sambas
a8ef57c6d6 Redo DX8 changes 2011-09-06 08:40:10 +03: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
James Cotton
82c5f9f0f4 PIOS_RCVR: Document return values better and use enum for them 2011-09-04 12:37:39 -05:00
James Cotton
533ae9bb41 SBUS: Missed handling the S.Bus failsafe. Now returns PIOS_RVCR_TIMEOUT for
either SBus failsafe mode or when no data for 100 ms.
2011-09-04 12:15:34 -05:00
James Cotton
5e2a36aa03 Merge branch 'stac/allocate-device-instances-from-heap' into next 2011-09-04 12:03:42 -05:00
James Cotton
510a1760ca When disconnected set any accessory channels to neutral. Otherwise the
actuator module could keep the pitch at high.  However the "right" thing to do
seems very specific.  For example negative pitch is probably preferable.
2011-09-04 03:45:36 -05:00
James Cotton
89e640ae7f Make sure all receiver drivers return correct constants for invalid channels. 2011-09-04 01:24:16 -05:00
James Cotton
51967ae63f OP-571 PIOS_PWM: Add back the PWM supervisor 2011-09-04 01:17:40 -05:00
James Cotton
20de046292 Force system to be disarmed when a bad configuration is present 2011-09-04 00:43:33 -05:00
James Cotton
d3de8ff0ef OP-559: Process the arm status when disconnect and allow it to timeout and
disarm
2011-09-03 23:57:51 -05:00
James Cotton
697dbf4f5f OP-568 PIOS_RCVR: Standardize the values that are returned from the PIOS_RCVR and make
them symbolic constants.
- A timeout is 0
- A missing driver is 65534
- An invalid channel is 65535

ManualControl: Make it deal with the values explicitly.  A timed out value
should not be treated like a minimum duration signal.  Instead it does not
updated the scaled value but marks the data window as invalid to trigger the
failsafe.
2011-09-03 23:50:56 -05:00
Mathieu Rondonneau
ae1dd945b1 Fix win32 sim macro problem
This is to get the macro in pios.win32 in sync with sim posix and
real flight.
2011-09-01 21:50:13 -04:00
Stacey Sheldon
43b31efb76 pios: allocate driver instance data from heap
Allocate per-instance data for drivers from the heap
rather than as static variables from the .data segment.

This converts > 800 bytes of RAM from being always consumed
as static data into being allocated from the heap only when
a particular feature is enabled in the hwsettings object.

A minimal config (no receivers, flexi port disabled, main port
disabled) leaves 2448 bytes of free heap.  That's our new baseline.

Approximate RAM (heap) costs of enabling various features:
 + 632 Serial Telemetry (includes 400 bytes of Rx/Tx buffers)
 + 108 PWM Rcvr
 + 152 PPM Rcvr
 + 112 Spektrum Rcvr
 + 24  S.Bus (Should be closer to 68 since driver is still using
              static memory)

There are still some drivers that pre-allocate all of their memory
as static data.  It'll take some work to convert those over to
dynamically allocating their instance data.
2011-08-31 22:35:03 -04: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
Stacey Sheldon
b3c43da90a stdperiph: Make TIM related APIs use const pointers
This allows the configuration parameters to be stored in
flash instead of copied to RAM.
2011-08-27 21:39:17 -04:00
Stacey Sheldon
a72c657e21 rcvr activity: Speed up activity acquisition
Activity detection logic can now move through
the active receivers more quickly.
2011-08-27 20:17:56 -04:00
James Cotton
6514fd95c7 Also initialize the ReceiverActivity object in manual control 2011-08-27 16:08:57 -05:00
James Cotton
c5746335c6 Initialize GCSReceiver object if it is being used 2011-08-27 15:57:09 -05: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
1d77d77832 Merge branch 'stac/use-malloc-failed-hook' into next 2011-08-27 00:24:13 -05:00
James Cotton
274333a9bf Merge branch 'next' into stac/use-malloc-failed-hook 2011-08-27 00:12:45 -05:00
James Cotton
55f64802d1 Also enable malloc error catching on OpenPilot 2011-08-27 00:12:16 -05:00
Corvus Corax
54ecf233f3 Modules/PS: typo fix 2011-08-25 15:13:50 +02:00
Corvus Corax
7e396efbbf Modules/GPS: Assert buffer creation 2011-08-25 15:11:29 +02: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
Corvus Corax
8b7fea0d19 Merge branch 'OP-567 GPS com layer fix' into next 2011-08-25 13:35:49 +02:00
Corvus Corax
697ac6067e OP-567 Modules/GPS: Block in PIOS_COM, not in TaskDelay - or we will miss updates! 2011-08-25 13:33:41 +02:00
James Cotton
5f7a9b513a Merge branch 'sambas/dsmx_stuff' of ssh://git.openpilot.org/OpenPilot into next
Conflicts:
	shared/uavobjectdefinition/hwsettings.xml
2011-08-24 11:37:30 -05:00
Stacey Sheldon
edc0caf521 heap: set memory critical alarm on malloc failures
Activate the FreeRTOS malloc failed hook and use it
to set the memory critical alarm.
2011-08-21 23:14:32 -04:00
Corvus Corax
838149b53f GPS: homelocation init is optional, satellites must be initialized 2011-08-21 18:20:33 +02:00
Corvus Corax
0ce337b42d UAVTalk: fix off by one error preventing the largest UAvObject (gpssatellites) from being sent. 2011-08-21 18:15:10 +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
James Cotton
368323fd59 Merge remote-tracking branch 'origin/james/erase_settings' into next 2011-08-20 13:07:01 -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
2062ec0aeb AHRS_COM: Initialize transpherred objects before using them 2011-08-19 19:52:27 +02:00
Corvus Corax
5e4941f7cb PiOS.posix: make PiOS.posix bail in case of a Panic with an error message 2011-08-19 18:41:59 +02:00
Corvus Corax
9bba1f7ae9 Posix: fix object initialization where necessary 2011-08-19 18:36:30 +02:00
James Cotton
03a8bd7674 Statically initialize object handles to null to make sure the uavobjectmanager
can catch it and return -1.  Do NOT panic when they are null as this is
something that should be caugth at run time in some cases.

Ideally as a compromise in a task start it could have a set of
PIOS_Assert(ObjectNameHandle()) to make sure the minimal set of objects it
needs are there.
2011-08-19 10:12:39 -05: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
James Cotton
ced29e221e Revert "Debugging: Add PIOS_DEBUG_Panic() call wen an UAVObject handle is requested but object is uninitialized, make PiOS.posix bail in case of a Panic with an error message"
We do not want to panic in this case as we want the ability to detect if
objects exist at run time

This reverts commit 78e42470d4.
2011-08-19 09:45:10 -05:00
James Cotton
482bec497b Revert "Fixed modules that didn't initialize used UAVObjects correctly"
Modules should initialize their settings and the objects they source.  Not just
everything.

This reverts commit 9ad85e9b7b.
2011-08-19 09:44:38 -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
9ad85e9b7b Fixed modules that didn't initialize used UAVObjects correctly 2011-08-19 13:20:15 +02:00
Corvus Corax
78e42470d4 Debugging: Add PIOS_DEBUG_Panic() call wen an UAVObject handle is requested but object is uninitialized, make PiOS.posix bail in case of a Panic with an error message 2011-08-19 12:56:26 +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