Commit Graph

324 Commits

Author SHA1 Message Date
Andrew Tridgell a788405c8b RC_Channel: added percent_input() function
useful for plane flaps
2014-03-05 09:17:50 +11:00
Andrew Tridgell f6d888e0da RC_Channel: added disable_out() method 2013-12-20 11:58:53 +11:00
Randy Mackay f8e2947823 RC_Channel: parameter @Units to pwm 2013-11-26 22:34:28 +09:00
Andrew Tridgell 97b7130bb9 libraries: update license header to GPLv3
we switched to GPLv3 a long time ago, but neglected to update the
per-file license headers
2013-08-30 13:01:39 +10:00
Andrew Tridgell a12991923e RC_Channel: prevent overwrite of memory on high RC_Channel constructor 2013-08-18 11:42:23 +10:00
Andrew Tridgell 21859f9364 RC_Channel: fixed dead_zone for range channels
The dead_zone was being used inconsistently, used in PWM space in one
place, and in control output space in another.

The fix required us to move the index number of the RC channel eeprom
value for RCn_DZ, as users will have a throttle deadzone of 3 set in
their eeprom due to a bug that Randy just fixed that caused the value
to always be saved to eeprom. In plane we then need to fix the
deadzone for the throttle to be 30

this fixes issue #303

Thanks to Soren Kuula for spotting this!
2013-07-13 13:18:54 +10:00
Randy Mackay 47437b9ddf RC: set dead zone only if parameter has not been set by user 2013-07-12 11:44:16 +09:00
Andrew Tridgell 02252b5387 RC_Channel: removed reference to dip switches 2013-06-03 17:49:56 +10:00
Andrew Tridgell c0058bbb03 RC_Channel: added output_trim() and read() functions
these make using rcmap in the plane code easier
2013-06-03 16:23:48 +10:00
Andrew Tridgell 0438952a8b RC_Channel: removed global rc_ch[] array
hide it as a object static instead
2013-06-03 16:23:47 +10:00
Andrew Tridgell a093926b04 Revert "RC_Channel: removed pwm_out variable from RC_Channel"
This reverts commit 8e4a003d8d.

