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

78 Commits

Author SHA1 Message Date
sambas
5ded8c6dfc VTOL path fixes
Flight mode fixes
POI mode
AutoLand Tests
Simple stabilization Shortest way yaw fix
GCS map and pathplanner fixes
2013-03-28 18:29:26 +02:00
Oleg Semyonov
8f977a4411 Final step: lot of small fixes, last commit in this commit series
This is the first cleanup pass through makefiles and pios.
Probably it is difficult to track changes due to the nature of them.
I would recommend to look at resulting files and compiled code instead.

NOTE: original branch was rebased and lot of conflicts were fixed on
the way. So do not expect that every commit in this series will be
buildable (unlike original branch). Only final result was tested.

The main goal was to remove as much duplication of code (and copy/paste
errors) as possible, moving common parts out of Makefiles. It still is
not perfect, and mostly no code changes made - Makefiles and #ifdefs only.
But please while testing make sure that all code works as before, and no
modules/options are missed by accident.

Brief list of changes:
- Moved common parts of Makefiles into the set of *.mk files.
- Changed method of passing common vars from top Makefile to lower ones.
- Some pios cleanup, mostly #ifdefs, and all pios_config.h files.
- Many obsolete files removed (for instance, AHRS files, op_config.h).
- Many obsolete or unused macros removed or fixed/renamed (ALL_DIGNOSTICS).
- Unified pios_config.h template. Please don't remove lines for board
  configs, only comment/uncomment them. Adding new PIOS options, please
  propagate them to all board files keeping the same order.
- Some formatting, spacing, indentation (no line endings change yet).
- Some cosmetic fixes (no more C:\X\Y\filename.c printings on Windows).
- Added some library.mk files to move libs into AR achives later.
- EntireFlash target now uses cross-platform python script to generate bin
  files. So it works on all supported platforms: Linux, OSX, Windows.
- Top level packaging is completely rewritten. Now it is a part of top
  Makefile. As such, all dependencies are checked and accounted, no
  more 'make -j' problems should occur.
- Default GCS_BUILD_CONF is release now, may be changed if necessary
  using 'make GCS_BUILD_CONF=debug gcs'.
- GCS build paths are separated into debug and release, so no more obj
  file clashes. Packaging system supports only release builds.
- New target is introduced: 'clean_package'. Now 'make package' does not
  clean build directory. Use clean_package instead for distributable builds.
- Targets like 'all', 'opfw_resource', etc now will print extra contex
  in parallel builds too.
- If any of 'package', 'clean_package', 'opfw_resource' targets are given
  on command line, GCS build will depend on the resource, so all fw_*.opfw
  targets will be built and embedded into GCS. By default GCS does not
  depend on resource, and will be built w/o firmware (unless the resource
  files already exist and the Qt resource file is generated).
- fw_simposix (ELF executable) is now packaged for linux. Run'n'play!
- Make help is refined and is now up to date.

Still broken:
- UnitTests, should be fixed
- SimPosix: buildable, but should be reworked.

Next planned passes to do:
- toolchain bootstrapping and packaging (including windows - WIP)
- CMSIS/StdPeriph lib cleanup
- more PIOS cleanup
- move libs into AR archives to save build time
- sim targets refactir and cleanup
- move android-related directories under <top>/android
- unit test targets fix
- source code line ending changes (there are many different, were not changed)
- coding style

Merging this, please use --no-ff git option to make it the real commit point

Conflicts:
	A lot of... :-)
2013-03-24 13:06:24 +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
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
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
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
9763a70364 Merge remote-tracking branch 'origin/igor/pidt1' into relay_tuning
Conflicts:
	flight/Modules/Stabilization/stabilization.c
