Commit Graph

65 Commits

Author SHA1 Message Date
Andrew Tridgell 02976168cc HAL_PX4: fixed RC rate when BRD_PWM_COUNT=0
if BRD_PWM_COUNT is zero then alt_fd is -1, and we were not setting
servo output rate
2017-04-03 10:05:30 +09:00
Lucas De Marchi f972fed70b AP_HAL_PX4: rename method to follow AP_HAL
This allows to avoid the cast in the HAL, making it easier to replace
the implementation with an Empty::RCOutput while prototyping.
2017-02-26 13:38:24 +11:00
Andrew Tridgell 787a2093ec HAL_PX4: fixed motor test for brushed motors
this fixes zero pwm output on a subset of channels. When using
motortest and asking for a single channel, multiple channels fired due
to an incorrect optimisation
2017-02-02 09:27:48 +09:00
Andrew Tridgell ce5ed66b45 HAL_PX4: auto-scale brushed output with ESC output range 2016-11-30 10:53:26 +11:00
Andrew Tridgell b3286c3da0 HAL_PX4: support MODE_PWM_BRUSHED16KHZ 2016-11-30 10:53:25 +11:00
Andrew Tridgell 00938f7dbb HAL_PX4: fixed enabled channels in init
now this is called from AP_BoardConfig we need to not clear enabled
channels
2016-11-13 13:16:22 +11:00
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Andrew Tridgell 9d6a5c6f04 HAL_PX4: make ready_to_arm state latching
this fixes a race condition in the handling of the px4io safety switch
2016-10-24 13:36:04 +11:00
Andrew Tridgell 2a44e6a7d7 HAL_PX4: cope with no px4io on FMUv2
don't open px4fmu twice
2016-10-23 17:15:32 +11:00
Andrew Tridgell c825c7b4cc HAL_PX4: disable FMU outputs again on re-engaging of safety switch 2016-10-21 09:10:55 +11:00
Andrew Tridgell c493ba81e4 HAL_PX4: fixed cork() for RCOutput 2016-10-13 10:00:04 +11:00
Andrew Tridgell dddaded8d4 HAL_PX4: fixed a race condition in force_safety_on/off
the status update from IO may not have come through if we force safety
on and then off in quick succession, such as for plane mixer load

this forces the ioctl to be sent at least once
2016-08-16 12:53:34 +10:00
Tom Pittenger 57d6ccc0dd AP_HAL_PX4: skip the 100ms delay on first px4io safety_state async attempt 2016-05-27 11:30:50 -07:00
Tom Pittenger 67aaf7e226 AP_HAL_PX4: 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 dda35a366c HAL_PX4: prevent rate changes once oneshot is setup
this fixes a problem with small motor outputs at the start of a motor
test.

