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

322 Commits

Author SHA1 Message Date
Oleg Semyonov
4a99ec3298 code style: move variable into function and free 1 byte of RAM :-)
component     free heap used
    ----------------------------
    Nothing            2560    -
    PWM                2432  128
    PPM                2408  152
    DSM                2464   96
    S.Bus              2448  112
    GPS (port only)    2368  192
    GPS (port+module)  1312 1248
    CameraStab         2096  464
    Telemetry          1928  632
2011-11-13 18:27:52 +02:00
James Cotton
b110e9c549 Style suggestions to cleanup GPS from Stac 2011-11-12 21:31:01 -06:00
Corvus Corax
aa69027cb2 Merge branch 'next' into CC_GPS 2011-11-11 11:44:11 +01:00
Corvus Corax
61ecc0d310 make optional modules check themselves if they should start or not 2011-11-11 11:39:57 +01:00
Corvus Corax
e03e3c2ed8 removed "special code" to start optional modules 2011-11-11 11:22:54 +01:00
Corvus Corax
9679638244 Revert "Modules/GPS: removed comment line"
This reverts commit 109a58ef30.
2011-11-11 11:07:02 +01:00
Oleg Semyonov
8f77d07119 System Module: fix stupid out of memory detection bug 2011-11-07 19:14:55 +02:00
Oleg Semyonov
a8b36ddd28 HwSettings: disable GPS and telemetry port speed updates at run-time
This is to be consistent across the HwSettings object fields which are
read on boot only by convention.
2011-10-31 23:04:17 +02:00
Oleg Semyonov
0116e6a007 spektrum: rework DSM2/DSMJ/DSMX driver for explicit DSMX resolution support
- both CC serial ports are now disabled by default (no telemetry);
- serial ports now have DSM2, DSMX (10bit) and DSMX (11bit) options;
- ReceiverGroups now have DSM (MainPort) and DSM (FlexiPort) options.

For DSM2 protocol there is an explicit resolution bit in the stream, so
the DSM2 should be selected. For DSMX there is no such bit, and user
should choose the resolution from the list configuring the spektrum port.
ReceiverGroups have single DSM option which is handled by the same driver.

Downside: this implementation saves received frame first, unrolls by the
end of frame. This should be ok, but may be improved by unrolling channels
on the fly in the rx callback.

Another minor difference is that a ChannelGroup is now bound to port:
DSM (MainPort) or DSM (FlexiPort). This was considered as acceptable
solution in order to not have 6 DSM options for each ChannelGroup and
even more in case of new DSM protocol variations.

Known problem: it is not possible to choose same protocols like
DSM2/DSM2 for two ports. It can be enabled by adding an exception to
common rule, though.

The DSMX throttle channel misbehavior (zero value) is not treated
specially yet. It should trigger the failsafe being out of bounds.
More info and data dumps are required to handle this properly.
2011-10-30 19:29:03 +02:00
Oleg Semyonov
f71361ca83 Merge branch 'next' into os/GPS-on-CopterControl_next_v2
Conflicts:
	flight/Modules/System/systemmod.c
2011-10-22 23:00:47 +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
b00751af91 Systemmod bugfix: UAVObject used without Initialization 2011-10-19 22:28:08 +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
Oleg Semyonov
7800fbe6de gps: initialize GPS UAVO and start GPS module only if port is configured 2011-09-29 00:41:51 +03:00
Oleg Semyonov
a38c569cd0 HwSettings: move Telemetry and add GPS port speed to the HwSettings object
TelemetrySettings object removed (saved 200+ bytes of RAM). Telemetry
port speed moved to the HwSettings object. Added GPS port speed setting.
GCS code updated to reflect changes and support both fields.
2011-09-28 22:11:42 +03:00
Oleg Semyonov
53c098dd08 Merge branch 'next' into os/GPS-on-CopterControl_next_v2
Conflicts:
	flight/OpenPilot/System/pios_board.c
	flight/OpenPilot/UAVObjects.inc
	shared/uavobjectdefinition/hwsettings.xml
2011-09-28 22:02:02 +03:00
James Cotton
c36297227d Stabilization fix typo 2011-09-12 11:56:01 -05:00
James Cotton
63bb80649b Merge branch 'max_rate_for_attitude' into next 2011-09-12 11:51:03 -05:00
James Cotton
8f2fad6918 Fix for merging with the collective channel with the swashplate fix. 2011-09-11 18:53:10 -05:00
James Cotton
6457276438 Merge branch 'input_configuration' into next 2011-09-11 18:52:35 -05:00
James Cotton
b38081bb1b Stabilization: When in none mode zero the integral accumulators for rate and
attitude loops.  When not using outer loop zero that accumulator.
2011-09-11 16:33:38 -05:00
James Cotton
6945f17eba Make the StabilizationSettings.MaxRate field only apply to the stabilized
modes.  That way ManualRate can exceed MaxRate.
2011-09-11 12:27:17 -05:00
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
dfe91af686 UAVObjects: Space allocated in manualcontrolcommand did not match the number of
channels in settings.  Fixed this and added assertion to catch in future.
2011-09-09 01:17:13 -05:00
James Cotton
1a5fd9f30e Heli: Added an explicit collective channel. Also make the default channel
number 0 since that is not invalid.
2011-09-07 01:48:39 -05:00
James Cotton
72625d9971 PiOS RCVR: Make the public API use a 1 based indexing for channel numbers.
This may or may not get into next, but if so anyone following it MUST
reconfigure their inputs.
2011-09-06 16:39:08 -05:00
James Cotton
8f7712435f Merge branch 'safer_failsafe' into next 2011-09-06 16:23:11 -05: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
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
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
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
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
Corvus Corax
658ae3f809 Modules/System: removed comment line 2011-08-25 16:26:46 +02:00
Corvus Corax
109a58ef30 Modules/GPS: removed comment line 2011-08-25 16:25:19 +02:00
Corvus Corax
8173c7b7c6 Refactor GPS_PURISTIC into GPS_MINIMAL 2011-08-25 15:44:49 +02:00
Corvus Corax
1d797bf004 Fixed error introduced by merge 2011-08-25 15:40:45 +02:00
Corvus Corax
4bd72923e5 Merge branch 'CorvusCorax_unidirectional-GPS-com' into CC_GPS
Conflicts:
	flight/Modules/GPS/GPS.c
	flight/Modules/GPS/GTOP_BIN.c
	flight/Modules/GPS/NMEA.c
	shared/uavobjectdefinition/hwsettings.xml
2011-08-25 15:33:23 +02: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
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
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
James Cotton
368323fd59 Merge remote-tracking branch 'origin/james/erase_settings' into next 2011-08-20 13:07:01 -05:00
Corvus Corax
1ad65e0718 Fixed include in sysstemmod. pios_config.h should not be included explicitly. 2011-08-20 15:04:00 +02:00