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

2807 Commits

Author SHA1 Message Date
Oleg Semyonov
79f95983da Merge remote-tracking branch 'origin/rel-12.10.2' into next 2012-11-14 17:26:18 +02:00
Oleg Semyonov
22173d96e5 Merge remote-tracking branch 'origin/cyr/accel_filter' into rel-12.10.2 2012-11-14 04:44:11 +02:00
Erik Gustavsson
f9f58f22d8 Take the magnitude of the correct gravity vector 2012-11-12 17:16:28 +01:00
Erik Gustavsson
e38ba912cd Clarify comment about gravity vector 2012-11-11 21:13:05 +01:00
Erik Gustavsson
04c194fa48 Coding style fixes 2012-11-11 21:10:52 +01:00
Richard Flay (Hyper)
54ebcb1ea8 Removed a spurious call to AccelsSet() that was causing garbage data to be transiently written to the Accels UAVO. Props to cyr for kicking off the discussion that led to the discovery of this bug. 2012-11-11 00:31:08 +02:00
lilvinz
a7029baa32 pios_jedec: fixed usage of uninitialized memory
When reading the jedec device id the code only transfered one byte via spi leaving
the expected input buffer uninitialized. This may lead to the problem that flash
initialization fails because the expected input may be whatever the stack was set
when entering the function. The impact of the bug is somewhat limited tough as the
initialization usually takes place before starting up the rtos and thus is pretty
deterministic. So if the code passed init while testing it should pass init in
production as well.
2012-11-11 00:31:07 +02:00
Erik Gustavsson
104c61a174 Move accel filter to separate function, for cleaner code and easier filter alteration.
Optimize for filter disabled case (AccelTau = 0.0).
2012-11-06 20:17:10 +01:00
Erik Gustavsson
677f921b15 Take magnitude of filtered gravity vector into account. 2012-11-02 09:22:18 +01:00
Erik Gustavsson
f63db712d0 Disable accel smoothing during init/arming so it does not interfere 2012-11-02 09:12:24 +01:00
Erik Gustavsson
b7bdf9861d Run rotated gravity vector through smoothing filter to match phase with filtered accelerometer data. 2012-11-01 12:14:33 +01:00
Richard Flay (Hyper)
10865221b9 Removed a spurious call to AccelsSet() that was causing garbage data to be transiently written to the Accels UAVO. Props to cyr for kicking off the discussion that led to the discovery of this bug. 2012-11-01 18:15:47 +10:30
Erik Gustavsson
c207afbfef Implement smoothing filter for accelerometer data. 2012-10-31 19:05:59 +01:00
lilvinz
3db04ea174 pios_jedec: fixed usage of uninitialized memory
When reading the jedec device id the code only transfered one byte via spi leaving
the expected input buffer uninitialized. This may lead to the problem that flash
initialization fails because the expected input may be whatever the stack was set
when entering the function. The impact of the bug is somewhat limited tough as the
initialization usually takes place before starting up the rtos and thus is pretty
deterministic. So if the code passed init while testing it should pass init in
production as well.
2012-10-28 14:34:20 +01:00
Stacey Sheldon
bc3a90c6a9 Merge branch 'one-way-telemetry' into next 2012-10-25 22:48:43 -04:00
Kenz Dale
1ab1ea5899 Save ~150 bytes by moving GPSDataProtocol to SystemSettings.
All credit to Anstron.
2012-10-22 16:47:22 +02:00
Stacey Sheldon
4892fdb33d telemetry: allow telemetry to flow when not connected to GCS
Previously, when unconnected, only the flighttelemetrystats
UAVO was Tx'd.  All other UAVOs were inhibited.  This led to
zero telemetry data when the connection to the GCS was gone.
This precluded getting useful telemetry from a receive-only
station.

This commit changes two main areas.

First, UAVO updates are now allowed regardless of the "connected"
state between the GCS/FC.

Second, it makes both the flighttelemetrystats and gcstelemetrystats
UAVOs un-acked.  This prevents these objects from blocking all
other UAVOs while they wait for their ack.  This is OK since the
real "connection" negotiation happens via the states exchanged in
the Status field of these UAVOs.
2012-10-21 22:51:17 -04:00
James Cotton
96afe7cffd Merge remote-tracking branch 'origin/stac/add-debug-consoles' into next 2012-10-12 08:07:44 -05:00
Stacey Sheldon
f0e0c2e79e console: add debug console via USB CDC/VCP interface
The USB VCP Port has a new DebugConsole setting that
routes all output destined for PIOS_COM_DEBUG to the
emulated serial port.

To enable this in your build, you'll have to build like:
 - make fw_coptercontrol_clean
 - make fw_coptercontrol ENABLE_DEBUG_CONSOLE=YES

You can then output formatted text to the console
like this:
  #if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
  PIOS_COM_SendFormattedString(PIOS_COM_DEBUG,
                               "foo is %u\r\n",
                               foo);
  #endif	/* PIOS_INCLUDE_DEBUG_CONSOLE */

Please ensure that all of your debug output is
wrapped with these macros so that your debug
code doesn't bloat the firmware image.
2012-10-11 00:51:09 -04:00
Stacey Sheldon
75170177df console: example usage of the debug console 2012-10-11 00:22:07 -04:00
Stacey Sheldon
6088c05946 console: add support for serial debug consoles
Serial ports now have a new HW setting called DebugConsole
which can be used to dump internal state to a serial port
for debug.

To enable this feature, you need to:
 - make fw_coptercontrol_clean
 - make fw_coptercontrol ENABLE_DEBUG_CONSOLE=YES
 - configure one of the serial ports as DebugConsole in the GCS
 - save settings
 - power-cycle your board

