Commit Graph

259 Commits

Author SHA1 Message Date
Randy Mackay
8e08a1f8ab Copter: remove debug 2014-02-15 05:27:36 +11:00
Randy Mackay
0a2adbac1b Copter: renaming functions after moving xy control 2014-02-15 05:27:36 +11:00
Randy Mackay
5fd9410ff5 Copter: much renaming as xy pos controller moves 2014-02-15 05:27:36 +11:00
Randy Mackay
e69eeea246 Copter: log alt target from PosControl 2014-02-15 05:27:34 +11:00
Andrew Tridgell
2bf7a46c9b Copter: log power status on Pixhawk 2014-02-15 05:00:09 +11:00
Andrew Tridgell
0a3476bbf1 Copter: change to new board_voltage() API 2014-02-14 21:50:59 +11:00
Andrew Tridgell
4f2ce31cb7 Copter: log PX4 and NuttX versions in logs 2014-01-14 15:38:51 +11:00
Andrew Tridgell
e52f8d6598 Copter: prevent log corruption during log creation 2014-01-14 14:37:48 +11:00
Randy Mackay
138c2803be Copter: combine NTUN and INAV dataflash msgs 2014-01-13 22:00:11 +09:00
Randy Mackay
1e8a79eeaf Copter: add TimeMS, InavAlt to CTUN df msg 2014-01-13 21:31:43 +09:00
Randy Mackay
97b18314ac Copter: add time to ATT, MAG, CURR dataflash msgs 2014-01-13 20:46:54 +09:00
Randy Mackay
df9d1614e2 Copter: remove PID logging
Almost never used and eats up limited log description space
2014-01-13 17:23:39 +09:00
Randy Mackay
9f2f44f0f6 Copter: integrate shrunken optflow 2014-01-09 12:31:53 +09:00
Randy Mackay
84881470b1 Copter: suspend logging while disarmed 2014-01-07 22:43:47 +09:00
Andrew Tridgell
97df2f64c9 Copter: use common available_memory() 2013-12-28 16:02:32 +11:00
Andrew Tridgell
edda76623f Copter: updates for DataFlash API changes 2013-12-17 11:51:36 +11:00
Andrew Tridgell
5802d7f86b Copter: added logging of 2nd compass 2013-12-10 13:35:04 +11:00
Andrew Tridgell
cc3ee2ec0c Copter: added dual compass logging when available 2013-12-10 13:31:42 +11:00
Andrew Tridgell
ffdcb715c3 Copter: updates for compass API change 2013-12-09 17:34:06 +11:00
Randy Mackay
4b3aff3f91 Copter: log flight mode to dataflash on start-up 2013-12-06 12:58:23 +09:00
Randy Mackay
9d92e46198 Copter: correct optflow logging 2013-12-02 11:58:28 +09:00
Randy Mackay
d7c636b4aa Copter: remove yaw_in from ATT dataflash msg 2013-11-27 22:59:31 +09:00
Randy Mackay
7ef04bb73b Copter: rename nav_yaw to control_yaw 2013-11-27 22:48:20 +09:00
Randy Mackay
10d6a9a34e Copter: replace Log_Write_Motors with Log_Write_RCOU 2013-11-27 20:18:18 +09:00
Randy Mackay
af657d58b9 Copter: RCIN dataflash logging 2013-11-27 16:46:25 +09:00
Andrew Tridgell
21eac34cd1 Copter: log system ID if available 2013-11-26 13:00:03 +11:00
Randy Mackay
965af43121 Copter: add INAV error count to PM dataflash msg 2013-11-21 17:02:04 +09:00
Randy Mackay
7dd4ab835f Copter: CURR dataflash msg to output throttle_out
Previously it was outputting throttle-in which is not as useful in
autonomous modes
2013-11-18 13:30:48 +09:00
Randy Mackay
1359a8fea5 Copter: log INS errors in PM message 2013-11-18 12:16:21 +09:00
Randy Mackay
5cc8772947 Copter: bug fix to Tricopter motor logging
Fourth motor taken from yaw channel's radio_out instead of random
location in memory
2013-11-16 10:48:02 +09:00
Randy Mackay
1f6bc7bd9c Copter: log TradHeli ch7, ch8 in MOT message 2013-11-15 22:58:17 +09:00
Robert Lefebvre
9ae66c1773 TradHeli: add support for drive tail rotors
Repurposed external gyro and made it multi-funcitonal.
required PWM on Ch8 to start the motor in RSC Mode moved up from 100 to 400. This is to facilitate two-stage switching of the motors with PWM>100 starting the tail motor, and PWM>400 starting the main motor.
Additional amendments by Randy
2013-11-15 22:58:04 +09:00
Randy Mackay
46118b59d7 TradHeli: integrate motor lib changes 2013-11-15 22:57:43 +09:00
Andrew Tridgell
6b1f59372c Copter: show git and firmware version in tlog 2013-11-09 10:09:20 +11:00
Tobias
d6d5f0bbe4 Copter: Log.pde: replace unused copy with ref (saves again some bytes) 2013-10-27 13:40:40 +09:00
Andrew Tridgell
92bf4b9c89 Copter: added MAVLink SYSTEM_TIME message 2013-10-24 14:22:47 +11:00
Randy Mackay
ba92c4891a Copter: make AutoTune a compile-time option 2013-10-04 15:50:50 +09:00
Randy Mackay
31cea0140d Copter: Leonard's AutoTuning for Roll and Pitch 2013-10-04 15:50:47 +09:00
Randy Mackay
dab4f032f9 Copter: integrate BattMonitor 2013-10-03 11:16:28 +09:00
Randy Mackay
a53d28e018 Copter: remove support for dmp ahrs 2013-09-27 10:42:49 +09:00
Andrew Tridgell
a06f8a156d Copter: fixed PX4 build 2013-08-19 21:12:41 +10:00
Randy Mackay
2696e160e6 Copter: surface tracking improvement
Separate correction speeds for pilot input vs altitude-above-ground
errors to allow slower correction to sonar signals.
Change SONAR_GAIN parameter to be altitude error -> desired speed.  This
means it should be set 10x larger than before.
Replace hard-coded sonar cut-off percentage of 70% with
SONAR_RELIABLE_DISTANCE_PCT.
Reduce sonar cut-off percentage to 60%.
Add desired sonar altitude to dataflash log's CTUN message.
2013-08-19 09:52:59 +09:00
tobias
4e73cf810e Copter: added cast to remove compiler warning 2013-07-08 12:07:50 +10:00
Randy Mackay
4ad395e7be Copter: merge WPNAV into NTUN dataflash message 2013-05-19 22:53:35 +09:00
Randy Mackay
0a148cce19 Copter: log target alt in meters 2013-05-08 16:41:16 +09:00
Randy Mackay
cca05ee8ae Copter: start dataflash logging when arming
Stop nearly empty logs from being produced.
Removed redundant armed bit from ap state.
2013-05-03 14:49:55 +09:00
Randy Mackay
bab9fa25e5 Copter: add GCS failsafe 2013-04-29 21:30:22 +09:00
Randy Mackay
45aab0de92 Copter: add I2C error count to PM message 2013-04-26 22:39:22 +09:00
Andrew Tridgell
9cec664236 Copter: fixed format of PM message log 2013-04-21 23:46:35 +10:00
Andrew Tridgell
02c3083f60 Copter: print flight mode as string 2013-04-20 15:18:22 +10:00
Andrew Tridgell
ce3ee97e73 Copter: removed duplicate print_latlon() declarations 2013-04-20 13:57:45 +10:00
Andrew Tridgell
93d075404c Copter: added board voltage to current message 2013-04-20 13:52:37 +10:00
Andrew Tridgell
a0708460a4 Copter: convert to new logging system 2013-04-20 13:52:37 +10:00
Andrew Tridgell
67484a2ea1 Copter: make copter code compatible with the new logging system
not fully converted yet
2013-04-20 13:52:36 +10:00
Randy Mackay
9b351feade Copter: shorted INAV dataflash log message length
Velocities are now output in WPNav message
2013-04-17 22:39:30 +09:00
Randy Mackay
f7524e5741 Copter: remove unnecessary cast to float in Log 2013-04-17 22:35:02 +09:00
Randy Mackay
7c8527e6a6 Copter: resolve compiler warning 2013-04-17 22:14:47 +09:00
Andrew Tridgell
61c2befd4d Copter: fixed logging for new API 2013-04-17 21:34:42 +10:00
Randy Mackay
8fe3e689f4 Copter: add WPNAV log message 2013-04-15 21:54:29 +09:00
Randy Mackay
1ee825ee9a Copter: move alt and wp checking to AC_WPNAV
RTL fix so that if it starts rtl-ing from above 80m it returns home
while descending instead of descending at initial position.
add get and set_target_alt_for_reporting
2013-04-14 10:39:23 +09:00
Randy Mackay
4de5f67a91 Copter: replace wp_nav.get_target_alt with get_destination_alt 2013-04-14 10:38:17 +09:00
Randy Mackay
5b93990e41 Copter: removed next_WP
Use the wp_nav.get_target_alt or controller_desired_alt in it's place
2013-04-14 10:38:07 +09:00
tobias
217b8d7a59 cleanup: use const for struct Location pointers and references
this allows the compiler to generate more efficient code
2013-04-09 12:10:32 +10:00
Randy Mackay
1dcd46bffc Copter: reduce compiler warnings 2013-04-05 22:25:58 +09:00
Randy Mackay
40f6416b3d Copter: update Log_Read_Compass comment 2013-04-02 11:02:14 +09:00
Randy Mackay
f9539384a1 Copter: rename failsafe to failsafe_radio
Makes way for separation of failsafes for throttle, gps and gcs
2013-03-16 17:14:21 +09:00
Randy Mackay
998511f506 Copter: use unsigned long for dataflash log for gps time
Updated some formatting of comments in the same file
2013-03-04 23:13:06 +09:00
Randy Mackay
6b2b69535f Copter: Compass log stores/retrieves motor offsets 2013-03-02 00:03:20 +09:00
Andrew Tridgell
637ecd5279 Copter: updates for new dataflash API 2013-03-01 07:18:26 +11:00
Andrew Tridgell
9a3bd17cfb Copter: fixes for new DataFlash API 2013-03-01 07:18:25 +11:00
Randy Mackay
c8f09ac219 Copter: fix compile error for PX4 re Compass logging 2013-02-25 13:26:58 +09:00
Randy Mackay
cbde042ec5 Copter: remove non-inav loiter and wp controllers
lon_speed, lat_speed changed to float
do_takeoff, do_land now set roll-pitch, yaw and nav modes specifically
removed fast_corners functionality (may need to be reimplemented with
new inertial nav controllers)
2013-02-24 14:41:52 +09:00
Randy Mackay
609676e26c Copter: add logging of compass values
Removed rarely used ITERM because we didn't have enough bits in the log
mask
2013-02-24 14:41:48 +09:00
Randy Mackay
67c69a19ee Copter: remove baro-only alt hold
Saves 8 bytes of memory and more importantly simplifies the alt hold
calculations
2013-02-24 14:41:29 +09:00
Randy Mackay
ce370bab0c Copter: rename CUR and CURR to CURRENT for logging
Based on user complaint that enable/disable was using CUR while message
was appearing as CURR
2013-01-26 17:20:41 +09:00
Randy Mackay
fb1358a629 Copter: make all message output csv 2013-01-26 17:05:38 +09:00
Jonathan Challinger
6565d83e73 InertialNav: Fixed signs, remove body-frame rotation, apply correction at 100hz. 2013-01-22 18:37:45 +09:00
James Bielman
5631f865b2 Update floating point calculations to use floats instead of doubles.
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
2013-01-16 13:52:01 +11:00
Andrew Tridgell
56f22f9226 Copter: use common log reading function 2013-01-15 14:03:51 +11:00
Andrew Tridgell
72c8a14e76 Copter: fix trad heli log build 2013-01-13 17:57:47 +11:00
Andrew Tridgell
78fd5bb23f Copter: get rid of remaining Log.pde warnings 2013-01-13 17:53:39 +11:00
Andrew Tridgell
3039c37f95 Copter: use macros from common header 2013-01-13 17:31:42 +11:00
Pat Hickey
d7eeeab79e ArduCopter: fix new style Log.pde build for PX4.
randy - you should please review these changes to make sure you wanted
to have the int16_t type in all of these structs, or how you want to
convert all these other integer types to int16_t if you do need it that
way.
2013-01-12 13:11:25 -08:00
Randy Mackay
87627d883b ArduCopter: use new logging method for remaining packet types
Additional changes include renaming RAW dataflash type to IMU
2013-01-13 00:17:44 +09:00
Andrew Tridgell
af478d52bc Copter: use the new logging methods for 2 packet types
the rest still need to be converted
2013-01-12 18:15:23 +11:00
Andrew Tridgell
91ad870f11 Copter: check bitmask in more logging functions 2013-01-09 23:06:40 +11:00
Andrew Tridgell
4236b10edc Copter: fixed board ID string 2013-01-02 10:18:05 +11:00
Andrew Tridgell
17a63dc76a Copter: fixes for AP_HAL merge 2013-01-02 09:55:55 +11:00
rmackay9
672fdfbf71 ArduCopter: added ERR dataflash message
Failsafe events changed to errors so they are more obvious.
Errors recorded to dataflash for failure to init compass and optical flow sensor.
Errors recorded for pwm failure.
Resolved a compile error when dataflash logging is disabled.
2013-01-02 09:55:37 +11:00
rmackay9
92e271e517 AP_InertialNav: increase baro delay to 0.5 sec (was 0.2sec) to allow slower baro updates on APM1 2013-01-02 09:55:37 +11:00
rmackay9
466097b383 ArduCopter: use inertial nav for current altitude and climb rate 2013-01-02 09:22:51 +11:00
rmackay9
b786cf40f7 ArduCopter: change GPS dataflash message to output unfiltered gps lat and lon 2013-01-02 09:19:39 +11:00
Pat Hickey
7af03127f6 ArduCopter: more work 2012-12-20 14:52:28 +11:00
Pat Hickey
d9e0bbbbab ArduCopter: first pass at AP_HAL porting
* changed all the byte types to uint8_t
* fixed up much of the serial stuff
2012-12-20 14:52:27 +11:00
Jason Short
19ae5c30eb ACM : Formatting 2012-12-13 20:12:39 -08:00
rmackay9
154e3c33f7 ArduCopter, AP_InertialNav: consolidated ThirdOrderComplementaryFilter into AP_InertialNav to save about 200bytes of RAM 2012-12-10 00:43:11 +09:00
rmackay9
9dd978576b ArduCopter: auto yaw changes to allow pilot override of yaw during missions
Added set_yaw_mode to better control of yaw controller changes and variable initialisation.
Replaced AUTO_YAW mode with separate yaw controllers YAW_LOOK_AT_NEXT_WP, YAW_LOOK_AT_LOCATION, YAW_LOOK_AT_HEADING.
Pilot manual override of yaw causes yaw to change to YAW_HOLD (i.e. manual yaw) until next waypoint is reached.
Added get_yaw_slew function to control how quickly autopilot turns copter
Changed YAW_LOOK_AHEAD to use GPS heading and moved to new get_look_ahead_yaw function in Attitude.pde
Renamed variables: target_bearing->wp_bearing, original_target_bearing->original_wp_bearing.
Removed auto_yaw_tracking and auto_yaw variables and update_auto_yaw function as they are no longer needed.
Simplified MAV_CMD_CONDITION_YAW handling (do_yaw).  We lose ability to control direction of turn and ability to do long panorama shots but it now works between waypoints and save 20bytes.
2012-12-08 14:23:32 +09:00
rmackay9
3a90fc77f9 ArduCopter: add dataflash logging of camera events 2012-12-07 00:57:08 +09:00
rmackay9
072ffec493 ArduCopter: allow INERTIAL_NAV to be enabled separately for horizontal and vertical position 2012-12-06 10:31:41 +09:00
Andrew Tridgell
bcae83c4f6 ACM: make it possible to run CLI on radio port in ArduCopter 2012-11-21 21:41:34 +11:00