Randy Mackay
865a4de33d
Common: use PACKED instead of pragma pack for Location
2014-03-19 12:12:49 +09:00
Randy Mackay
af186fba05
AP_Common: pack Location structure
...
This resolves issues storing and retrieving Location to eeprom as part
of AP_Mission
2014-03-19 12:11:13 +09:00
Randy Mackay
87126c9b71
Common: remove id and p1 from Location structure
...
id and p1 are now part of AP_Mission's Mission_Command structure
2014-03-19 12:10:46 +09:00
Randy Mackay
9ef27955b5
Common: add location options masks
2014-03-19 12:10:20 +09:00
Andrew Tridgell
77e8061170
AP_Common: added product ID for L3G4200D
2013-10-08 11:50:53 +11:00
Andrew Tridgell
86b58314c4
AP_Common: pack the RallyLocation structure
...
so it can be written as a single binary block
2013-10-03 12:21:08 +10:00
Michael Day
823a40c203
AP_Common: Added RallyLocation struct.
2013-10-03 12:21:08 +10:00
Andrew Tridgell
f1e120113c
AP_Common: added OPTIMIZE() macro
...
this can be used to change the compiler optimization level of
individual functions
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-10-03 12:21:07 +10:00
Andrew Tridgell
13cdc56a5a
AP_Common: removed SMACCM support
2013-09-26 22:38:31 +10:00
Andrew Tridgell
c1d56f74b5
AP_Common: change flymaple product ID to 0x100
...
keep it well away from the Invensense product IDs for the MPU6000
2013-09-24 13:51:28 +10:00
Mike McCauley
8f61a36e58
AP_Common: Flymaple compatibility
2013-09-24 13:33:25 +10:00
Andrew Tridgell
8b80beadc4
PX4: make FMUv2 identify itself differently
...
so we can tell which is which in logs
2013-09-09 18:04:40 +10:00
Andrew Tridgell
97b7130bb9
libraries: update license header to GPLv3
...
we switched to GPLv3 a long time ago, but neglected to update the
per-file license headers
2013-08-30 13:01:39 +10:00
Andrew Tridgell
933088b95a
AP_Common: fixed indent-tabs-mode
2013-05-30 09:52:38 +10:00
Andrew Tridgell
62b9a580e8
AP_Common: make PACKED depend on architecture
...
this will remove lots of warnings when building with arduino
2013-05-09 20:10:31 +10:00
Andrew Tridgell
3659b532be
AP_Common: added BIT_IS_SET() macro
...
makes bit mask testing safer on PX4
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-04-23 23:05:02 +10:00
Andrew Tridgell
4fe5ce8a09
AP_Common: added a define for PACKED
...
neater than a pragma
2013-04-20 13:52:36 +10:00
Jochen Tuchbreiter
c5f19f5df8
Plane: Implement issue 80: counterclockwise loiter
...
- libraries/AP_Common/AP_Common.h: Use bit 2 of Location.options to store
loiter direction
- ArduPlane/defines.h: New bitmask MASK_OPTIONS_LOITER_DIRECTION for struct
Location bit 2
- ArduPlane/ArduPlane.pde: New variable loiter_direction
- ArduPlane/GCS_Mavlink.pde: For mavlink loiter-commands use sign of param3 to
detemine direction. Set Location.option flag accordingly
- ArduPlane/commands.pde: Make sure loiter-directions get saved into EEPROM
correctly
- ArduPlane/commands_logic.pde: Set loiter_direction on all loiter-actions
as well as RTL/instant loiter
- ArduPlane/navigation.pde: Yield loiter_direction in update_loiter
2013-02-05 10:29:31 +11:00
Andrew Tridgell
cf5d102912
AP_Common: added board ID for PX4
2013-01-04 14:26:28 +11:00
James Bielman
a4af314b57
Add AP_HAL_SMACCM implementation.
...
- Add a board definition for SMACCMPilot.
- Support the SMACCM HAL in required utility libraries.
2013-01-03 13:48:06 -08:00
Andrew Tridgell
456e8bfb6e
AP_Common: include stdlib.h for abs()
2013-01-02 14:45:09 +11:00
Andrew Tridgell
ac8fcd5b23
AP_Common: include stdbool.h for ARM
2013-01-02 14:45:09 +11:00
Andrew Tridgell
57bf6531b4
Progmem: use right CONFIG_HAL_BOARD #ifdefs
2013-01-01 18:26:12 +11:00
Andrew Tridgell
3c0440b0b4
Math: use common degrees() and radians() functions
2012-12-20 14:53:22 +11:00
Pat Hickey
eb530b86e8
move Arduino.mk to /mk/Arduino.mk
2012-12-20 14:52:35 +11:00
Andrew Tridgell
28f0ce6185
Build: use -O0 for SITL
2012-12-20 14:52:33 +11:00
Andrew Tridgell
475496cee2
Revert "Arduino.mk: use target variables rather than recursive make for apm1, apm2.."
...
This reverts commit fcd58cc1d7892bb8b45db75c35e1bdccaa2d47bb.
still doesn't work ...
2012-12-20 14:52:33 +11:00
Andrew Tridgell
975506c840
Build: add debugging in SITL build
2012-12-20 14:52:33 +11:00
Pat Hickey
8fe3c5e5d6
Arduino.mk: use target variables rather than recursive make for apm1, apm2..
2012-12-20 14:52:31 +11:00
Andrew Tridgell
6a56f72918
Build: added empty Arduino.h
2012-12-20 14:52:30 +11:00
Andrew Tridgell
d473203737
Build: added global board targets
2012-12-20 14:52:30 +11:00
Pat Hickey
d93d932831
ArduCopter: defines fixes
...
Conflicts:
libraries/AP_Common/Arduino.mk
2012-12-20 14:52:28 +11:00
Andrew Tridgell
9b15d0e714
Build: update makefile for SITL build
2012-12-20 14:51:40 +11:00
Pat Hickey
da99f5f283
Arduino.mk: compile with CONFIG_HAL_BOARD define from the user's config.mk
2012-12-20 14:51:37 +11:00
Pat Hickey
fff4e87619
Arduino.mk: allow user avrdude flags
2012-12-20 14:51:36 +11:00
Pat Hickey
f490f2432d
Arduino.mk: norelax.inoflag will disable -Wl,--relax on a per sketch basis
...
* Some weird avr-ld bug that hits on 4.6.2 Fedora. Didn't have time to
investigate further.
2012-12-20 14:51:29 +11:00
Andrew Tridgell
3a2e138994
AP_Common: no c++ magic for PX4 build
2012-12-20 14:51:28 +11:00
Pat Hickey
a4f1f6a5db
AP_Progmem: fix dependencies for all sketches touched by AP_HAL_AVR
2012-12-20 14:51:28 +11:00
Pat Hickey
5c738810e2
AP_Progmem created: progmem macros per specific platform
...
* derived from AP_Common
2012-12-20 14:51:28 +11:00
Pat Hickey
a2f97ac7c7
AP_Common.cpp: Delete empty cpp file
2012-12-20 14:51:28 +11:00
Pat Hickey
f58935d1e7
AP_Common c++ lib: eliminate freeMemory and displayMemory
...
* also, no more error message in pure virtual call
2012-12-20 14:51:28 +11:00
Pat Hickey
9f9c183a4d
remove AP_Vector.h as deprecated
2012-12-20 14:51:28 +11:00
Pat Hickey
6a59ad143e
AP_Curve: made into its own library
2012-12-20 14:51:27 +11:00
Pat Hickey
f8047f158d
Arduino.mk: Changes to asm opts for compatibility with avr-gcc4.6
...
* Need to make sure these are compatible with older toolchains
before pushing to master
2012-12-20 14:51:26 +11:00
Pat Hickey
0d342a3293
AP_Common: use EXCLUDECORE macro to hack some debug messages away
2012-12-20 14:51:19 +11:00
Pat Hickey
7854c54880
Arduino.mk: when core is excluded, add -DEXCLUDECORE to flags
2012-12-20 14:51:19 +11:00
Pat Hickey
4493dbb4d2
Arduino.mk: support nocore.inoflag to do coreless builds of each sketch
2012-12-20 14:51:19 +11:00
Pat Hickey
b34d4cdb17
Remove empty AP_Var_menufuncs.cpp
2012-12-20 14:51:19 +11:00
Pat Hickey
3f1d9d7f69
AP_Param: #include <AP_Param.h> fixups for libraries & sketches
...
* I mostly went through with grep and added an #include <AP_Param.h> below
every #include <AP_Common.h>. Not all of these example sketches might
strictly need AP_Param.
2012-12-20 14:51:19 +11:00
Pat Hickey
c4dbe8c627
AP_Param: move from AP_Common to its own library
2012-12-20 14:51:19 +11:00
Pat Hickey
e82d1402ef
AP_Loop: moved to APO library, which is the only code that uses it
2012-12-20 14:51:19 +11:00
Andrew Tridgell
3c88b0d204
AP_Param: fixed Vector3f elements with 16 character names
2012-11-20 22:27:11 +11:00
Andrew Tridgell
b0713ba412
AP_Param: support up to 16 character parameter names
...
MAVLink allows for 16 chars, with no null termination if all 16 are
used
2012-11-20 21:35:22 +11:00
Andrew Tridgell
736cb4c34b
AP_Var: move the MetaClass lib into AP_Var
...
AP_Var is the only one that uses it, and it generates warnings in our
build if we leave it in AP_Common
2012-11-06 21:42:54 +11:00
Andrew Tridgell
ef919c4e36
AP_Param: fixed a bug with setting nested parameters
...
This bug meant that setting a parameter in a parent class for a doubly
nested parameter group, where the parameter index in the parent class
is 4 or greater would actually set the first element in that parent
class.
At the moment only one parameter fits these narrow constraints - the
RCn_DZ element of the RC_Channel_aux class. So if someone set RC5_DZ
to 17 in ArduPlane it would actually set RC5_MIN to 17.
2012-11-05 22:08:43 +11:00
rmackay9
79fc5f072e
AP_Curve: replace Serial.print with Serial.print_P to save 18 bytes of memory
2012-10-22 16:40:57 +09:00
Pat Hickey
1bf21aae20
AP_Menu: create new library with menu from AP_Common
2012-10-18 20:50:16 -07:00
Pat Hickey
76e93e9fd7
AP_Common: PSTR def has specific version for avr-gcc 4.6 compatibility
...
* Also a small change in FastSerial/vprintf.cpp, which duplicates the
PSTR definition
* Won't effect others using earlier versions of avr-gcc
2012-10-15 20:42:18 -07:00
Pat Hickey
5796ee91ca
AP_Semaphore: make into separate library rather than part of AP_Common
2012-10-09 10:55:06 -07:00
rmackay9
23442f9caf
AP_Semaphore: added new library to help remove conflicts over SPI bus
2012-10-06 12:41:35 +09:00
Andrew Tridgell
e761645e24
AP_Param: added find_by_index()
2012-09-20 07:42:35 +10:00
rmackay9
93ae29a3e9
ArduCopter: added throttle curve (although disabled by default) for all multicopters
2012-09-18 23:05:08 +09:00
uncrustify
f3945772e9
uncrustify libraries/AP_Common/AP_Vector.h
2012-08-21 19:19:51 -07:00
uncrustify
953cab5c5f
uncrustify libraries/AP_Common/AP_Test.h
2012-08-21 19:19:51 -07:00
uncrustify
4b60e53736
uncrustify libraries/AP_Common/AP_Loop.h
2012-08-21 19:01:03 -07:00
uncrustify
7d438cd65d
uncrustify libraries/AP_Common/include/menu.h
2012-08-21 19:01:02 -07:00
uncrustify
6bb8e4e8ac
uncrustify libraries/AP_Common/AP_Common.h
2012-08-21 19:01:02 -07:00
uncrustify
0c99546f45
uncrustify libraries/AP_Common/AP_MetaClass.h
2012-08-21 19:01:02 -07:00
uncrustify
e79d9adea0
uncrustify libraries/AP_Common/c++.h
2012-08-21 19:00:52 -07:00
uncrustify
3a26b94af2
uncrustify libraries/AP_Common/tools/eedump.c
2012-08-21 19:00:51 -07:00
uncrustify
4a50e56a48
uncrustify libraries/AP_Common/tools/eedump_apparam.c
2012-08-21 19:00:51 -07:00
uncrustify
3e4507a4a2
uncrustify libraries/AP_Common/menu.cpp
2012-08-21 19:00:51 -07:00
uncrustify
09c4f76b57
uncrustify libraries/AP_Common/AP_Param.cpp
2012-08-21 19:00:51 -07:00
uncrustify
c18e73a54d
uncrustify libraries/AP_Common/c++.cpp
2012-08-21 19:00:51 -07:00
uncrustify
ca476e5851
uncrustify libraries/AP_Common/examples/menu/menu.pde
2012-08-21 19:00:51 -07:00
Pat Hickey
42e24a869f
uncrustify libraries/AP_Common/AP_Param.h with fixups by hand
2012-08-21 19:00:51 -07:00
rmackay9
976679208c
AP_Common: change a few more "int" to "int16_t"
2012-08-18 18:05:18 +09:00
Andrew Tridgell
c70bae9617
AP_MetaClass: fixed a warning
2012-08-09 16:19:04 +10:00
Andrew Tridgell
7f4b7703c1
AP_Param: fixed some build warnings
2012-08-09 16:18:53 +10:00
Andrew Tridgell
e6e25525bc
AP_Param: avoid saving values within 0.01% of the default value
...
this saves some more space due to rounding errors
2012-08-08 13:13:30 +10:00
Andrew Tridgell
c298d5130f
AP_Param: major update to use default values in var_info table
...
this stores the default value for all scalar variables in the var_info
table, which makes it possible to avoid storing default values in
eeprom. That allows us to oversubscribe the eeprom space with a much
lower risk of overrun.
2012-08-08 12:11:57 +10:00
Andrew Tridgell
e1725e9ea5
AP_Param: added some docs on the eeprom header format
2012-07-10 14:03:49 +10:00
Andrew Tridgell
9d221b3625
AP_Common: fixed some duplicate product ID warnings
2012-05-17 23:37:32 +10:00
Craig Elder
69bf5700cd
IMU: expose IMU_PRODUCT_ID as EEPROM Variable
...
this will allow us to log the Product ID in tlogs
2012-05-09 18:30:36 -07:00
Craig Elder
4c46955612
PRODUCT: Define product IDs for all supported products
2012-05-09 18:30:36 -07:00
Andrew Tridgell
4f90e6e844
build: cope with Arduino 1.0 in command line build
...
this should autodetect 1.0 versus older builds
2012-04-27 15:38:42 +10:00
Amilcar Lucas
6e9ffb4249
correct small typos in comments
2012-03-11 21:30:09 +01:00
Andrew Tridgell
f4329d2680
AP_Param: ensure we can't have duplicate keys in Parameters.h
...
this is O(n^2), but only at startup, and takes less than 1ms to run.
It catches a very nasty coding error
2012-03-02 15:48:28 +11:00
Pat Hickey
337af0c7a2
AP_Param: nested group recursion into next_group disableable by macro
...
* c.f. 0251932c81fe7eb, e5515bb6ef82
2012-02-29 19:48:43 -08:00
Pat Hickey
2648694489
AP_Param: One more nexted group recursion disableable by macro
...
* c.f. e5515bb6ef82
2012-02-29 18:48:54 -08:00
Pat Hickey
eac8b66385
AP_Param: Make nested group recursion disableable by macro
...
* Eliminates recursive calls inside AP_Param.
This is important to Pat @ Galois, but not the project in general.
Recursion depth on these functions is bounded structurally using
existing nested group constructors (can't create loops in finite space)
and checked at init time
2012-02-28 16:28:27 -08:00
Andrew Tridgell
cb52b6c6d9
AP_Param: show numerical value in eeprom dump utility
2012-02-28 09:43:49 +11:00
Andrew Tridgell
a432232db9
AP_Param: fixed v.load() on a sub-element of a AP_Vector3f
...
this isn't actually used at the moment in APM, but we should get it
right in case someone does try to load a single element of a vector
2012-02-28 09:43:49 +11:00
Andrew Tridgell
87a6d97f7b
AP_Param: fixed setting of CAM_P_G in ArduCopter
...
the variable CAM_P_G has the same prefix as the CAM_P group. We want
to allow for parameters having a common prefix with a group, so we
need to keep searching after we've found a group that matches the
prefix
2012-02-27 10:54:33 +11:00
Andrew Tridgell
fa443bd928
AP_Param: make the templating code a bit clearer
...
add comments on the arguments, and name them in a clearer way
2012-02-27 10:54:33 +11:00
Andrew Tridgell
f10097a6d5
AP_Param: added some comments on AP_Vector3f handling
2012-02-25 11:37:20 +11:00
Andrew Tridgell
2e9105c68a
AP_Param: added special handling for Vector3f
...
We would like to be able to use Vector3f as a parameter while exposing
the individual elements of the vector as MAVLink parameters. This
change to AP_Param makes that possible, by giving AP_Vector3f a dual
personality
2012-02-25 11:37:20 +11:00
Andrew Tridgell
53b87229ff
AP_Param: added ParamToken type for variable list traversal
2012-02-19 17:05:28 +11:00
Andrew Tridgell
882cd4ea83
AP_Param: moved AP_Vector3f and AP_Matrix3f declarations to AP_Math.h
...
this avoids us needing AP_Math.h in every utility sketch and example
2012-02-18 10:51:57 +11:00
Andrew Tridgell
4b15b63d21
AP_Param: fixed copy-assignment operators for AP_Param vectors
2012-02-18 10:51:57 +11:00