Thanks to Luis for reporting this.
2016-05-26 12:18:49 +10:00
Ricardo de Almeida Gonzaga 892cc2ea6f AP_HAL_PX4: Fix typos 2016-05-13 19:20:06 -03:00
Andrew Tridgell eeef28be5e AP_HAL_PX4: fixed hexacopter on Pixracer
the _servo_count was 4 as we didn't re-fetch the count after applying
changes in AP_BoardConfig from BRD_PWM_COUNT
2016-05-11 13:01:15 +10:00
Andrew Tridgell 0af322e90d HAL_PX4: added comment on oneshot 2016-04-22 13:50:05 +10:00
Andrew Tridgell 5ce7ae71a7 HAL_PX4: fixed enabling oneshot on a subset of motors 2016-04-22 13:24:24 +10:00
Andrew Tridgell bcd0d48ced HAL_PX4: fixed non-contiguous motor outputs
this fixes tricopter with chan3 never set
2016-04-22 11:51:08 +10:00
Andrew Tridgell a731caa4ab HLA_PX4: prevent timer disturbance in oneshot mode 2016-04-16 18:52:31 +10:00
Andrew Tridgell d9d6f87195 HAL_PX4: fixed bug in pwm send code
many thanks to Oxinarf for spotting this!
2016-04-16 08:32:04 +10:00
Andrew Tridgell c9dfccfb26 HAL_PX4: improved oneshot support
this now supports oneshot properly on both IO and FMU
2016-04-16 07:30:44 +10:00
Andrew Tridgell 6f284d673a HAL_PX4: enable oneshot support on px4io 2016-04-16 07:30:43 +10:00
Andrew Tridgell 5922e67785 HAL_PX4: allow sbus output on channels beyond BRD_PWM_COUNT 2016-04-14 08:05:06 +10:00
Andrew Tridgell 759b0d6629 HAL_PX4: only support oneshot on FMU outputs for now
oneshot on PX4IO gives some very weird results. I think it is doable,
but will take a bit more work
2016-04-14 08:05:06 +10:00
Andrew Tridgell 934b4dd475 HAL_PX4: support OneShot on PX4
this greatly lowers output latency
2016-04-14 08:05:05 +10:00
Andrew Tridgell 2a6e64e358 HAL_PX4: send all channels to px4io
this allows for 16 channel SBUS out
2016-03-13 10:03:56 +11:00
Jonathan Challinger 4bf3ec0e91 AP_HAL_PX4: implement RCOutput::read_last_sent 2016-03-10 13:56:27 -08:00
Andrew Tridgell 526fb65dd1 HAL_PX4: fixed setting of rcout frequency on alt channels 2016-01-05 09:47:52 +11:00
Andrew Tridgell 78e9b0a4e3 HAL_PX4: check for servo counts changing after boot
this copes with changes to BRD_PWM_COUNT
2015-12-06 14:19:28 +11:00
Lucas De Marchi 0c3733601b AP_HAL_PX4: use init() method without arguments
Override the init() method from parent class that doesn't have a
parameter since it's not used here.
2015-12-02 14:49:11 -02:00
Andrew Tridgell 155e82c1b3 HAL_PX4: fixed PWM output for FMUv4 2015-11-27 18:54:31 +11:00
Caio Marcelo de Oliveira Filho a76c9e0051 AP_HAL_PX4: use millis/micros/panic functions 2015-11-20 12:31:13 +09:00
Lucas De Marchi ce674f6926 AP_HAL_PX4: remove unused write method 2015-09-29 11:53:49 +09:00
Gustavo Jose de Sousa 08333f1ffe AP_HAL_PX4: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:28:43 +10:00
Andrew Tridgell d6af9fd0ee HAL_PX4: prevent uavcan motor spin up while booting 2015-06-09 19:45:01 +10:00
Andrew Tridgell 6a33aeef67 HAL_PX4: cope with multi-instance actuator_outputs uORB
we need to subscribe to all of them
2015-06-09 19:45:00 +10:00
Andrew Tridgell 333778bac1 HAL_PX4: updates for upstream merge 2015-06-09 19:44:20 +10:00
Andrew Tridgell 619196b6b3 HAL_PX4: fixes for new PX4 device paths 2015-02-14 12:25:44 +11:00
Andrew Tridgell 4132b53541 HAL_PX4: publish actuator values for UAVCAN ESCs
this publishes scaled actuator values so that the uavcan module can
drive ESCs
2014-11-26 11:14:44 +11:00
Andrew Tridgell 154bf51279 HAL_PX4: minor tidy up of if statement 2014-11-14 13:51:16 +11:00
Holger Steinhaus 9e9c62d245 HAL_PX4: work-around for periodic enable_ch() calls 2014-11-14 13:51:16 +11:00
Holger Steinhaus e5549c90a1 HAL_PX4: do not overwrite disabled channels with zeros
Fixes #1321
2014-11-14 13:51:16 +11:00
Andrew Tridgell e22c8b27a9 HAL_PX4: if there are no enabled channels don't send to PX4IO
this makes it possible to disable PWM output to IO to test override
2014-11-07 10:39:07 +11:00
Andrew Tridgell 7e3b8a30f5 HAL_PX4: use px4io generated values for servo output readback
this makes it easier to observe the behaviour of IO failsafe
2014-11-05 21:54:53 +11:00
Randy Mackay ffcd259b4e HAL_PX4: implement force_safety_on 2014-09-18 09:58:46 +09:00
Andrew Tridgell 5cd145a307 AP_HAL: added set_failsafe_pwm() API
this allows the PWM values for FMU firmware failure to be setup
2014-04-21 08:36:52 +10:00
Andrew Tridgell c93794999e HAL_PX4: remove an old conditional define 2014-02-11 15:58:25 +11:00