2012-09-10 03:10:26 -05:00
Igor Van Airde
8ca99739ed Changed rate controller from PID to PIDT1 to improve flight stability.
Low pass on D-Term makes the D-Term usable to improve flight stability.
Affects rate and stabilize mode.
2012-09-09 13:07:25 +02:00
James Cotton
59d1367d37 Autotuning: Make the output also follow the hysteresis output 2012-08-24 22:45:45 -05:00
James Cotton
a3f1894cd7 Autotuning: Make the estimator require the value to toggle above and below the hysteresis level. 2012-08-24 21:33:08 -05:00
Laura Sebesta
f2ffd1fb99 Changed DIAGNOSTICS flag to be individual to each module instead of global.
The upshot is the stack usage monitor can be turned on at a lower RAM threshold.
2012-08-24 12:04:05 +02:00
James Cotton
9f3c8dddd3 Add a version of the sin lookup table that is in ram instead of flash 2012-08-03 12:15:57 -05:00
James Cotton
490955dbea Use cos_lookup instead of sin_looup(x+90) 2012-08-03 11:34:05 -05:00
James Cotton
50c7641162 Move the PID methods into a standalone library 2012-08-03 09:37:46 -05:00
James Cotton
2723ff4be3 Factor the virtual flybar code out of the stabilization module 2012-08-03 09:37:46 -05:00
James Cotton
aae0e562c6 Create a sine lookup table that is cached in flash and make relay tuning start
ot use this.
2012-08-03 09:37:46 -05:00
James Cotton
924c91ce1e Fix mistake from previous merge with duplicate the STABILIZATIONOMDE_ATTITUDE
case
2012-08-03 09:37:46 -05:00
James Cotton
8565dfbcc3 Factor the relay tuning out of the main stabilization.c file into it's own
tool.
2012-08-03 09:37:46 -05:00
James Cotton
561cf994b0 Reduce the memory footprint of the sin lookup table by using sin(x+pi) =
-sin(x).  Still just needs to move into flash and have some options about
precision when in its own library function.
2012-08-03 09:37:46 -05:00
James Cotton
d0ef95ff9a Fix idiotic bug in the stab_refactor 2012-08-03 09:37:46 -05:00
James Cotton
17878b32f3 Make autotune run within an attitude loop instead of direct rate mode. Easier
for beginners.
2012-08-03 09:37:44 -05:00
James Cotton
44e72d0a70 A big refactoring of stabilization.c to get rid of the two separate loops and
move them into one big structure.  This makes it easier to implement other
modes.
2012-08-03 09:37:44 -05:00
James Cotton
e01c5d5f87 Get online estimation of period and amplitude working 2012-08-03 09:37:44 -05:00
James Cotton
4ac8df6aa8 Make the system perform an online estimate of the period and amplitude of the
oscillation during relay tuning
2012-08-03 09:37:44 -05:00
James Cotton
17a0d3ebb4 Add a relay stabilization mode 2012-08-03 09:37:44 -05:00
James Cotton
4afd9d110e Don't zero the PIDs when the settings are updated. Fixes some quirks from
using TxPID tuning.
2012-07-03 14:19:21 +02:00
James Cotton
46a52fc5ce Apply the virtual flybar stick scaling in stabilization.c because we need to
know the true stick position to dampen the gyros appropriately.
2012-06-04 12:22:39 -05:00
James Cotton
bda3f301cb Rename VBar mode to VirtualBar 2012-06-04 12:22:39 -05:00
James Cotton
4c562b88d1 Make the amount to suppress the gyros adjustable instead of binary 2012-06-04 12:22:39 -05:00
James Cotton
59972d5570 Limit the number of degrees the vbar can deflect. This is good for fast flips
etc.
2012-06-04 12:22:39 -05:00
James Cotton
42ac4018b8 Woops. Fix really nasty bug in vbar mode I introduced. Also fix small bug in
scoping of gyro gain that made it not work.
2012-06-04 12:22:39 -05:00
James Cotton
6719ee8639 Add piro compensation option to the vbar mode 2012-06-04 12:22:39 -05:00
James Cotton
3283b99d4e For hardcode flipping allow full stick to completely override the gyro
feedback.
2012-06-04 12:22:39 -05:00
James Cotton
fe978504bc Add friendly settings for the vbar mode including the VbarTau which acts like
the time constant.
2012-06-04 12:22:39 -05:00
James Cotton
ff1b1a93cf Implement a virtual flybar in a way inspired by behavior of Align 3G which
seems apply a leaky integrator to the swash angle.  This is the similar to what
is done by Phubar (http://code.google.com/p/phubar/) as well although we refer
to the gyro term as the proportional and the flybar angle as the integral
2012-06-04 12:22:38 -05:00
Corvus Corax
64c1ac3bd6 Stabilization: Bugfix: moved queue initialisation to TaskStart where it belongs 2012-05-22 22:19:31 +02:00
Corvus Corax
d32dd0ccd4 Fixed fmod() versus fmodf() usage in flight/... 2012-03-26 04:16:54 +02:00
James Cotton
49a03a868b Merge branch 'altitudehold' into revolution_overo
Conflicts:
	flight/OpenPilot/UAVObjects.inc
	flight/Project/OpenPilotOSX/OpenPilotOSX.xcodeproj/project.pbxproj
	flight/Revolution/Makefile
	flight/Revolution/ins.c
2012-02-07 23:00:29 -06:00
James Cotton
727f0befc5 Make the gyro go a bit more regularly to stabilization but needs updating
regular CC
2012-01-25 22:50:19 -06:00
James Cotton
d2ce7761c5 Add derivative term 2012-01-03 12:37:18 -06:00
James Cotton
53cb5b67d1 Make the revo attitude now use the separate gyro object. CopterControl
attitude still needs an update.
2011-12-12 13:28:35 -06:00
James Cotton
07e3ad10af Force some floating point units to be safe 2011-11-26 15:52:25 -06:00
James Cotton
c36297227d Stabilization fix typo 2011-09-12 11:56:01 -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
482bec497b Revert "Fixed modules that didn't initialize used UAVObjects correctly"
Modules should initialize their settings and the objects they source.  Not just
everything.

This reverts commit 9ad85e9b7b.
2011-08-19 09:44:38 -05:00
Corvus Corax
9ad85e9b7b Fixed modules that didn't initialize used UAVObjects correctly 2011-08-19 13:20:15 +02:00
James Cotton
bbe3c1533a Merge branch 'next' into camera_stabilization 2011-08-10 21:57:45 -05:00