Things to note:
 - The console is at 57600,8N1.
 - This is not currently configurable via the GCS.
 - You can only have a single console enabled at a time.
2012-10-11 00:22:07 -04:00
Laura Sebesta
c2b49b6ef3 Merge branch 'kenz/cc_hitl_merge' into next
Conflicts:
	ground/openpilotgcs/src/plugins/gcscontrol/gcscontrolgadgetoptionspage.ui
	ground/openpilotgcs/src/plugins/hitlnew/hitloptionspage.ui
	ground/openpilotgcs/src/plugins/hitlv2/hitlv2optionspage.ui
2012-10-08 15:30:27 +02:00
Stacey Sheldon
157aeac9fc Merge remote-tracking branch 'origin/stac/ppm-and-pwm-inputs' into next 2012-10-06 23:04:49 -04:00
sambas
9212bbeb20 DSMx bindmode delay was too long, satellite binding works again. 2012-10-07 12:09:42 +11:00
James Cotton
c8d9f89ea3 Default DIAG_TASK was on for PipX 2012-10-03 15:11:15 -05:00
James Cotton
897b07da02 Merge remote-tracking branch 'origin/kenz/diag_stack_split' into next 2012-10-02 14:20:08 -05:00
Stacey Sheldon
2f4b1e69dd rcvr: Support PPM and PWM at the same time on CC
Adds a new mode for the receiver port (PPM+PWM) which
will allow simultaneous use of 1 pin for PPM and the
rest of the pins for PWM inputs.
2012-09-29 19:11:48 -04:00
James Cotton
b0d8487e27 PIOS_RFM22: Make the irq return false for the exti changes 2012-09-28 02:14:15 -05:00
James Cotton
8979c00fba Merge branch 'exti_end_switching_isr' into next 2012-09-28 00:41:08 -05:00
James Cotton
519e3e2e3a PIOS_EXTI: Make the line task macro now take in the xHigherTaskPriority variable name 2012-09-28 00:40:36 -05:00
James Cotton
f12d5c04fb Merge remote-tracking branch 'origin/lilvinz/mpu6000_masked_locals_fix' into next 2012-09-27 14:43:54 -05:00
James Cotton
1ba40ee9b0 PIOS_EXTI: Make sure to use pdTRUE instead of true where appropriate. 2012-09-27 14:41:38 -05:00
James Cotton
1721479a12 Fix for vinz' merge to pios_mpu6000 exti changes 2012-09-27 14:34:11 -05:00
James Cotton
a021659b75 Merge remote-tracking branch 'origin/lilvinz/exti_end_switching_isr' into next 2012-09-27 14:31:16 -05:00
Laura Sebesta
8997df2438 Merge branch 'next' into kenz/diag_stack_split
Conflicts:
	flight/Modules/Stabilization/stabilization.c
2012-09-27 19:29:23 +02:00
Laura Sebesta
4923655cd3 Added global flag for enabling all diagnostic tools. 2012-09-27 18:51:12 +02:00
Stacey Sheldon
215ff56fe8 usbcdc: fix handling of CDC SET_LINE_CODING request
The SET_LINE_CODING request contains data and must be
handled as such.

Previously, the only requests that had data were IN
requests.  SET_LINE_CODING is an OUT request so it
required additional changes to support a new type of
data request.
2012-09-24 00:56:25 -04:00
Stacey Sheldon
5e37448814 usb: correct enum for CDC SET_CONTROL_LINE_STATE request 2012-09-24 00:53:52 -04:00
Stacey Sheldon
c056ac5261 usbcdc: don't assert on calls when CDC is not initialized
The CDC interface is always advertised in the FW USB
descriptors.  It is NOT always enabled/initialized at
runtime.  Specifically, it can be Disabled in HwSettings.

Previously, any CDC-related query that the host would send
resulted in an assert and a watchdog.

Now, a suitable return code indicating that the request is
unsupported is returned in this scenario.
2012-09-24 00:53:12 -04:00
Stacey Sheldon
14123069be gdb: add gdb config file for CC BU image 2012-09-16 21:13:42 -04:00
Stacey Sheldon
368d57bc92 Merge remote-tracking branch 'origin/lilvinz/OP-300' into next 2012-09-16 16:05:25 -04:00
lilvinz
a6a7ed8157 pios_exti: added returnvalues to exti handlers which allows to use portEND_SWITCHING_ISR 2012-09-16 21:44:09 +02:00
Stacey Sheldon
05483e2a74 simposix: adapt simposix to addition of relay tuning 2012-09-16 15:40:47 -04:00
lilvinz
524cff1c40 pios_mpu6000: fixed masked locals mistake 2012-09-16 21:25:06 +02:00
lilvinz
718062ed6e pios_led: added support for active_high connected leds 2012-09-16 18:19:27 +02:00
James Cotton
595083c982 PID: Fix small bug in setpoint weighting that had really ugly consequences 2012-09-12 00:07:17 -05:00
James Cotton
4717c376c0 Stabilization: For the inner loop call the setpoint shaping version so that
the derivative term can weight the sticks and gyros independently.
2012-09-11 13:21:53 -05:00
James Cotton
e4a167dca1 PID: Add a pid_apply_setpoint which takes in the setpoint and feedback term
This version allows performing setpoint weighting, currently on the derivative
component.
2012-09-11 13:21:19 -05:00
James Cotton
11b099b1ef Stabilization: Add configuration terms for the derivative calculation to the UAVO and pass
them in to the PID system.
2012-09-11 12:29:38 -05:00
James Cotton
42bbd52d68 PID: Add a function to set the cutoff for the derivative term
Also contains a term for setting the deriative setpoint in the future
2012-09-11 12:27:41 -05:00