Commit Graph

57303 Commits

Author SHA1 Message Date
jasonshort a6d8242263 Changed "rate" var to float from long.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1476 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 02:28:59 +00:00
jasonshort bb7e3af943 Moved implementation of alt hold from NG to ACM.
Tweaked the nav pitch and roll commands to no longer use bearing error.
Angle boost is now a lot less thrust. I was getting too much added thrust when pitched at 45°

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1475 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 02:24:26 +00:00
jasonshort 1a9a76c2ab Added Sonar to setup, removed Level, compass is now done with text based on and off, compass renamed to mag_offset
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1474 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 02:21:09 +00:00
jasonshort b6f8c1b6cb Added Sonar throttle gains,
new default dampening gain - STABILIZE_DAMPENER - which should be equivalent to NG.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1473 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 02:18:49 +00:00
jasonshort 6c9a59541e Added Sonar throttle PID, renamed old throttle PID
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1472 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 02:15:24 +00:00
jasonshort f7cd2301d2 Added Sonar throttle PID
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1471 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 02:13:57 +00:00
jasonshort 842f3c569c Added Sonar and Baro enumerations
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1470 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 02:13:23 +00:00
DrZiplok@gmail.com eb39264834 Update the NMEA example code in conjunction with the new parser.
Added an init string for SiRF receivers that will bring them back out of the binary mode configuration that AP_GPS_Auto sets them to.  

Picked up the GPS logging format from the AP_GPS_Auto test.



git-svn-id: https://arducopter.googlecode.com/svn/trunk@1469 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 01:57:16 +00:00
DrZiplok@gmail.com cad260a481 Implement a completely new NMEA parser based on the TinyGPS parser by Mikal Hart.
Major new features:

 - No RAM buffer for the NMEA message being parsed; saves 120 bytes of RAM.
 - More robust parser, a little less likely to be confused by bad messages.
 - Added configuration strings for SiRF, ublox and MediaTek GPS in NMEA mode to select just the messages of interest.

Note that the issue that TinyGPS has with co-ordinates with "different" numbers of decimal digits is addressed in this code.

Size is comparable to the old parser.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1468 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 01:55:45 +00:00
DrZiplok@gmail.com 1bfcdaa2cb Add a delay after sending the GPS mode switch strings in an attempt to give any NMEA data time to drain before we attempt to sniff again.
Otherwise, we can end up settling on NMEA as a mode just after switching a SiRF GPS to binary mode.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1467 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 01:50:42 +00:00
DrZiplok@gmail.com dd6ede36ee Add more unit tests for AP_Var.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1466 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 01:44:23 +00:00
DrZiplok@gmail.com 6366cdc094 Add more documentation for AP_MetaClass.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1465 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 01:43:41 +00:00
DrZiplok@gmail.com 44cac7a853 Add a new macro PROGMEM_STRING that can be used to define a constant string in program memory.
This is a partial workaround for not being able to use PSTR at global scope, e.g. in an argument to a constructor; it makes the intent of the otherwise somewhat bulky declaration of the string more obvious.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1464 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 01:42:59 +00:00
DrZiplok 07dec5e1b7 Use operator new from AP_Common rather than our own. This also makes AP_Common available to the GPS drivers that work with AP_GPS_Auto.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1463 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 01:19:15 +00:00
DrZiplok@gmail.com 8c9a5d36d8 Add documentation and reformat closer to our current code standard.
Add support for re-opening a port without changing the baudrate or buffer sizes.  By passing zero for the parameters that aren't to be changed, code can reconfigure a port without needing to know how it was originally configured.





git-svn-id: https://arducopter.googlecode.com/svn/trunk@1462 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 01:17:03 +00:00
DrZiplok 2c0e8515d5 Add a date field to the standard GPS data. This may be zero, and its format is TBD (may be GPS-dependent).
Increase the no-data timeout to slightly more than a second, so that GPS' with a 1Hz update rate don't cause problems.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1461 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 00:44:09 +00:00
rmackay9@yahoo.com 1448b6991e AP_RangeFinder_test.pde - corrected some inaccurate comments in the code
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1459 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-09 14:20:26 +00:00
DrZiplok e299d5f58a Add a flags byte to variables, and implement a "no auto load" bit that opts variables out of load_all / save_all.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1449 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-05 17:56:46 +00:00
DrZiplok c0de571afd Save AP_Var's initial value as a default value, and add a function for restoring the default value.
Fix the AP_Var::lookup cache, which was very busted.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1448 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-05 09:25:07 +00:00
DrZiplok 0e868ca343 More unit tests.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1447 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-05 07:40:35 +00:00
DrZiplok 765cef724d Fix the assignment operator overload for AP_VarT so that direct assignments to the type work correctly.
Add a variant of AP_Float that stores the value as Q5.10 (16-bit fixed-point) to save EEPROM space.


git-svn-id: https://arducopter.googlecode.com/svn/trunk@1446 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-05 07:40:06 +00:00
DrZiplok 814a16000a Simplify FastSerial::begin baudrate calculations in line with the changes made in Arduino-0022
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1424 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-04 18:41:27 +00:00
jasonshort 538e0ec2bb Added Tri-copter support for Max
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1421 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-04 17:55:03 +00:00
rmackay9@yahoo.com f28b5f1c04 ArduCopterNG - fixes to sonar/barometer altitude hold. Fixes bugs including:
1. bad values from sonar were allowed to feed into altitude PID control leading to little hops
     2. barometer altitude hold was disabled if sonar wasn't present

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1420 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-04 14:38:17 +00:00
rmackay9@yahoo.com e0607712a3 AP_RangeFinder - tiny bit of extra initialisation on table holding averages
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1419 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-04 14:33:29 +00:00
DrZiplok@gmail.com d8046957c6 Unit tests for scope-based address offsetting.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1418 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-04 08:50:24 +00:00
DrZiplok@gmail.com 63643f73fc Move the AP_Var ctor out of the class definition; it's big enough that we don't want to inline it.
AP_Vars with either a name or an address are 'interesting' (the latter so we can save_all).

