Commit Graph

1144 Commits

Author SHA1 Message Date
DrZiplok@gmail.com 6cf396074b Implement the missing AP_Var_group::*serialize functions.
Rather than implementing empty default constructors, make sure that AP_Var and friends have useful default constructors instead.  This works around AP_Meta_class::meta_cast requiring a default constructor without having empty ctors scattered around.

Add accessors to AP_Var so that the global variable list can be traversed and the group/variable relationship comprehended by outsiders.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1523 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-22 18:42:44 +00:00
DrZiplok@gmail.com d53844c52d Implement a pure data serialisation load/save model for AP_Var.
The format is a simple TLV format; a tag identifying the variable, a length for the variable, and then the actual data.  This format could ultimately be extended to include waypoint/commands as well.

This allows us to load and save groups of variables to EEPROM without having to have a static EEPROM map.

Still needs unit tests and (probably) bugfixing.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1522 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-22 08:37:52 +00:00
jasonshort 64d061a79f cleaning up the instructions for use
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1519 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-21 06:10:26 +00:00
jasonshort 02fae1d48d minor navigation updates, added new copter friendly altitude control for navigating waypoints.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1518 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-21 05:28:01 +00:00
jasonshort e26b2dab67 made I term 0 by default
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1517 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-21 04:16:11 +00:00
jasonshort b074312487 New updated CLI for setup. Cleaner and better defaults and reporting of values.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1516 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-20 07:11:21 +00:00
jasonshort 96262f3bcd changed casting
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1515 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-19 01:48:23 +00:00
jasonshort e0298b6e58 removed access to kD = use the dampener instead
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1513 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-18 19:02:54 +00:00
jasonshort cf55b0f93f updated the stabilize_dampener variable
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1512 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-18 19:00:07 +00:00
jasonshort 4c34b46e14 Added current total to the log. Logging at a lower rate. decreased size to ints.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1511 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-18 06:12:11 +00:00
jasonshort d542c75d6e Added current total to the log. Logging at a lower rate. decreased size to ints.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1510 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-18 06:11:48 +00:00
james.goppert 8ec3a8de4a Updated AP_RcChannel for AP_Var.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1509 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-18 04:56:45 +00:00
jasonshort f60602d7a9 Renamed the loop timers to gain a new medium loop delta. Fixed an issue with the navigation timer. Updated the current sensing. Need to add a low voltage or current trigger.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1508 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-18 02:48:44 +00:00
mich146@hotmail.com dbb40ad9a4 Reinstate Float loading and saving
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1507 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-17 22:57:48 +00:00
deweibel@gmail.com 82e6e29d2f Add initial values for scaling and dead zone to RC_Channel constructor
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1506 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-17 04:05:48 +00:00
jasonshort feb3f1a811 Added support for the AttoPilot Current sensor, Logging current is enabled at 10hz,
Trim is now called again on pitch and roll, now that trimming can be done with adc_offsets. Fixed setup::motors for x frame.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1505 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-17 03:44:12 +00:00
deweibel@gmail.com c9788d7b0b Add back AP_GPS_IMU to provide Xplane functionality
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1504 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-17 01:50:34 +00:00
jasonshort 709b56f477 Added getter functions to accels
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1503 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-16 20:42:11 +00:00
DrZiplok@gmail.com ea3570ded0 Formatting and naming changes for conformance with the ArduPilot Coding Conventions.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1502 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-16 09:14:21 +00:00
jasonshort d7418d4fc4 removed unused EEPROMB include
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1501 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-16 03:53:30 +00:00
jasonshort 53b2560412 Flipped the signs. Should be right.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1500 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-16 02:44:30 +00:00
jasonshort 3558567aad Added new leveling command. Hold the trainer swicth - ch7- in and the copter will adjust the ADC_OFFSET based on the roll and pitch command needed to straighten the copter.
no roll and pitch input means no change. Flicking will still update the throttle cruise value. Please check I have the signs correct!!!

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1499 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-16 02:37:35 +00:00
DrZiplok 91efbeac56 Deal more gracefully with the case where the incoming PPM stream has more than 8 channels encoded.
This makes it possible to move one resistor on the APM board and feed it PPM directly from a receiver emitting a PPM stream.



git-svn-id: https://arducopter.googlecode.com/svn/trunk@1498 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-15 19:32:04 +00:00
rmackay9@yahoo.com 067ddc4802 TradHeli - updated Heli.h to use AP_Compass instead of the outdated APM_Compass. Also changed autopilot on/off switch to be consistent with Quad.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1497 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-15 01:41:51 +00:00
jasonshort 78095b1dd7 Implemented new DCM based yaw independent heading controller.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1495 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-13 01:31:05 +00:00
DrZiplok e552b7c7e1 Update to current MAVLink dev branch protocol version. This has NOT been tested yet.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1494 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-12 08:57:54 +00:00
DrZiplok 3f663597b5 Based on explaining AP_VarNoAddress to Doug, improve the description of the value.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1491 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-12 02:43:25 +00:00
jasonshort d1052612ac added better default value for longitude scaling
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1490 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-11 21:22:54 +00:00
jasonshort 76efe23cd7 added new FBW test to develop new nav functions
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1489 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-11 21:16:00 +00:00
jasonshort 41bdcfee48 added new PID nav functions to split lat and long based on Randy's work.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1488 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-11 21:15:08 +00:00
jasonshort fb5609d3eb added new PID nav functions to split lat and long based on Randy's work.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1487 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-11 21:15:02 +00:00
jasonshort 40b4c0d8ac added new PID nav functions to split lat and long based on Randy's work.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1486 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-11 21:14:57 +00:00
jasonshort 754c7bc710 added new PID nav functions to split lat and long based on Randy's work.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1485 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-11 21:13:30 +00:00
jasonshort 5d1df69f13 added reset I functions for new pids
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1484 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-11 21:12:57 +00:00
jasonshort 5d728c0530 deprecated older method of finding pitch and roll
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1483 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-11 21:12:29 +00:00
jasonshort 085af4f8a2 increased PitchMax to 22 to match NG
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1482 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-11 21:11:51 +00:00
gigiorm 8531e085a1 This is just a test for SVN
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1481 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-11 02:42:53 +00:00
DrZiplok@gmail.com 3cdeffa372 Bring AP_GPS_Auto closer to ready for prime-time:
- disable NMEA autodetection; false positives are still a risk
 - trim down the console output to a minimum; we still need something to help users diagnose potential problems, but the old output was much too verbose
 - rather than block forever, only do one autodetect pass for each ::read call.  That's still too long (five seconds or so) but better than blocking forever.
 - don't block forever if no GPS is attached.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1480 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 08:20:41 +00:00
DrZiplok@gmail.com b88cfe92f4 Extend the logic that preserves buffer sizing on re-begin by also avoiding freeing and re-allocating buffers when they don't change in size.
This can make re-opening a port faster (as the free/malloc pair can be avoided) and possibly more robust (in the case where e.g. the heap has been corrupted).

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1479 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 08:17:31 +00:00
jasonshort 0a07b25e39 renamed err to altitude_error
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1478 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 02:49:45 +00:00
jasonshort 81c44ffec7 not used
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1477 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 02:29:16 +00:00
jasonshort de796598bf 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 1ec8861641 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 4191adec7d 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 e69075ffb7 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 5b3830694d 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 e902e8cd19 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 cfcc88d405 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 7cb9579edf 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 e27af48391 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