It is used by MotorsMatrix
2013-03-29 22:36:29 +11:00
Andrew Tridgell 8e4a003d8d RC_Channel: removed pwm_out variable from RC_Channel
saves 16 bytes
2013-03-29 19:32:52 +11: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 cd430cb6a8 RC_Channel: added no_deadzone version of set_pwm() 2012-12-20 22:41:58 +11:00
Andrew Tridgell ceb3f577d8 libraries: use new math functions 2012-12-20 14:53:22 +11:00
Pat Hickey afa1143506 RC_Channel: ported to AP_HAL
* keeping everyone honest
* remove second unmaintained unit test:  No idea wtf is going on in there.
2012-12-20 14:51:26 +11:00
rmackay9 49619b15dd RC_Channel: move RC_CHANNEL_ANGLE, RANGE, ANGLE_RAW type definitions to .h file so they can be used by the main sketch 2012-12-09 16:42:58 +09:00
Andrew Tridgell 1059ef2a54 Plane: fixed secondary aileron and manual aux servos in failsafe
the servo value wasn't being written to APM_RC while in failsafe for
these aux channels
2012-11-26 23:32:57 +11:00
Andrew Tridgell f58abb7550 RC_Channel: added pwm_to_angle_dz() function
will be used by k_aileron in APM
2012-11-05 23:37:25 +11:00
Andrew Tridgell d57566ad0e RC_Channel: removed set_filter() and scale_output
these unused options were costing 5 bytes per channel, for a total of
50 bytes on ArduCopter
2012-11-05 20:49:42 +11:00
Andrew Tridgell bd31f340a7 RC_Channel: support channel reversal on range channels
this makes it possible to have a reverse throttle in ArduPlane
2012-09-16 15:06:26 +10:00
uncrustify e9fb7cfd92 uncrustify libraries/RC_Channel/RC_Channel.cpp 2012-08-21 19:04:31 -07:00
Andrew Tridgell 518d6365ff AP_Param: update remaining libraries for new constructor syntax 2012-08-08 12:11:57 +10:00
Amilcar Lucas b8c7b8a786 RC_Channel: Allow each channel to know who they are, this simplifies the enabling and output function calls. 2012-08-05 23:08:31 +02:00
Amilcar Lucas 9c1ac2d9e6 More work on ch9, 10 and 11 2012-08-04 19:44:41 +02:00
Amilcar Lucas bbc4bdb729 More flexible RC support 2012-08-04 18:39:20 +02:00
Amilcar Lucas 3de23220ed RC_Channel parameters: Fix a typo 2012-07-18 22:39:49 +02:00
Amilcar Lucas 724c5f6490 Use ascending order in the values 2012-07-18 02:11:49 +02:00
Amilcar Lucas 1da0ce20ce Improve parameter documentation, it still does not work, but is an improvement.
I just do not understand why these parameters do not appear in Mission planner :(
2012-07-17 23:32:30 +02:00
rmackay9 c3b1a79f6a RC_Channel library: change all "int" types to "int16_t".
Fixes SITL compile error due to type mismatch of set_pwm between .h and .cpp file (this only occurs because on the SITL, "int" is actually "int32_t"
2012-06-02 14:20:58 +09:00
Jason Short c2d14a5cad RC_Channel fix for throttle output.
throttle was outputting incorrectly and allowing the user to max out the throttle leaving nothing for attitude control
2012-05-31 14:59:03 -07:00
Jason Short 0adb5cb396 Issue 416: RC_Channel – Fix to make dead_zones still output 0 2012-05-31 12:05:47 -07:00
Jason Short 1c690b44de removed never used filter, and fixed a constrain that could make range calcs go bad 2012-05-31 11:45:07 -07:00
Jason Short 862b374d19 Channel rage fix - low output was always 0 vs _low 2012-05-31 11:31:48 -07:00
Jason Short 1e37a0ec17 added a limit to range output 2012-02-18 21:08:17 -08:00
Andrew Tridgell 37cabb4cfa fixed dead zone load/save 2012-02-13 16:22:53 +11:00
Andrew Tridgell 9c5a5473ab added indexes to group info structures 2012-02-13 16:22:52 +11:00
Andrew Tridgell bf4a77da81 convert libraries to new typesafe macros 2012-02-13 16:22:51 +11:00
Andrew Tridgell 12dac42174 modify RC_Channel for AP_Param 2012-02-13 16:22:51 +11:00
analoguedevices 0ea6ecf8d1 Removed outdated comment:
"	// deadzone moved to
		//control_in = (abs(control_in) < _dead_zone) ? 0 : control_in;"
2012-02-11 16:51:02 +00:00
Michael Oborne 8ec192cf45 fix uint > int issue - for hil 2012-02-11 11:35:59 +08:00
Randy Mackay ed19c25a97 Arduino 1.0 - changed all #includes of "WProgram.h", "wiring.h" and "WConstants.h to "Arduino.h".
Modified FastSerial's write function to return size_t (number of bytes written).
2012-01-28 12:25:47 +09:00
Michael Oborne 6b949511ca change rc norm_output to scale evenly across the entire range 2012-01-20 16:24:55 +08:00
Pat Hickey c9f7618ccc purple: rework the RC_Channel library for the APM_RC changes 2011-11-25 20:00:16 -08:00
Michael Oborne d18bb1cc7e prevent div by 0 2011-10-30 21:28:39 +08:00
Jason Short 76bf784f8c RC_Channel Dead zone
Added APVar dead_zone to the RC_Channel library so you could edit it in the Mission planner
Made CH filtering off by default.
2011-10-27 11:34:00 -07:00
Jason Short 326cfef808 Dead Zone fix - Now the range is full instead of clipped. Should make the Yaw much more smooth. 2011-09-26 22:12:39 -07:00
Jason Short ce338071eb RC_Channel tweaks. using Radio_trim rather than 1500 in Raw output. Cleaned up line in calc PWM to be easier to read. 2011-09-21 14:52:20 -07:00
Jason Short cd72e6bea9 roughed in an expo option idea
made min and max values 1100, 1900
removed hard coded init for camera values
2011-09-16 19:06:53 -07:00
Amilcar Lucas 213969202a Moved the RC_Channel_aux class to its own file. The includes could be improved, has anyone got any ideas how ? 2011-09-11 19:13:01 +02:00
Amilcar Lucas c5fd792024 Make the switch case complete 2011-09-11 18:32:24 +02:00
Amilcar Lucas 9f14c5f578 Fix RC range reversal 2011-09-11 04:12:46 +02:00
Amilcar Lucas d84f80cb0d Moved enum values around to make code simpler to read and use 2011-09-11 02:34:47 +02:00
Amilcar Lucas f4998c3673 Moved a function from radio.pde to the RC_Channel_aux library. Now its more readable and reusable 2011-09-10 13:26:29 +02:00
Amilcar Lucas b7a0d8836a This is the real HEAD of the APM_Camera branch. Seams that lots of changes got lost in the SVN to GIT port 2011-09-09 16:18:38 +02:00
jasonshort e05de48e2d Adding reverse to Channel Raw output (unscaled output) to fix camera reversing.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3297 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-09-08 04:58:42 +00:00
jasonshort 150f58a4bd removed scaling on control in because it might cause rounding issues.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2969 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-30 23:48:38 +00:00
jasonshort b7b0212506 Cleaned up or reverse code.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2842 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-13 05:54:40 +00:00
jasonshort 8f82de3e11 changed a bool to uint8_t
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2120 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-05-06 17:51:26 +00:00
jasonshort a67b1d6896 Added new output type AMGLE_RAW - this will ouput non-scaled PWM, better for copters than fixed wings.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2093 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-05-05 17:46:11 +00:00
jasonshort 29a486c519 removed unused save_trim() function
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1716 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-02-23 05:17:24 +00:00
DrZiplok@gmail.com 1dd50ec263 Use AP_Var to store channel calibration.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1651 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-02-14 04:43:44 +00:00
deweibel@gmail.com 3443a7817d Add reversing for PWM outputs in angle_to_pwm case.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1566 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-27 18:16:22 +00:00
jasonshort 7dd1b3cbe7 removed EEPROMB references
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1314 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-28 18:42:03 +00:00
jasonshort bf3ee6f843 fixed bug
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1304 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-27 23:03:26 +00:00
jasonshort 68eec6805a update use EEPROM class, new scaled input for RC_Channel
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1264 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-26 01:17:04 +00:00
james.goppert 24bb547eae Added some functionality to RC_Channel to meet APM needs.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1223 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-21 03:53:26 +00:00
jasonshort 718bf566c8 rc range bug fixed
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1058 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-06 17:22:05 +00:00
jasonshort 4ef6bd673f added trim save
git-svn-id: https://arducopter.googlecode.com/svn/trunk@980 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-29 01:44:40 +00:00
jasonshort 44f2139951 added filter option
git-svn-id: https://arducopter.googlecode.com/svn/trunk@969 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-28 07:03:23 +00:00
jasonshort 59a3087cb6 added control / nav mixing
git-svn-id: https://arducopter.googlecode.com/svn/trunk@944 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-27 03:04:30 +00:00
jasonshort dc16a2961d git-svn-id: https://arducopter.googlecode.com/svn/trunk@926 f9c3cf11-9bcb-44bc-f272-b75c42450872 2010-11-25 07:10:06 +00:00
jasonshort 2dd479ea62 almost ready for use, still testing
git-svn-id: https://arducopter.googlecode.com/svn/trunk@905 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-23 21:20:29 +00:00
jasonshort@gmail.com 4fa2491adf This is a new Library for managing RC input channels which will replace the current way of storing RC input in Arrays and most of the Radio.pde tab
git-svn-id: https://arducopter.googlecode.com/svn/trunk@902 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-23 19:28:19 +00:00