Commit Graph

4232 Commits

Author SHA1 Message Date
rmackay9 d0cbd577cd AP_Motors - fixed last "shadowing" compiler warning caused by badly named parameter in auto_armed method. 2012-04-05 00:28:04 +09:00
rmackay9 c27b83c8a8 AP_MotorsMatrix - fixed another compiler error regarding shadowing a variable. Fixed by removing those the angle and direction arrays which weren't even used 2012-04-05 00:24:56 +09:00
rmackay9 e9f0103063 AP_MotorsHeli - fixed compiler warning re move_swash function declared with int parameters in .h file but actually using int16_t in .cpp file. They're the same in arduino but perhaps the build checker is a little more strict that Arduino. 2012-04-05 00:06:33 +09:00
rmackay9 40e5a15452 AP_Motors - fix compiler warning re shadowing a variable caused by badly named parameter in armed function.
Another compiler warning fixed in AP_MotorsMatrix.cpp caused by declaring "i" twice.
2012-04-04 23:59:51 +09:00
rmackay9 0607be8ea5 ArduCopter - removed unused motor pde files including heli.pde, motors_hexa.pde, motors_octa.pde, motors_octa_quad.pde, motors_tri.pde and motors_y6.pde 2012-04-04 23:06:12 +09:00
rmackay9 2128085576 ArduCopter - test.pde - changed references "motor_armed" to "motors.armed()" as part of move to AP_Motors library.
Change to ESC initialisation calls to use motors.throttle_pass_through method of AP_Motors class.
2012-04-04 23:05:26 +09:00
rmackay9 2fc3b740c4 ArduCopter - system.pde - changed references to "motor_armed" to "motors.armed()" as part of the move to use AP_Motors library. 2012-04-04 23:03:21 +09:00
rmackay9 5e2147de1f ArduCopter - setup.pde - changed cli for helicopter to call the new AP_Motors class's parameters instead of the global parameters.
changed init_esc to call the AP_Motor's class's "throttle_pass_through" function.
2012-04-04 23:02:29 +09:00
rmackay9 1701cac0b1 ArduCopter - radio.pde - changed motor initialisation to set update rate, frame orientation, min and max throttle to AP_Motors class.
Note: perhaps the motors speed at least should be moved to a parameter within the motors class.
output_min function greatly simplified as this is handled by the AP_Motors class.
2012-04-04 23:00:56 +09:00
rmackay9 0f4203a755 ArduCopter - motors.pde - changed references to "motor_armed" to "motors.armed()" because we've moved to using the AP_Motors class.
Simplified set_servos_4 function which was responsible for calling "output_motors_armed" or "output_motors_disarmed" as this determination as to whether the motors are armed or not is handled within the AP_Motors class.
2012-04-04 22:58:42 +09:00
rmackay9 00d540bfa9 ArduCopter - leds.pde - changed refrences to "motor_armed" to "motors.armed()" 2012-04-04 22:57:50 +09:00
rmackay9 ffd77f58ab ArduCopter - removed references to MOT_1 etc as these are now within the AP_Motors class (i.e. MOT_1 has become AP_MOTORS_MOT_1) 2012-04-04 22:56:07 +09:00
rmackay9 929e933b69 ArduCopter - increased firmware version to 118. Removed nearly all heli parameters as these are all created by the AP_MotorHeli class now.
Note: we cannot move the heli_servos to the AP_MotorHeli class yet because of a small issue in the parameters class.
2012-04-04 22:55:07 +09:00
rmackay9 acc24291f3 ArduCopter - Log.pde - changed MOT output to dataflash to take values from AP_Motors class's motor_out array instead of the global motor_out array. 2012-04-04 22:53:21 +09:00
rmackay9 86d2a9ffdb ArduCopter - GCS_Mavlink.pde - changed output to ground station to use new AP_Motor's class motors array inplace of the global "motor_out" array. 2012-04-04 22:52:26 +09:00
rmackay9 23c3f25654 ArduCopter - Attitude.pde - moved heli_get_angle_boost from heli.pde (which will be removed) to Attitude.pde. In fact we should combine heli_get_angle_boost and the regular get_angle_boost. 2012-04-04 22:51:39 +09:00
rmackay9 544237d60a ArduCopter - add includes for new AP_Motors classes.
Remove global motor_filtered and motor_out arrays.
Removed all global heli variables.
replace "motor_armed" with "motors.armed()"
removed output to rc_4 for tri because this is now handled by AP_MotorsTri class
2012-04-04 22:50:43 +09:00
Michael Oborne eecadef7dc APM Planner 1.1.60
add stab kd ch6
fix mono/linux serial port list
2012-04-04 06:58:45 +08:00
Andrew Tridgell 1450c3f5af autotest: fixed overshoot due to low resolution log timing 2012-04-03 10:43:05 +10:00
Andrew Tridgell 2e11584fb7 autotest: fixed order of startup messages 2012-04-03 09:53:26 +10:00
Chris Anderson 07f44263ad Merge branch 'master' of https://code.google.com/p/ardupilot-mega 2012-04-02 12:45:20 -07:00
rmackay9 71ad185238 ArduCopter - AP_Motors library - added new library which has few advantages over current code:
1. it's step towards rearchitecting the current code base ahead of a move to RTOS.
     2. internally it uses a MatrixTable for the Quad, Octa, OctaQuad, Y6 frames.
     3. it implements the missing stability patch for Octa and OctaQuads (still missing for Y6)

