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

1595 Commits

Author SHA1 Message Date
James Cotton
46ae7eb17b Merge remote-tracking branch 'origin/bugfix-ground' into heli_stabilization 2011-06-30 19:40:22 -05:00
James Cotton
39e646ae1d Make the rates all work properly in axis lock 2011-06-30 19:38:52 -05:00
zedamota
567e3ffcad OP-542 Board resets with new Uploader
IAP module now checks magic value
2011-06-30 12:17:27 +01:00
James Cotton
a7206361d2 Slightly different way to respond to sticks in axis lock that is much more
responsive and avoids overshoot.
2011-06-26 21:59:54 -05:00
James Cotton
4c0245281d Now we store the gyro bias avoid quashing the initialization correction. 2011-06-25 12:32:06 -05:00
James Cotton
dedbcbfceb Correct nasty bug on range checking for max rate and use the axis lock rate
desired when in that mode.
2011-06-24 11:30:28 -05:00
James Cotton
e6ad21d881 Make gyro bias in deg/s * 100 to calibrate more precisely. 2011-06-24 10:51:07 -05:00
James Cotton
5127d1e7ba Change actuator memory to 900 bytes since it uses less now. 2011-06-24 10:49:36 -05:00
James Cotton
038f955cb1 OP-410 OP-333: Axis lock (heading hold) implemented 2011-06-24 10:38:26 -05:00
James Cotton
ab7ff56d96 Compute initial gyro bias while calibrating to speed up convergence 2011-06-24 10:38:26 -05:00
James Cotton
c0eff41dc6 OP-410 OP-333: Created an Axis-lock setting for stabilization 2011-06-24 10:38:26 -05:00
James Cotton
0a4bbcc12e Added a field for initial gyro bias to speed up initialization. 2011-06-24 10:38:26 -05:00
James Cotton
28501842c3 Expose the rate D term which in simulations seems to help damp oscillations for
high RateKp terms.  However it might be sensitive to gyro noise (vibrations).
In addition it is mathematically similar to lead shapign so probably only use
one or the other.
2011-06-24 10:38:25 -05:00
James Cotton
a09642675c Tweak the integral calculation so it is scaled in ms internally. This avoids a
loss of precision on the accumulation.
2011-06-24 10:38:25 -05:00
James Cotton
373689207a Add a 1-tap IIR filter into the gyros in the feedback path. This will make the
stabilization output a bit more resilient to the high frequency noise from
gyros.  However this value shouldn't be too high as it will increase the phase
delay of the feedback loop and decrease stability.  Default is 5 ms.

Note: this resests the stabilizationsettings object.  Sorry guys.
2011-06-24 10:38:25 -05:00
Stacey Sheldon
d1104d3fdc alarms: lower heap warning and critical thresholds for CC
Free heap on CC is currently 160 bytes so the current thresholds
were causing a continual alarm condition, thus preventing arming.
2011-06-24 10:38:25 -05:00
James Cotton
8976d22fad Merge remote-tracking branch 'origin/OP-159_os_sbus' 2011-06-21 17:51:22 -05:00
Oleg Semyonov
fba201c8b3 usart: move default port numbers from pios_config.h to pios_board.c 2011-06-22 01:32:18 +03:00
unknown
9e632b532e Fix win32 SiTL by adding PiOS CRC and another missing function. 2011-06-20 15:48:05 -04:00
Oleg Semyonov
6272210df7 sbus: some code cleanup (no functional changes) 2011-06-19 14:30:13 +03:00
Oleg Semyonov
59da5055cd usart: make USART ports configurable from make command line
For CopterControl the following make options are available:

USE_TELEMETRY=[YES|NO|1|3]    (default is YES, USART1)
USE_GPS=[YES|NO|1|3]          (default is NO, USART3)
USE_SPEKTRUM=[YES|NO|1|3]     (default is NO, USART3)
USE_SBUS=[YES|NO|1]           (default is NO, USART1 only)
2011-06-18 23:54:32 +03:00
Oleg Semyonov
311902f1f2 sbus: implemented S.Bus stream decoding 2011-06-18 23:19:57 +03:00
Oleg Semyonov
aeda61d252 usart: serial telemetry can be disabled to free USART
It was tested being merged with OP-472_CorvusCorax_CopterControl-Guidance_v3
branch, Spektrum on USART3 and GPS on USART1 and seems to work.

Currently defaults mimic original behavior, that is, if USE_SPEKTRUM
is not defined - define USE_PWM and USE_GPS. Thsi should be refactored
later to make it configurable from the Makefile.

Also it was not ported to the OP MB: it currently does not support the
S.Bus hardware and still has original behavior with the patch. But this
is one more step to dynamic configuration of ports.
2011-06-16 15:06:01 +03:00
Oleg Semyonov
50e819192b usart: make CC USART ports compile-time configurable
TODO: This should be dynamic in the future.
But for now define any compatile combination of:
   USE_I2C (shared with USART3)
   USE_TELEMETRY
   USE_GPS
   USE_SPEKTRUM
   USE_SBUS (USART1 only, it needs an invertor)
