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

2820 Commits

Author SHA1 Message Date
Oleg Semyonov
ea1199603b Merge remote-tracking branch 'origin/rel-12.10.2' into next
Conflicts:
	MILESTONES.txt
2012-11-29 17:31:50 +02:00
Erik Gustavsson
4312652241 Use enum to index array.
Replace 0 with 0.0f in assignment.
2012-11-29 00:03:39 +02:00
Erik Gustavsson
5e14f5352f Minor codestyle/whitespace cleanup 2012-11-29 00:03:38 +02:00
Erik Gustavsson
dc5394dcf3 Add setting to suppress axis output from Stabilization module until armed and throttle is applied. Useful to keep the tail prop out of the grass while arming a tri. 2012-11-29 00:03:37 +02:00
Oleg Semyonov
96c7ec37a9 Merge remote-tracking branch 'origin/hyper/flight_uavo_access_type_safety' into next 2012-11-24 16:33:19 +02:00
Richard Flay (Hyper)
5864219d27 Removed __attribute__((always_inline)) after review discussions. 2012-11-23 07:15:28 +10:30
Oleg Semyonov
1fbaaddcd4 Merge branch 'stac/stop-wasting-ram' into next 2012-11-19 01:51:37 +02:00
Stacey Sheldon
f0fb22c090 uavobjectmanager: initialize new uavo_handles section
The uavo_handles section is not part of the .data segment so
it doesn't get automatically zeroed during the startup code.

This led to random data being stored in the table which resulted
in bus errors at runtime.

This change ensures that the table is zeroed before we start to
use it.
2012-11-18 16:48:13 -05:00
Stacey Sheldon
c1fc605696 uavobjectmanager: remove linked list for UAVOs 2012-11-14 23:38:24 -05:00
Richard Flay (Hyper)
6c0b91dee7 Minor tweak for coding standard compliance. 2012-11-15 07:45:35 +10:30
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
Stacey Sheldon
e5c54cca00 freertos: change default alignment to 4-byte from 8-byte
There shouldn't be any reason to need 8-byte alignment on the
F1 platform.  This allows better packing of all malloc'd data.

Reducing this below 4-byte alignment is not recommended and will
likely result in misaligned pointers being passed to peripherals.

RAM savings is another 300 bytes.
2012-11-11 22:16:00 -05: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
Stacey Sheldon
e2b019edd9 telemetry: stop registering periodic events for non-periodic UAVOs
Telemetry module was iterating over all UAVOs including
meta UAVOs and creating a periodic event item for each
object.  These items cost us about 32 bytes for each list
item.

This is wasteful for two main reasons.  First, meta UAVOs can't
meaningfully have periodic updates so excluding them entirely
makes sense.  That halves the number of objects in this list since
there is one meta object for every data object.  This is worth
about 500 bytes of RAM on CC.

Second, about half of the remaining UAVOs are not periodic by
default so they're wasting memory unless someone happens to want
to make them periodic at runtime.  This is worth another 450 bytes
of RAM on CC.

So, objects that are configured as periodic during board init will
support all of the periodic config at runtime.  Objects that are
*not* periodic during board init can only be made periodic on the
next boot.

Each object that you make periodic during init will cost you an
extra 32 bytes of RAM.

With erased settings, free RAM comparison for CC is:
  Before: 2736 bytes free
  After:  4048 bytes free

Total RAM savings with this update is 1312 bytes!
2012-11-10 18:04:16 -05: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
Richard Flay (Hyper)
eda6b6a24a Improved type-safety. Replaced flight side UAVO access macros with inline functions to ensure that correct pointer types are always passed to UAVO access functions. 2012-11-10 20:47:10 +10:30
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