Commit Graph

152 Commits

Author SHA1 Message Date
jasonshort e7b26da27d A simple OO PID library
git-svn-id: https://arducopter.googlecode.com/svn/trunk@742 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-28 04:59:24 +00:00
deweibel 610609f98d Delete obsolete / incomplete DCM library.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@730 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-25 03:02:56 +00:00
deweibel a80eb66e77 fix bugs from factoring imu object.
Tested & working - integration and roll/pitch drift correction
Untested - yaw drift correction and centrepetal comp

git-svn-id: https://arducopter.googlecode.com/svn/trunk@729 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-25 02:03:52 +00:00
deweibel 6272955567 small correction to imu lib
git-svn-id: https://arducopter.googlecode.com/svn/trunk@728 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-24 20:10:09 +00:00
deweibel de51162e81 Correct file references for repository
git-svn-id: https://arducopter.googlecode.com/svn/trunk@727 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-24 19:12:09 +00:00
deweibel 489365e7fc Add IMU library
git-svn-id: https://arducopter.googlecode.com/svn/trunk@726 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-24 18:37:56 +00:00
deweibel 3e30d2566d Add DCM library
git-svn-id: https://arducopter.googlecode.com/svn/trunk@725 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-24 18:37:10 +00:00
DrZiplok@gmail.com 271d4736a8 Factor the Stream-related enhancements out from FastSerial proper, so that we could use them on other Stream subclasses if that seemed worthwhile.
Add print_P and println_P implementations to give folks wedded to the vanilla Stream methods a way to print PROGMEM strings.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@715 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-23 05:59:40 +00:00
rmackay9@yahoo.com 8eeb81f792 reduced APM_Compass library RAM and code footprint
git-svn-id: https://arducopter.googlecode.com/svn/trunk@700 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-22 14:07:41 +00:00
DrZiplok 84697f4111 Fix ::printf_P to transmit to the correct interface. Fixes the XBee test.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@685 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-18 04:40:33 +00:00
DrZiplok 502b6ee0f7 Teach the compass init code how to detect whether there is a compass present
at all.  This lets systems where it's optional decide whether to try to use
it or not...



git-svn-id: https://arducopter.googlecode.com/svn/trunk@684 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-17 21:07:25 +00:00
DrZiplok 2e5be5d86b Revert the MTK GPS driver to only claiming a fix when the GPS has a 3D solution, per discussion with Paul.
Minor tidying and documentation.



git-svn-id: https://arducopter.googlecode.com/svn/trunk@683 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-17 20:13:53 +00:00
DrZiplok@gmail.com ee105a0ebf The previous initialisation strategy for auto-detection doesn't play well with the way APM uses the GPS.
Switch to subclassing GPS and manipulating a global pointer.  Update the test program so that it works again.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@673 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-17 07:22:11 +00:00
DrZiplok@gmail.com ca6d51cddb If ::begin() is called on a port that is already open, preserve the previous buffer settings. This makes it easy to change serial speeds without having to know how the port buffers were set up originally.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@672 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-17 06:15:47 +00:00
DrZiplok@gmail.com 0a94520682 Add support for automatically detecting the connected GPS and configuring accordingly.
Note that this is currently disabled as changes need to be made to APM to support it.

Tested with MTK, u-blox and SiRF GPS'.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@671 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-17 06:06:04 +00:00
paulbmather@gmail.com 079dd3c617 Changes to accommodate blinking lights and loss of GPS commands. Tested with NMEA, uBlox, Sirf and MTK. Does not function correctly with rmack's changes to APM_Compass posted 10/17/2010 (I don't know why).
git-svn-id: https://arducopter.googlecode.com/svn/trunk@669 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-17 04:07:46 +00:00
DrZiplok 23ccff2ccd Add support for 'new' and 'delete', so we can cons things on the fly.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@668 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-17 04:02:06 +00:00
rmackay9@yahoo.com e29ea04fb1 fixed bug in APM_compass Init method (MagGain should be sent to ConfigRegB). Also repeats calibration if invalid values received from compass.
fixed bugs in rotation matrices.  default orientation is now "Components up pins forward".

Added simple (but not perfect) method of figuring out offsets to APM_Compass_test.pde

git-svn-id: https://arducopter.googlecode.com/svn/trunk@666 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-17 01:34:57 +00:00
paulbmather@gmail.com 614d43c905 git-svn-id: https://arducopter.googlecode.com/svn/trunk@665 f9c3cf11-9bcb-44bc-f272-b75c42450872 2010-10-16 16:59:03 +00:00
paulbmather@gmail.com 0bbc8651e4 Added #defines for PMTK commands
git-svn-id: https://arducopter.googlecode.com/svn/trunk@664 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-16 16:56:29 +00:00
paulbmather@gmail.com d7e71b602c Fixed issue with comma parsing (space after comma was causing routine to misread data)
Added init functions (PMTK)

git-svn-id: https://arducopter.googlecode.com/svn/trunk@663 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-16 16:55:56 +00:00
rmackay9@yahoo.com 3c00a92d14 incorporated Jose's offset code into main compass library.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@636 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-09 23:22:46 +00:00
DrZiplok@gmail.com c5155aa623 Add servo output message, fixes issue #163
Check in my host-side test framework.

Minor tidying.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@635 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-09 18:11:24 +00:00
DrZiplok 58c1714bd3 Add more documentation to the Menu class.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@569 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-30 04:28:10 +00:00
rmackay9@yahoo.com e7d4273d52 ported John's compass calibration code to trunk.
also added 45 deg angles to orientation matrices to allow more flexibility in mounting the compass to the APM frame.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@565 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-28 13:21:38 +00:00
DrZiplok@gmail.com 4e91c0c7d6 Fix AP_Math include.
Fixes issue #137



