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

166 Commits

Author SHA1 Message Date
James Cotton
eccdab9da2 Merge remote-tracking branch 'origin/kenz/GroundVehicle2' into next 2012-03-31 18:42:35 -05:00
James Cotton
1bb1ef470e Merge remote-tracking branch 'origin/amorale/OP-627' into next 2012-03-27 10:05:07 -05:00
Laura Sebesta
88a46f9062 Merge GroundVehicle into latest next 2012-03-25 12:21:58 -04:00
James Cotton
6350ec575e Merge remote-tracking branch 'origin/os/features/stick-deadband-next' into next
Conflicts:
	ground/openpilotgcs/src/plugins/config/configinputwidget.cpp
2012-03-21 16:03:40 -05:00
a*morale
92f4dd4f1a fixed indentation 2012-03-20 00:56:42 +01:00
a*morale
702114763f Added Mixer9/Mixer10 to mixerstatus.xml 2012-03-19 23:49:47 +01:00
Oleg Semyonov
2271b95816 Merge remote branch 'origin/next' into os/features/stick-deadband-next
Conflicts:
	ground/openpilotgcs/src/plugins/config/configinputwidget.cpp
	ground/openpilotgcs/src/plugins/config/configtaskwidget.cpp
	ground/openpilotgcs/src/plugins/config/configtaskwidget.h
2012-02-23 08:32:27 +02:00
Oleg Semyonov
e62cc8914c Merge remote branch 'origin/next' into os/features/pid-tuning-from-transmitter-next
Conflicts:
	flight/CopterControl/Makefile
	ground/openpilotgcs/src/plugins/config/config.pro
	ground/openpilotgcs/src/plugins/config/configtaskwidget.cpp
	ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro
	shared/uavobjectdefinition/hwsettings.xml
2012-02-22 23:03:17 +02:00
Oleg Semyonov
403e9cd220 TxPID module: add ILimit values to the list of settings 2012-02-21 19:57:10 +02:00
zedamota
5cfd763f2a Bug fixes and showcase UI setup (partial). 2012-02-07 20:29:32 +00:00
zedamota
e2c6a9d58a Added Dado's UI.
Several scale bug fixes.
Added lots of debug info, will clean later.
2012-02-06 17:33:54 +00:00
Stacey Sheldon
64202ce092 Merge remote-tracking branch 'origin/stac/i2c_decoupling' into next 2012-01-17 22:35:36 -05:00
Stacey Sheldon
ad141c908a Merge remote-tracking branch 'origin/stac/usb-composite-device-v2' into next 2012-01-17 22:26:38 -05:00
Oleg Semyonov
912bea559f Add stick deadband option for Roll/Pitch/Yaw inputs to firmware 2012-01-15 21:13:22 +02:00
Oleg Semyonov
887a8e89ec TxPID: fix units for ThrottleRange 2012-01-15 00:34:19 +02:00
Stacey Sheldon
717c1311e6 altitude: allow altitude to be an optional module 2012-01-14 15:38:56 -05:00
Stacey Sheldon
a51bf72bc7 usb: allow runtime selection of USB descriptors via hwsettings 2012-01-14 14:28:15 -05:00
Stacey Sheldon
025ed0f43c Merge remote-tracking branch 'origin/stac/usb-composite-device-v2' into next
Conflicts:
	HISTORY.txt
2012-01-03 00:02:45 -05:00
Oleg Semyonov
77a459af5c Merge remote branch 'origin/next' into os/TxPID-module 2012-01-02 14:49:54 +02:00
Oleg Semyonov
b01e332e03 CameraStab: rename UAVO field 2012-01-02 14:27:05 +02:00
Oleg Semyonov
e11904c42f CameraStab: change ResponseTime type from float to int16 2012-01-02 14:26:56 +02:00
Oleg Semyonov
2eb5130a7c CameraStab: new camera stabilization mode and low-pass stick input filtering
This patch is based on work of Crubier (LPF) and Cossacs (AxisLock mode).
I've just reworked it a bit by adding a dynamic memory allocation for
static module data.
2012-01-02 14:26:54 +02:00
Stacey Sheldon
5c0921e92c fault: add optional fault insertion module
This module and its associated settings uavo can be used
to test various fault conditions during initialization.

To enable the module, add the TEST_FAULTS=YES to your make
command line:
  make fw_coptercontrol TEST_FAULTS=YES

Once this module is part of your firmware load, you can
enable it in the hwsettings uavo and then select the
type of fault to insert by editing the faultsettings uavo.
On the next reset, the configured fault will be inserted
into the init sequence to allow you to test the boot fault
recovery code.

With a fault inserted, you should see 3 failed boot attempts
followed by a successful (recovery) boot.  You will see the
BootFault alarm set to Critical, and the RAM version of your
hwsettings will be reset to defaults.  Since the defaults have
all optional modules disabled, the fault module will be out of
the way during the recovery boot.

You can then "Load" the flash version of the hwsettings uavo
in the object browser, disable the Fault module and then "Save"
the hwsettings module back to the board.  The next reset will
boot normally without the fault inserted.
2011-12-30 23:05:39 -05:00
Stacey Sheldon
f886af186d bootfault: add support for recovery from init failures
After 3 failed warm start attempts, the init sequence
will force the RAM version of the HWSettings object
to its defaults.  This should allow a user to regain
connectivity to a board that is continually faulting
during init.

