Commit Graph

4128 Commits

Author SHA1 Message Date
rmackay9 998058ec07 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 ad9a8acbab 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 1d086c83f0 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 4aa40bdf10 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 473126581d 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 905a445391 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 aa54458dcf ArduCopter - leds.pde - changed refrences to "motor_armed" to "motors.armed()" 2012-04-04 22:57:50 +09:00
rmackay9 7df17e9b3b 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 ee308ea06c 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 8402a3d837 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 e5710958bc 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 aa4085183c 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 54a0709759 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 bb50bc3fc5 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 d60126fc1f autotest: fixed overshoot due to low resolution log timing 2012-04-03 10:43:05 +10:00
Andrew Tridgell abd33dd914 autotest: fixed order of startup messages 2012-04-03 09:53:26 +10:00
Chris Anderson 96fcaa5040 Merge branch 'master' of https://code.google.com/p/ardupilot-mega 2012-04-02 12:45:20 -07:00
rmackay9 b71877366e 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 c0a54762c6 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 e1270401bf 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 1fd1a55fa6 MAVLink: import change to txbuf as a percentage 2012-04-02 11:18:53 +10:00
Andrew Tridgell 7b50724f60 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 0a9fd22243 Merge branch 'master' of https://code.google.com/p/ardupilot-mega 2012-04-01 16:23:42 -07:00
Andrew Tridgell 4ddeb82b26 MAVLink: imported new headers, with RADIO packet 2012-04-01 21:44:44 +10:00
rmackay9 75d7308fb4 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 e0bb7e2777 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 87ed39ea46 APM: use set_blocking_writes(false) when we have done ground start 2012-03-30 17:46:20 +11:00
Andrew Tridgell 7634f541b9 ACM: use set_blocking_writes(false) when we arm motors 2012-03-30 17:46:20 +11:00
Andrew Tridgell 0c445101ff 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 b4107d35e8 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 3b3f9d8b17 autotest: use the automatic declination code in autotest 2012-03-30 14:25:27 +11:00
Andrew Tridgell 22ff8cb197 examples: fixed build of some examples with new AP_Declination code 2012-03-30 14:25:27 +11:00
Andrew Tridgell 86cc7a5e1d APM: enable AP_Declination by default 2012-03-30 14:25:27 +11:00
Andrew Tridgell 0bc604f030 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 504c53f746 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 168c45ab12 AP_Declination: enabled auto declination by default in APM 2012-03-30 14:25:27 +11:00
Andrew Tridgell 927834106d 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 70d4280935 AP_Declination: added timing information to declination test 2012-03-30 14:25:27 +11:00
Andrew Tridgell 175352845c AP_Declination: fixed build under SITL 2012-03-30 14:25:27 +11:00
Adam M Rivera ca82350f17 AP_Declination_test: Updated test with better print messages. 2012-03-30 14:25:26 +11:00
Adam M Rivera 01b1e58f7d 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 51b70e4d36 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 23f6093f05 AP_Declination: Updated comments to reflect new LUT size. 2012-03-30 14:25:06 +11:00
Adam M Rivera 50791a8b0f 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 f35e447927 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 72b70c394c 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
Adam M Rivera 076192db51 AP_Declination: Updated test to run in 5 degree increments. Changed to only print failures and also print total pass vs total fail. 2012-03-30 14:21:58 +11:00
Adam M Rivera 230ca1ddca AP_Declination: Moved check for y index of zero to after the y index is properly transformed. 2012-03-30 14:21:58 +11:00
Adam M Rivera e0fa053c79 AP_Declination: The exception signs unpacking logic was incorrect. I was shifting a 1 value left y%8 which would have needed a the signs to be packed right to left. My packed signs byte was packed left to right (left most being the 0 position) so I needed to reverse the shifting. 2012-03-30 14:21:58 +11:00
Adam M Rivera f66c6e16e4 AP_Declination: In order for the bitwise & operation to work, negative signs need to be represented by 1s instead of 0s. Changed so that negative signs are represented by a 1 in the packed signs array. Updated lookup logic to reflect this change. 2012-03-30 14:21:58 +11:00