Later check-ins will incorporate into the main ArduCopter code.
2012-04-02 17:26:37 +09:00
Andrew Tridgell 40d7b07789 MAVLink: port the new adaptive flow control to ArduCopter
This allows for arbitrary stream rates, and supports flow control if
you are using a 3DR radio
2012-04-02 11:18:53 +10:00
Andrew Tridgell b38d8c526f MAVLink: make parameter send use adaptive stream rate
this makes it possible to fetch parameters with very low air data
rates
2012-04-02 11:18:53 +10:00
Andrew Tridgell 5ce5f3d176 MAVLink: import change to txbuf as a percentage 2012-04-02 11:18:53 +10:00
Andrew Tridgell 222009002e MAVLink: allow for find grained stream rate control
streams can now be requested at any multiple of 20ms. So if you ask
for a stream at 7Hz then you will get it at close to 7Hz.
2012-04-02 11:18:53 +10:00
Chris Anderson 0d19678638 Merge branch 'master' of https://code.google.com/p/ardupilot-mega 2012-04-01 16:23:42 -07:00
Andrew Tridgell 8a215c8b55 MAVLink: imported new headers, with RADIO packet 2012-04-01 21:44:44 +10:00
rmackay9 b0c9a25024 ArduCopter - CH6 tuning - changed Roll/Pitch Rate D tuning to use the user supplied tuning range instead of the range / 100.
also changed heli_ext_gyro_gain to make it use the tuning range directly.
2012-03-31 09:28:25 +09:00
Andrew Tridgell 1e0a2fb0be MAVLink: don't waste 100 bytes of bandwidth sending 1 byte of information
the GPS_STATUS message is a massive waste of bandwidth, but it is the
only message that tells us the number of visible satellites. So only
send it if that information changes.

This makes MAVLink work better at low baud rates
2012-03-30 17:46:20 +11:00
Andrew Tridgell e9773ea09c APM: use set_blocking_writes(false) when we have done ground start 2012-03-30 17:46:20 +11:00
Andrew Tridgell 0985327331 ACM: use set_blocking_writes(false) when we arm motors 2012-03-30 17:46:20 +11:00
Andrew Tridgell 08b66e18b7 FastSerial: added set_blocking_writes() interface
this allows us to put a serial port into non-blocking mode, so that
writes that don't fit in the transmit buffer are dropped. This will be
used in flight to prevent stray printf() calls from causing large time
delays in the code
2012-03-30 17:46:20 +11:00
Andrew Tridgell 36e741b078 MAVLink: raise the serial transmit buffer size to 256 bytes
the 128 byte serial transmit buffer was causing significant problems
with queueing of mavlink messages. With 256 bytes we can fit a lot
more messages out in each pass of the code, which makes telemetry more
efficient

As we discussed on the dev call, we now have enough free ram for this
to be worthwhile
2012-03-30 17:46:20 +11:00
Andrew Tridgell c221c91f87 autotest: use the automatic declination code in autotest 2012-03-30 14:25:27 +11:00
Andrew Tridgell c2ff66c9cd examples: fixed build of some examples with new AP_Declination code 2012-03-30 14:25:27 +11:00
Andrew Tridgell 5dbd2a2b60 APM: enable AP_Declination by default 2012-03-30 14:25:27 +11:00
Andrew Tridgell 58f539ca35 ACM: removed FORCE_AUTOMATIC_DECLINATION_UPDATE
we now have the EEPROM option COMPASS_AUTODEC instead
2012-03-30 14:25:27 +11:00
Andrew Tridgell 825340d53d Compass: added COMPASS_AUTODEC option
when this is 1 (which is the default), we will get the declination
automatically via the AP_Declination library

when it is 0 we will use the value configured by the user
2012-03-30 14:25:27 +11:00
Andrew Tridgell a98a092a59 AP_Declination: enabled auto declination by default in APM 2012-03-30 14:25:27 +11:00
Andrew Tridgell e4e052ff91 AP_Declination: save some more memory by putting the declination keys in progmem
there was a comment saying this was too slow, but it actually costs
about 30 usec extra, which is trivial given the full auto declination
call costs 680 usec and its only called once per boot
2012-03-30 14:25:27 +11:00
Andrew Tridgell edb627a5c1 AP_Declination: added timing information to declination test 2012-03-30 14:25:27 +11:00
Andrew Tridgell 01c4cde14f AP_Declination: fixed build under SITL 2012-03-30 14:25:27 +11:00
Adam M Rivera 9c414e9573 AP_Declination_test: Updated test with better print messages. 2012-03-30 14:25:26 +11:00
Adam M Rivera cff189e911 AP_Declination: Update LUT based on the changes that I made in the LUT generation code. This LUT is the final version that has no truncation. 2012-03-30 14:25:26 +11:00
Adam M Rivera 0727955fe3 ArduCopter: Changed implementation of configuration value for automatic declination. There is now a FORCE_AUTOMATIC_DECLINATION_UPDATE that when enabled will update the declination on every GPS 3D fix regardless of whether or not the user saved a value to the EEPROM. By default the declination will only be set by the automatic declination routine if the user has not saved a declination to the EEPROM. 2012-03-30 14:25:06 +11:00
Adam M Rivera 380b9ece44 AP_Declination: Updated comments to reflect new LUT size. 2012-03-30 14:25:06 +11:00
Adam M Rivera c04e074c89 AP_Declination: Removed trailing zero deltas as they have no impact on the final value and only take up extra bytes. 2012-03-30 14:21:58 +11:00
Adam M Rivera 662f11f801 AP_Declination: Updated compressed lookup value table. Located 9 more failure points due to truncation on the packed LUT. 2012-03-30 14:21:58 +11:00
Adam M Rivera 0178906389 AP_Declination: Found 7 of the 22 failure points and fixed them. The issue with those 7 was the way I originally packed the value array. The last delta values on some rows were getting truncated. The new number of failures is down to 15 - WIP. 2012-03-30 14:21:58 +11:00