This is accomplished by:
 - Incrementing a boot counter that is stored in the
   STM32 BKP registers.  These registers survive a
   warm start but are cleared on a cold start (ie. powerup).
 - On multiple failures, force hwsettings to defaults
   and raise the (new) BootFault alarm to prevent arming.
 - Resetting the boot counter whenever the system manages
   to successfully run the System Module task.

NOTE: This does not actually change the hwsettings object in
      flash.  That's up to the user.

This is intended to catch ONLY faults during early initialization.
It should not be used to recover from faults after the application
is up and running.
2011-12-30 23:05:38 -05:00
Stacey Sheldon
60969b57d8 usb-hid: split apart hwsettings for HID and VCP ports
This allows the HID and VCP functions to be configured
separately so that additional functions can be more easily
bound to the VCP port.

This change also provides a safety net that forces either
the HID or VCP to be configured for USB Telemetry.  This
safety net may vanish in the future once the GCS can check
it.  Disabling USB Telemetry entirely would save more than
400 bytes of RAM.
2011-12-30 23:05:37 -05:00
Stacey Sheldon
ab135aa00b com-bridge: Make com-bridge an optional (and configurable) module 2011-12-30 23:05:36 -05:00
Stacey Sheldon
64f498e48a com-bridge: add usart to usb vcp bridge 2011-12-30 23:05:34 -05:00
Stacey Sheldon
eebdda6276 usb cdc: make HID/CDC configurable in hwsettings 2011-12-30 23:05:34 -05:00
Oleg Semyonov
7fbbb0e6af Merge remote branch 'origin/next' into os/TxPID-module 2011-12-24 15:44:16 +02:00
James Cotton
0b00e748a9 OP-565: Added the ability to do a trim flight to compute the accels for level flight 2011-12-21 15:25:00 -06:00
Oleg Semyonov
10287e3e29 CC: rename ReceiverPort PPM+Servo (Servo) options to PPM+Outputs (Outputs) 2011-12-11 22:52:51 +02:00
Oleg Semyonov
de6e450b5f Merge branch 'next' into os/TxPID-module
Conflicts:
	flight/CopterControl/Makefile
	flight/CopterControl/System/coptercontrol.c
	ground/uavobjgenerator/generators/generator_common.h
	shared/uavobjectdefinition/hwsettings.xml

component    	free heap used
----------------------------
Nothing            2544    -
PWM                2416  128
PPM                2392  152
DSM                2448   96
S.Bus              2432  112
GPS (port only)    2352  192
GPS (port+module)  1296 1248
CameraStab         2080  464
Telemetry          1912  632
TxPID              2272  272
2011-11-13 16:25:58 +02:00
Corvus Corax
aa69027cb2 Merge branch 'next' into CC_GPS 2011-11-11 11:44:11 +01: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
4ed23dd891 Output Remapping: renamed PPM_SERVO option to PPM+Servo 2011-10-24 00:34:01 +03:00
James Cotton
24d6ae731b Output Remapping: Added option to just use servo outputs on input lines but not
PPM.  This saves resources.  Good suggestion Os.  In this configuration we
could allow 12 channels of output but for now I'll leave it capped at 10 to
lessen resources on the mixer table.

With spektrum and camera stab enabled there was
1632 bytes heap remaining
180 bytes irq stack remaining
2011-10-23 15:21:40 -05:00
James Cotton
46aa8916c6 Fix segfault when selected motors 9 or 10. Also make labels show up in output
panel.
2011-10-20 06:56:56 -05:00
James Cotton
0193187d0c Make the UI support 10 output channels 2011-10-15 16:59:42 -05:00
James Cotton
9312610f3b Output: Enable two more channels to support octo + camera 2011-10-15 16:59:42 -05:00
James Cotton
ce7f424131 CC: When receiver port is set to PPM_SERVO use the spare pins as outputs 2011-10-15 16:59:42 -05: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
Oleg Semyonov
a9137e9db1 TxPID: add update mode option as a workaround for GCS interaction 2011-09-19 16:16:28 +03:00
Oleg Semyonov
aad263bdd8 TxPID: enable ramp-shaped throttle-dependent PIDs
Besides of knob PID tuning it is now possible to use throttle channel
to ramp-shape PID coefficients. This can be used to lower some PIDs on
VTOL while sinking to prevent wobble.

To use the feature select throttle as control input, choose throttle
range max and min values, assign the instance to particular PID
coefficient and define a range for it. When throttle is lower than
defined throttle range min value (or higher than max), then min and max
PID values will be used accordingly. Changing throttle from throttle
min to max will linearly scale PID value.

Note that it is possible to set MinPID > MaxPID. In that case increasing
control input value will decrease the PID coefficient.

Up to 3 independent instances can be configured. The number can be
increased changing the UAVO definition, but at the cost of extra RAM.
2011-09-18 14:38:50 +03:00
Oleg Semyonov
d923117c25 TxPID: optional module to tune PID settings using R/C transmitter
This module will periodically update values of stabilization PID settings
depending on configured input control channels. New values of stabilization
settings are not saved to flash, but updated in RAM. It is expected that the
module will be enabled only for tuning. When desired values are found, they
can be read via GCS and saved permanently. Then this module should be
disabled again.
2011-09-17 22:49:51 +03:00
James Cotton
6457276438 Merge branch 'input_configuration' into next 2011-09-11 18:52:35 -05: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
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
8c91522e54 UAVO: Reorder field names of ManualControlSettings which affects the order of
channels listed in the UI configuration.  This keeps it consistent with the
previous releases.
2011-09-06 16:42:03 -05:00