Add the concept of address offsets to scopes.  Now we have a container that we can put AP_Vars into that can be moved around in the EEPROM.  This will make it easier for things like the PID library which need to support multiple instances getting their parameters from different parts of the ROM.

Improve documentation.

Suck it up and admit that we aren't going to do "identity"-based addressing for the EEPROM and just call the property "address".



git-svn-id: https://arducopter.googlecode.com/svn/trunk@1417 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-04 08:49:55 +00:00
DrZiplok@gmail.com d2bd744244 Metaclass improvements:
- Add a default ctor/dtor pair.  The dtor ensures that all dtors are virtual, and guarantees that there is something in the dtor vtable slot for classes that don't implement their own.
 - serialize must not alter the class, mark it const
 - Improve documentation
 - Fix handle validation to prevent trying to read 2 bytes beyond the end of memory


git-svn-id: https://arducopter.googlecode.com/svn/trunk@1416 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-04 08:46:01 +00:00
jasonshort 87a1043f25 Added Tri-copter support for Max
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1414 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-04 06:54:40 +00:00
DrZiplok@gmail.com d7fccd1aa9 Checking these in makes the libraries too bulky. We need to host them somewhere.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1413 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-04 06:22:02 +00:00
jasonshort ff256d95e2 Added Tri-copter support for Max
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1412 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-04 06:06:26 +00:00
rmackay9@yahoo.com 9c9c541a51 ArduCopterNG -
#1 - changed GPS hold to ver2 which builds up PID's I term on the long + lat instead of roll+pitch.
#2 - added ability to use Sonar and Barometer at the same time for altitude control (it uses Sonar if available, but if not uses Barometer).


git-svn-id: https://arducopter.googlecode.com/svn/trunk@1405 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-03 04:37:23 +00:00
rmackay9@yahoo.com ef673e5162 AP_RangeFinder - changes to allow sonar to work using pitot tube. Also moved most functionality into RangeFinder class instead of child classes.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1404 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-03 04:17:43 +00:00
DrZiplok 57f3f4e65b Beef up the unit tests for AP_Var. Most of the basic functionality is now covered.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1403 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-03 02:29:17 +00:00
DrZiplok 277105c437 Rename the base class for variables AP_Var; less confusing, less to type. Rename the template type instead.
We don't need any of the arithmetic overloads, so strip them.

Fix includes.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1402 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-03 02:28:35 +00:00
DrZiplok ea9c7859f8 Don't allow the default serialize/unserialize to be inlined.
Fix some includes and remove an old implementation of meta_cast.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1401 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-03 02:26:18 +00:00
DrZiplok a02136236f Add the ability to find the sketchbook when called from a Makefile in a library example.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1400 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-02 22:16:21 +00:00
DrZiplok a3a9fe59e3 Following discussions with James, a complete rewrite of AP_Var.
The overriding principle here is to keep the use of AP_Vars as simple as possible, whilst letting the implementation do useful things behind the scenes.  To that end, we define AP_Float, AP_Int8, AP_Int16 and AP_Int32.  These are strongly typed, so that there is no ambiguity about what a variable "really" is.

The classes behave like the variables they are storing; you can use an AP_Float in most places you would use a regular float; you can add to it, multiply by it, etc.  If it has been given an address in EEPROM you can load and save it.

Variables can be given names, and if they are named then they can be looked up.  This allows e.g. a GCS or a test tool to find and traffic in variables that it may not explicitly know about.

AP_Var does not attempt to solve the problem of EEPROM address space management.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1399 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-02 22:14:36 +00:00
jasonshort 8ce92b6711 Big update - motors re-assigned to new positions.
New, fabulous Yaw control.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1398 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-02 20:34:42 +00:00
rmackay9@yahoo.com cc86861b26 ArduCopter - moved to "legacy_do_not_use" directory
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1393 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-01 15:06:42 +00:00
rmackay9@yahoo.com 851101218d APM_Compass - moving to "legacy_do_not_use" directory
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1391 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-01 15:00:32 +00:00
DrZiplok 68be029a17 Don't define constant AP_Var's extern
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1381 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-01 00:31:39 +00:00
rmackay9@yahoo.com a8349f3b74 ArduCopterNG - Sonar - modified code to use AN5 to match the wiki
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1380 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-31 23:58:34 +00:00
james.goppert 634f2734b5 Added AP_Controller library.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1379 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-31 06:20:28 +00:00
james.goppert 4e421a319a Updated docs.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1377 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-30 07:51:53 +00:00
DrZiplok@gmail.com cd341cef90 We should call imu.update() before asking for accel/gyro values so that we get timely, fresh numbers.
Most other consumers of the accel/gyro values should be asking us for them anyway.  At that point, what they are getting are the values we sampled here.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1376 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-30 07:52:35 +00:00
james.goppert 3f30b897fa Fixed non-standard value in RcChannel examples.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1375 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-30 07:43:56 +00:00
jasonshort 95e66d9f06 git-svn-id: https://arducopter.googlecode.com/svn/trunk@1374 f9c3cf11-9bcb-44bc-f272-b75c42450872 2010-12-30 07:41:43 +00:00
jasonshort 852c9e3cc8 git-svn-id: https://arducopter.googlecode.com/svn/trunk@1373 f9c3cf11-9bcb-44bc-f272-b75c42450872 2010-12-30 07:40:57 +00:00
james.goppert 5b79ed9f53 Updated RcChannel examples.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1372 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-30 07:02:56 +00:00