git-svn-id: https://arducopter.googlecode.com/svn/trunk@562 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-27 04:05:10 +00:00
rmackay9@yahoo.com 16df19a26d added magnetometer orientation functionality to APM_Compass
git-svn-id: https://arducopter.googlecode.com/svn/trunk@560 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-26 13:54:24 +00:00
DrZiplok@gmail.com 5ba0c7328f Hook up stdio input, for the heck of it. We seem to be moving away from it, but there are things it can do that are hard to do with the Stream interfaces.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@555 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-25 18:15:56 +00:00
DrZiplok@gmail.com 6838829428 Use strtok_r rather than strtok. Saves a stack frame, two bytes of global, and fixes backwards compatibility with older avr-libc versions.
Fixes issue #131

git-svn-id: https://arducopter.googlecode.com/svn/trunk@554 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-25 18:13:08 +00:00
DrZiplok@gmail.com 4b09c9fade Fell asleep before committing these, oops.
Cut menu entry return type down to int8_t, make menu command checks case-insensitive.

Fixes issue #135

git-svn-id: https://arducopter.googlecode.com/svn/trunk@553 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-25 18:02:41 +00:00
rmackay9@yahoo.com 8708675b1f added constructor with 9 elements to matrix3.h
corrected matrix * vector function.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@551 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-25 02:43:11 +00:00
DrZiplok@gmail.com d45f67b3ef Add a carriage return before printing a newline when we are called as stdout/stderr.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@547 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-24 07:32:38 +00:00
DrZiplok@gmail.com e2184615d9 Change the way pre-prompt printing works to avoid having to deal with "magic" menu entries.
Add a default 'exit' command to back out of a menu.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@546 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-24 07:31:59 +00:00
DrZiplok@gmail.com 064dda10bf Provide an easy way to print stuff before displaying the prompt.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@545 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-24 06:18:59 +00:00
DrZiplok@gmail.com eb6113e685 Add a simple commandline menu library.
The library has an interface suitable for both interactive and automated use (i.e. Arduino console or GCS operation).


git-svn-id: https://arducopter.googlecode.com/svn/trunk@544 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-24 05:50:02 +00:00
DrZiplok@gmail.com 7721e622aa Rather than subclassing from the templated classes, just typedef directly to them.
This should solve the issues related to assigning to the convenience types.


git-svn-id: https://arducopter.googlecode.com/svn/trunk@543 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-23 05:45:43 +00:00
DrZiplok@gmail.com f72129bdb3 Clean up the bitrate calculations per the Atmel datasheet.
Verified that when configured for 115200, the actual output as seen on a scope is around 117600Hz consistent with the +2.1% error in the datasheet.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@542 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-23 05:41:30 +00:00
rmackay9@yahoo.com 15e6469ca9 added downcasting to MATRIX3_CTORS. this fixes some problems with setting the results from a formula to a variable (i..e m1 = m2*2).
git-svn-id: https://arducopter.googlecode.com/svn/trunk@541 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-23 05:39:50 +00:00
rmackay9@yahoo.com b3e1b6c57d minor corrections to the operator *= and constructor so that matrix can be more easily created from vector objects
git-svn-id: https://arducopter.googlecode.com/svn/trunk@540 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-23 03:14:15 +00:00
deweibel 34aa823003 Bug fixes for EM-406
git-svn-id: https://arducopter.googlecode.com/svn/trunk@539 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-23 00:20:11 +00:00
DrZiplok@gmail.com ac2e14c4ec Remove a bunch of probably wrong const cruft. Ditch the dubious array index operators from vector2.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@538 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-22 17:41:49 +00:00
DrZiplok@gmail.com 815e5f871a Remove the trivial operator= implementations, the default shallow copy is fine.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@537 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-22 16:32:38 +00:00
DrZiplok@gmail.com 646045ef44 Some minor fixes prompted while looking at the code for other reasons.
Return non-const values from assignment.  Fix operator* for matrix3.



git-svn-id: https://arducopter.googlecode.com/svn/trunk@536 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-22 16:15:26 +00:00
DrZiplok@gmail.com 9db013e648 Stop trying to be so clever in the tx interrupt handler. We may race with the code stuffing bytes into the ring such that we consume the last byte and empty the ring before they set the UDRE interrupt.
If that happens since we weren't checking the ring for emptiness we would loop and spit out the whole ring again.  It's cheaper in terms of interrupt latency to just check the ring at interrupt time than it is to futz with ATOMIC_BLOCKs in the ::write code.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@535 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-22 06:56:27 +00:00
DrZiplok@gmail.com 6d31545b8d Per Jose, fix the interrupt vectors to work for non-1280-based Arduino.
Make Serial0 also stdin and stderr.



git-svn-id: https://arducopter.googlecode.com/svn/trunk@534 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-22 03:00:10 +00:00
rmackay9@yahoo.com 241fd41289 fixed issue #34 from issues list regarding incredibly minor issue in keywords.txt. Also fixed a spelling mistake and removed the "n" from Jordi's name that causes Arduino IDE to complain about non-standard characters.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@529 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-19 03:06:46 +00:00
jasonshort 6fa92cc299 still unstable
git-svn-id: https://arducopter.googlecode.com/svn/trunk@528 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-18 19:18:55 +00:00
jasonshort 6cf2d1e86e better error wrapping
git-svn-id: https://arducopter.googlecode.com/svn/trunk@519 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-15 01:45:25 +00:00
jasonshort b9f8b6727d Made ground course from Xplane an unsigned int.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@518 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-14 19:13:02 +00:00
DrZiplok@gmail.com 0f53cc4c8e Add a guard ifdef to catch folks trying to build APM with the wrong board selected.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@517 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-14 15:22:08 +00:00