Commit Graph

118 Commits

Author SHA1 Message Date
Andrew Tridgell d6b38f4009 SRV_Channel: added get_output_pwm_chan() for scripting
allows for servo drivers to be written in lua
2024-11-28 09:24:03 +11:00
Peter Barker 89936bab3d SRV_Channel: make SRV_Channels::cork non-static
for symmetry with the push function
2024-11-13 19:47:49 +11:00
Peter Barker a0eef1039c SRV_Channel: create and use a singleton for SRV_Channels
avoid creation of static pointers to objects held within SRV_Channels
2024-11-13 19:47:49 +11:00
Andrew Tridgell 05fbc4767d SRV_Channel: added lift_release
for releasing a balloon or other lift device
2024-09-10 10:15:34 +10:00
Iampete1 eee2d2f57e SRV_Channel: add methods to set defualt and save min/max values 2024-08-27 09:37:34 +10:00
Willian Galvani 1a443f7cbf SRV_Channel: fix comment 2024-03-07 08:33:58 +09:00
Thomas Watson 79b7852357 SRV_Channel: expose public function to convert scaled value to pwm
Allow other modules to get and store the PWM value for a specific scaled
value and re-apply it later.
2023-10-17 10:32:39 +11:00
Peter Barker 90929205e9 SRV_Channel: correct RC channel failsafe mask
this is a 32-bit parameter.
2023-08-14 11:21:06 +10:00
Henry Wurzburg 78e44ebf3a SRV_Channel: allow scaled passthru to go to trim on rc failsafe 2023-06-29 21:37:12 +10:00
Peter Barker 89dcafcc5c SRV_Channel: add and use AP_SBUSOUTPUT_ENABLED
.... which will allow periphs to instantiate this if they really feel like it, and for it to be removed on smaller boards on the custom build server (and potentially on lower-specced boards.
2023-06-27 10:10:41 +10:00
Iampete1 4785c248c5 SRV_Channel: remove unused defualt in get channel for function 2023-04-11 09:13:26 +10:00
Rhys Mainwaring b5bbfe8011 SRV_Channel: add method have_32_channels
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
2023-03-29 21:56:38 +11:00
James O'Shannessy cd76aa3cff SRV_Channel: adds SRV_Channel_config to simplify dependent includes in other libraries
Adding of SRV_Channel_config allows defining the number of servo channels for inclusion in other libraries without pulling in all the other SRV_Channel logic.

Co-authored-by: Simon Maddison <81274690+Sypaq-MadMan@users.noreply.github.com>
2022-12-01 11:09:58 +11:00
Andy Piper cea9f639fc SRV_Channel: allow motor mask and motor output type to be passed in for AP_Periph 2022-09-20 09:45:03 +10:00
TunaLobster f28f5a1ad5 SRV_Channel: Add SRV fucntions for scaled RC passthrough 2022-08-31 17:05:39 +10:00
Henry Wurzburg 61b0f23ee2 SRV_Channel: add ARM/MOTOR_EMERGENCY_STOP Aux Switch 2022-08-24 16:03:52 +10:00
Andrew Tridgell aa9083e94c SRV_Channel: only support 32 channels on 2M flash boards
save flash on smaller boards
2022-05-22 12:07:37 +10:00
Andrew Tridgell e185e1252b SRV_Channel: added a SERVO_32_ENABLE parameter
save on param count for most users
2022-05-22 12:07:37 +10:00
Iampete1 d1e02e4fdd SRV_Channel: add invalid mask for GPIO outputs 2022-05-22 12:07:37 +10:00
Iampete1 077401df69 SRV_Channel: add upto 32 servo outs 2022-05-22 12:07:37 +10:00
Andy Piper cc6b907a2f SRV_Channel: observe disabled_channels when enabling channels
setup disabled_channels observing channels that are implied to be digital
allow none to be a valid channel function once again
2022-04-25 15:55:54 +09:00
Peter Barker a5be9d0f18 SRV_Channel: allow RobotisServo protocol to be compiled out 2022-04-12 10:35:01 +10:00
Peter Barker 3339d96573 SRV_Channel: allow Volz protocol to be compiled out 2022-04-12 10:35:01 +10:00
Andy Piper 6511a65b67 SRV_Channel: don't count disabled channels in mask and setup functions
disable channels that are not in use
2022-03-29 10:29:31 +11:00
Andy Piper 7d5c493db5 SRV_Channel: add support for alarm servo functions 2022-02-23 18:35:43 +11:00
Iampete1 6fd989e2ab SRV_Channel: add native slew rate limiting 2022-01-25 10:12:13 +11:00
Andrew Tridgell 32d846520c SRV_Channel: validate function number before array access
this fixes an issue with invalid SERVOn_FUNCTION values for array
index.
2021-12-15 18:10:45 +11:00
Peter Barker 7c126b1e7b SRV_Channel: make function an Enum16 2021-12-14 11:28:33 +11:00
Andrew Tridgell 5e43370e35 SRV_Channel: added get_motor_num()
map back from a channel to a motor number, for ESC telemetry reporting
2021-12-10 08:11:24 -08:00
Andrew Tridgell c6bde6745a SRV_Channel: allow BLHeli build with AP_Periph 2021-12-10 08:11:24 -08:00
Peter Barker fd97d79cb4 SRV_Channels: move fetteconewire out of AP_Periph #if 2021-11-24 12:01:22 +11:00
Peter Barker 2bfd2f1c32 SRV_Channel: rename HAL_AP_FETTEC_ONEWIRE_ENABLED to AP_FETTEC_ONEWIRE_ENABLED 2021-11-24 12:01:22 +11:00
Iampete1 b84633630a SRV_Channel: use floats for get/set output scaled 2021-10-20 18:29:58 +11:00
Andrew Tridgell 5f6af3567a SRV_Channel: added SERVO_GPIO_MASK
this allows for channels to be set as GPIO without setting
SERVOn_FUNCTION=-1. That allows for use of UAVCAN or SBUS outputs on
those channels with a servo function, while using the aux pin as a
GPIO
2021-10-11 19:28:11 +11:00
Shiv Tyagi cdb4ec8ad0 Plane : Improved LAND_THEN_NEUTRL to work on all control surfaces
This fixes the issue #18593

Co-Authored-By: Peter Hall <33176108+IamPete1@users.noreply.github.com>
2021-09-17 22:06:24 -05:00
Iampete1 0a41cdaa24 SRV_Channel: add ignore reversed flag to set_trim_to_min_for 2021-09-15 18:59:07 +09:00
Iampete1 2abe120969 SRV_Channel: remove set_safety_limit 2021-09-14 09:23:02 +10:00
Pierre Kancir 2020fbaa26 SRV_Channel: add FETtec support 2021-08-13 16:22:37 +10:00
Andrew Tridgell 874757a955 SRV_Channel: added k_GPIO and is_GPIO() 2021-07-22 07:48:12 +10:00
Andy Piper 74045ba50a SRV_Channel: add accessor for determining if there are any digital outputs 2021-05-17 21:44:36 +10:00
Andy Piper 8deeae7146 SRV_Channel: consolidate digital and reversible outputs to make clear the dependency 2021-05-12 21:02:42 +10:00
Andy Piper db85df1051 SRV_Channel: initialize BLHeli
make sure digital output settinsg are preserved
add accessor for digital outputs
2021-05-12 21:02:42 +10:00
Andrew Tridgell 11e4b62438 SRV_Channel: allow build with no channels
needed for AP_Periph when using LED driver only
2021-05-09 06:44:19 +10:00
Andy Piper 18366a4b6d SRV_Channel: propagate ESC type into rcout 2021-05-05 17:41:24 +10:00
Ari Krupnik 02969451da SRV_Channel: direct-rotation sail mast control 2021-04-28 08:22:47 +01:00
Andy Piper 9a870e4d75 SRV_Channel: add SERVO_DSHOT_RATE and propagate to rcout 2021-04-06 10:24:04 +10:00
Patrick José Pereira 0e76006dc5 SRV_Channel: Simplify boolean expression
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-23 10:30:05 +11:00
Tom Pittenger c01726b07d SRV_Channel: reduce dependencies for AP_Periph builds 2020-12-21 18:27:07 -08:00
Andrew Tridgell 7f3a851dd3 SRV_Channel: added support for rear motor tilt 2020-12-21 12:05:50 +11:00
Peter Barker 3264fd750b SRV_Channel: add k_min, m_trim and k_max to output min/trim/max values 2020-12-01 10:06:57 +11:00