Commit Graph

60 Commits

Author SHA1 Message Date
Andy Piper ce481af167 AP_HAL: correct prescaler calculation and add testing debug.
use normalized bitwidths for neopixel.
make sure low prescaler values are allowed.
significantly tighten clocking prescaler tests
add assertions around expected prescaler values
2022-10-05 18:27:43 +11:00
Willian Galvani 018ab14814 RC_Output.h: add gpio methods 2022-09-06 09:34:07 +10:00
Andy Piper 35a37cb84b AP_HAL: add BLHeli_S ESC type and use it to control bitwidths
adjust BLHeli_S bitwidth and ticks to support more ESC variants.
2022-05-25 17:06:08 +10:00
Andrew Tridgell 113b4cec38 AP_HAL: more changes for 32 bit servo mask 2022-05-22 12:07:37 +10:00
Iampete1 cabdd82e71 AP_HAL: enable 32 servo outs 2022-05-22 12:07:37 +10:00
Andy Piper 8ccc84beab AP_HAL: add accessor for disabled channels to RCOutput 2022-04-25 15:55:54 +09:00
Andy Piper 6355934a36 AP_HAL: add bitwidth hal definitions.
revert to original bitwidths for neopixel and profiled
add proper neopixel test that observes spec'ed timings
2022-04-20 17:39:29 +10:00
Andy Piper ea1af70f2b AP_HAL: add support for @SYS/timers.txt
move prescaler calculation here and add unit test
add ability to find closest matching frequency in prescaler calculation
account for bit widths in prescaler tests
2022-02-16 15:28:04 +11:00
Iampete1 3b8b90d170 AP_HAL: move is_dshot_protocol to AP_HAL 2021-10-06 18:59:57 +11:00
Iampete1 9b02baa5f0 AP_HAL: add note to output_mode enum about params using it 2021-10-06 18:59:57 +11:00
Iampete1 ed80d91d55 AP_HAL: remove set_safety_pwm 2021-09-14 09:23:02 +10:00
Andy Piper 09e0135ecb AP_HAL: add accessor for reversed mask
allow mask updates to be disabled
document mask types
define DSHOT_ZERO_THROTTLE
2021-08-12 19:00:51 +09:00
Andy Piper 61f1c3c9ce AP_HAL: add 1Hz update_channel_masks() 2021-06-22 09:55:27 +10:00
Andy Piper 4f547d2acc AP_HAL: allow motor poles to be recorded
enable ESC telemetry for SITL
2021-05-12 17:01:11 +10:00
Andy Piper 3428cbf993 AP_HAL: add dshot command codes for beeps, leds and motor control
allow more than one type of ESC for dshot commands
add support for checks around active ESCs
allow dshot alarm to be disabled
allow prioritized dshot commands
2021-05-05 17:41:24 +10:00
Andy Piper f29dba2ddd AP_HAL: add set_dshot_rate() 2021-04-06 10:24:04 +10:00
Andy Piper 1c79f22ba2 AP_HAL: make erpm accessible from RCOutput
give access to erpm error rate
add bi-directional dshot mask modifier
2020-12-30 19:14:16 +11:00
Peter Hall 6ab13333c2 AP_HAL: support ProfiLEDs 2020-03-10 10:37:26 +11:00
Andrew Tridgell 5d15d867b5 AP_HAL: adjust LED API to allow more than 32 LEDs on a pin 2020-02-27 13:12:26 +11:00
Randy Mackay a71ae54d3a AP_HAL: add RCOutput::get_output_mode_banner 2020-02-04 12:23:33 +11:00
Andrew Tridgell 1cb608a9f4 AP_HAL: allow neopixel LEDs to be set more flexibly
allow for N leds per chain, with RGB control of each
2019-09-10 13:03:28 +10:00
Tom Pittenger e3416b66dc AP_HAL_ChibiOS: add Neopixel output type, similar to dshot 2019-09-10 13:03:28 +10:00
Michael du Breuil 927a0521e3 AP_HAL: Remove the empty force_safety_no_wait 2019-09-04 07:14:50 +10:00
Andrew Tridgell f2cd6e9a05 AP_HAL: added set_reversible_mask() 2018-11-16 08:33:35 +11:00
Siddharth Purohit c546bec999 AP_HAL: do not use ch for channel, its used as a global var under ChibiOS 2018-09-19 12:14:15 +10:00
Andrew Tridgell 1fe6c7b497 AP_HAL: added chanmask to serial_setup_output() 2018-08-04 19:29:13 +10:00
Andrew Tridgell 0bb2c4564d AP_HAL: make hal aware of oneshot125
this separates oneshot and oneshot125 at the HAL layer, allowing the
HAL to properly handle the high timing resolution of oneshot125
(needed to use 125ns time steps, to get the full 1000 throttle steps)
2018-04-07 09:10:29 +10:00
Andrew Tridgell dacbef2120 AP_HAL: added get_esc_scaling() API for rcout 2018-04-07 09:10:29 +10:00
Andrew Tridgell 69c623270c AP_HAL: added telem request to RCOutput 2018-04-07 09:10:29 +10:00
Andrew Tridgell dcfec21b46 AP_HAL: added support for serial output to ESCs 2018-04-07 09:10:29 +10:00
Andrew Tridgell e7dc304f4e AP_HAL: support DShot output modes 2018-04-07 09:10:29 +10:00
Mark Whitehorn 66c4b7d986 AP_HAL: support SBusOut
rename enable_sbus_out to enable_px4io_sbus_out
2017-11-30 10:20:04 +11:00
Andrew Tridgell 0188d6463d AP_HAL: added rcout set_detault_rate() 2017-07-24 14:07:28 +10:00
Andrew Tridgell 1c741e78e6 AP_HAL: changed BRUSHED16kHz to BRUSHED 2017-06-17 17:37:45 +10:00
Eugene Shamaev a07033f938 AP_HAL: ESC scaling 2017-04-10 21:31:07 +01:00
Lucas De Marchi 686e0f08d6 AP_HAL: RCOutput: add optional timer_tick() method
This is common enough across the HAL implementaions so add a method for
it to avoid the need for casts inside the HALs.
2017-02-26 13:38:24 +11:00
Andrew Tridgell fac8f1db03 AP_HAL: added MODE_PWM_BRUSHED16KHZ 2016-11-30 10:53:25 +11:00
Andrew Tridgell e356797888 AP_HAL: make cork() mandatory in RCOutput 2016-10-13 10:00:04 +11:00
Tom Pittenger d3ac1dc161 AP_HAL: defer calls to safety_state switch to queue an async attempt.
- this allows for auto-retries if the state does not set correctly
2016-05-27 21:34:40 +10:00
Andrew Tridgell 163783fefd AP_HAL: define CH_NONE
for servos not connected to a channel
2016-05-26 16:26:30 +10:00
Andrew Tridgell b94e577cb8 AP_HAL: added enable_sbus_out() call in RCOutput 2016-04-16 07:30:43 +10:00
Andrew Tridgell e24d600e78 AP_HAL: added hal.rcout->set_output_mode() 2016-04-14 08:05:05 +10:00
Jonathan Challinger 6663d30728 AP_HAL: add RCOutput::read_last_sent definition 2016-03-10 13:56:23 -08:00
Lucas De Marchi dbf2aedf1e AP_HAL: replace header guard with pragma once 2016-02-18 14:52:34 -02:00
Lucas De Marchi 036eb21c09 AP_HAL: remove init() method with unused argument 2015-12-02 14:49:12 -02:00
Lucas De Marchi 6b1c5e6f72 AP_HAL: add init() method without argument
The argument in init() is not used by any implementation. Add a second
method without it so the HAL implementation can used it instead. Later
the unused method will be removed.
2015-12-02 14:21:58 -02:00
Lucas De Marchi fb643fbb53 AP_HAL: RCOutput: add methods to allow grouping writes 2015-10-06 10:42:18 +11:00
Lucas De Marchi 666dc3e440 AP_HAL: RCOutput: remove unused write method
This method is not used anymore since the introduction of channel map and
allowing motors to be enabled/disabled in AP_Motors.

Later we may introduce a method to write multiple values with a default
implementation that supports the channel and enable maps rather than
requiring all subclasses to implement this method.
2015-09-29 11:53:38 +09:00
Max Basescu de50217809 AP_HAL: Added RC_OUTPUT_MIN_PULSEWIDTH set to 400 and RC_OUTPUT_MAX_PULSEWIDTH set to 2100
For use in AP_HAL_AVR in RCOutput_APMx
2015-06-05 21:03:03 +10:00
Andrew Tridgell e89d380b73 AP_HAL: added set_esc_scaling() RCOutput function
this will be used to scale outputs for uavcan ESCs based on throttle
range
2014-11-26 11:14:44 +11:00