and optionally define PIOS_PORT_* to USART port numbers

Defaults are:

#define PIOS_PORT_TELEMETRY 1
#define PIOS_PORT_GPS       3
#define PIOS_PORT_SPEKTRUM  3
#define PIOS_PORT_SBUS      1

#define USE_TELEMETRY
#define USE_GPS

Telemetry, GPS and PWM input are enabled by default.
2011-06-15 22:37:44 +03:00
Oleg Semyonov
d8201ec45b sbus: provide a stub based on Spektrum driver (for CC only) 2011-06-15 22:35:21 +03:00
James Cotton
144f36dfb7 Merge branch 'bugfix-flight' 2011-06-14 10:02:55 -05:00
James Cotton
404c026188 Patch from Zippe to use cycle timer for CPU monitoring. 2011-06-13 00:24:30 -05:00
James Cotton
0f5fe54329 FlashFS: Should clear the 0 sector when wiping flash chip, not 10 bytes in. 2011-06-11 22:31:51 -05:00
Oleg Semyonov
5d0c7fe42e Merge branch 'master' into heli_improvements 2011-06-11 12:19:07 +03:00
Corvus Corax
a7841a523a bugfix: forgot to add header file (pios.posix) 2011-06-10 22:04:54 +02:00
Corvus Corax
47a6643318 PiOS.posix: ported PiOS_CRC to PiOS.posix to fix compilation error on OpenPilot introduced by new dependency 2011-06-10 17:16:15 +02:00
James Cotton
4a59c03b0e OP-493: Unfortuantely have to change stack alarms for this to work :( 2011-06-07 10:31:40 -05:00
James Cotton
bdc9094975 OP-493 OP-505 OP-511: Make up to 6 accessory channels so some can go from
ManualCommand to a camera module and some could go from that camera module to
output (i.e. mixing of inputs to pan tilt with stabilization)
2011-06-06 10:56:31 -05:00
James Cotton
1ecd244aff OP-493 OP-505 OP-511: Fixed bug with the direct mapping where it looked at throttle curve
source instead of directly bypassing
2011-06-06 10:53:55 -05:00
James Cotton
6c6906d61e OP-493: Switch to using Accessory0:2 to match the InstId 2011-06-05 15:38:58 -05:00
James Cotton
99b3a629a8 OP-493: Force three AccessoryDesired objects to always exist. Routing to
Mixing channel now works.  However Accessory desired instances do not show up
in GCS.
2011-06-05 15:38:58 -05:00
James Cotton
a1336e4d03 OP-493: Make sure accessory desired is not a single instance object 2011-06-05 15:38:57 -05:00
James Cotton
8ebd6a83d6 OP-493: Add support to bypass the mixer and route accessory data straight to
outputs.  Warning: This has no failsafes like arming.  We should discuss if
this is appropriate.

In addition accessory objects can be routed throught the mixer for collective
or flaperon.
2011-06-05 15:38:57 -05:00
James Cotton
a1d60cb77d OP-493: Use multiple instances when using multiple accessory channels 2011-06-05 15:38:57 -05:00
James Cotton
1365542103 OP-493: Populate the Accessory Desired from TX 2011-06-05 15:38:57 -05:00
James Cotton
4f47c06547 Merge branch 'saving_crc' into bugfix-flight 2011-06-05 15:37:44 -05:00
James Cotton
624baeda5c Merge branch 'OP-423_Mathieu_GetSet_Uavobjects' into bugfix-flight 2011-06-05 09:48:22 -05:00
James Cotton
0a56129b35 OP-452: Made the CRC calculation run in chunks to balance efficiency and ram
usage, because Stac caught me being lazy :)
2011-06-05 09:05:59 -05:00
James Cotton
56faad594e OP-423: Make sure to unlock semaphore before returning from error condition 2011-06-05 08:41:21 -05:00
James Cotton
599483d5ac OP-152: Save CRC for object and header into flash and only load object if CRC
matches.  Read the flash first bytewise to compute CRC instead of buffering
which is more RAM efficient but very inefficient as it sets up many one byte
SPI transfers.

Also incremented the filesystem magic flag to trigger an automatic flash wipe
on this upgrade.
2011-06-04 18:36:38 -05:00
James Cotton
3e5d02cbaf OP-152: Abstract the CRC code out of uavtalk to allow it to be reused (PT -
feel free to test moving this to the hardware CRC unit)
2011-06-04 18:36:26 -05:00
dankers
3013a092d9 Merge branch 'OP-519_Mathieu_Upgrade_FreeRTOS' into bugfix-flight 2011-06-04 16:42:15 +10:00
Mathieu Rondonneau
7b8d09371b fixing minor compiler error/warnings when compiling OP with DEBUG=NO 2011-06-03 21:47:43 -07:00
Mathieu Rondonneau
31a06a5ae7 OP-423 add set/get uavobjects functions to access objects fields separately. 2011-06-02 21:18:34 -07:00
Mathieu Rondonneau
6e64a546df Remove un-used code 2011-06-02 20:21:26 -07:00