96 Commits

Author SHA1 Message Date
Ricardo Marques
e817fb83f5 pwm_extra: Add PWM_EXTRA parameters.
Signed-off-by: Ricardo Marques <marques.ricardo17@gmail.com>
2021-01-18 15:43:28 +01:00
Ricardo Marques
7a8203bf19 Enable third mixer when using UAVCAN for main mixer. 2021-01-18 15:43:28 +01:00
Daniel Agar
f7452bff4d ROMFS: startup remove bootlog.txt 2020-11-16 09:19:35 -05:00
Daniel Agar
9767a73619 ROMFS: silently compare optional parameters
- not all build configurations have these parameters/modules
2020-11-11 08:03:48 +01:00
David Sidrane
b9319b3843 ROMFS:Use . for (source) and ${R} for pathing
init.d-posix:rcS Quiet Shell check warning
2020-10-15 17:11:08 -04:00
Daniel Agar
08bf71b73d
drivers/tone_alarm and tune_control small improvements/cleanup
- drivers/tone_alarm: move to ModuleBase and purge CDev (/dev/tone_alarm0)
 - drivers/tone_alarm: only run on tune_control publication (or scheduled note) rather than continuously
 - drivers/tone_alarm: use HRT to schedule tone stop (prevents potential disruption)
 - msg/tune_control: add tune_id numbering
 - systemcmds/tune_control: add "error" special case tune_id
 - move all tune_control publication to new uORB::PublicationQueued<>
 - start tone_alarm immediately after board defaults are loaded to fix potential startup issues
 - for SITL (or other boards with no TONE output) print common messages (startup, error, etc)
2020-10-05 21:39:26 -04:00
David Sidrane
185ffe9e13 nsh scripting:source (.) cmd supported 2020-09-16 21:32:04 -04:00
Daniel Agar
ca81175b07 rename drivers/px4fmu -> drivers/pwm_out
- split out header
2020-03-31 19:12:31 -04:00
Beat Küng
2b360bfd48 rcS: fixes for SYS_USE_IO=0
rc.io is called from 2 places in rc.interface:
- if [ $OUTPUT_MODE = io -o $OUTPUT_MODE = uavcan_esc ]:
  - 'set OUTPUT_MODE io' is only set within USE_IO=yes, so removing
    the check in rc.io has no effect.
  - in case of UAVCAN, we also want the IO for RC, now covered in the next
    case.
- Further down ('Start IO for RC input if needed.').
  This is intended to start IO for RC only, when fmu is already started.
  However the previous check '$USE_IO = yes' in rc.io prevented that.

In addition we don't start rc_input in case of $USE_IO = no.

Fixes no RC on Pixhawk 2 with SYS_USE_IO=0.
2020-03-26 10:33:27 -04:00
Beat Küng
349469cf75 refactor pwm_out_sim: use mixer_module and run on work queue
Tested with SITL + HITL
2019-10-21 09:42:08 +02:00
Beat Küng
d8ef1b59b9 ROMFS: add dshot startup support 2019-10-11 08:14:17 +02:00
BazookaJoe1900
02e861b16e enable silent compare of parameter (#12850)
Remove false errors after comparing parameters that doesn't exists.
as described in #12832
2019-10-07 09:50:11 +02:00
Beat Küng
a3c920db7d board_defaults: remove unnecessary 'set MIXER_AUX none'
On all of these boards '$USE_IO = no' will hold.
2019-07-16 08:09:22 +02:00
romain
e1d9438f79 sih: remove SYS_SIH parameter and extend SYS_HITL 2019-04-12 09:25:07 +02:00
Julian Oes
3ebf030a02 ROMFS: change shebang from #!zsh to #!/bin/sh
This was required for shellsheck.
2018-12-19 07:36:43 +00:00
David Sidrane
729d1c32d3 Rename nxphlite-v3 to NXP fmuk66-v3 (#10927) 2018-11-28 12:13:21 -05:00
Daniel Agar
abb3817d31 boards new split VENDOR_MODEL naming convention 2018-11-26 14:40:14 -08:00
Beat Küng
37338e442f NuttX shell scripts: replace operator == with =
- NuttX supports both versions
- POSIX shell only supports '='
2018-09-27 23:39:20 +02:00
mcsauder
c390d02f1c Tidy up an OUTPUT_DEV set/unset in rc.interace and rcS. 2018-09-25 07:55:03 +02:00
mcsauder
0d0fcb140c Updated rc.vtol_defaults to correct PWM_AUX behavior for VTOL airframes. Added PWM_AUX_RATE to rc.vtol_default and set parameters directly instead of environment variables. 2018-09-17 20:28:09 -04:00
bresch
740e409016 PWM - Add PWM_MIN and PWM_MAX parameters for MAIN and AUX (#10452) 2018-09-16 18:07:29 -04:00
David Sidrane
f5295d7700 rc.interface:Use tune_control 2018-08-30 19:11:17 +02:00
bresch
04c765f497 Failsafe PWM - Add PWM_MAIN/AUX_FAILx parameters to set "failsafe" values. 2018-08-28 11:23:25 -04:00
Beat Küng
5ebd0116de rc.interface: allow setting a custom MIXER_FILE 2018-08-13 21:50:14 -04:00
Beat Küng
a00f7ebf47 sitl scripts: refactor to use existing rc.vehicle_setup from NuttX 2018-08-13 21:50:14 -04:00
Beat Küng
fcd3a04b07 rc.interface: remove unnecessary fmu start for RC input
RC input is now handled via rc_input module
2018-08-13 21:50:14 -04:00
Beat Küng
9ba2e91fa1 ROMFS: avoid empty 'then else' clause, it's an error in bash
Use 'if ! <cmd>' instead.
2018-08-13 21:50:14 -04:00
mcsauder
1fe526b8eb Updated and added full stops to comments and did some comment/whitespace formatting in the startup scripts. 2018-07-31 09:06:03 +02:00
Daniel Agar
658237f36a px4fmu move RC input to new rc_input driver 2018-07-30 10:32:56 -04:00
mcsauder
ac8f44268b Added remaining two channels of PWM_AUX_DIS disarm parameter set commands, remove trailing whitespace from pwm_params_aux.c and pwm_params_main.c, gps/params.c and added block comment headers to separate sections instead of whitespace. 2018-07-30 09:36:44 +02:00
mcsauder
8da1e67050 Move OUTPUT_MODE logic from rcS to rc.interface. 2018-07-26 08:17:52 +02:00
mcsauder
ee3e34cd06 Move UART mapping comments back to top level rcS script. Deprecate PWM_ACHDIS and replace with PWM_AUX_OUT and set PWM_AUX_DIS value directly in vtol airframe config files. Replace tone_alarm instances with tune_control and default tune enums, and relocate an OUTPUT_MODE == fmu logic block in rcS. 2018-07-24 18:44:55 +02:00
mcsauder
bccda56ed3 Re-order hardware specific logic in rc.interface. 2018-07-19 10:35:18 +02:00
mcsauder
6f63553824 Move MNT_MODE_IN / MOUNT_MODE_OUT logic block to rc.interface and move dataman, send_event, and load_mon startup just below uorb and tone_alarm startup in the rcS script. 2018-07-19 10:35:18 +02:00
mcsauder
1d7dbdddca Add pwm failsafe -c argument to rc.interface, reference issue #9775. 2018-07-18 08:05:31 +02:00
mcsauder
71ceb0cfd6 Copy/paste logic in rc.interface to group MIXER and MIXER_AUX logic, alphabetize hardware list in rc.interface, alphabetize set/unset lists in rcS, and add -p argument to pwm failsafe calls per issue #9775. 2018-07-18 08:05:31 +02:00
Daniel Agar
00c34d8a2b AV-X board support 2018-07-08 10:18:13 -04:00
Beat Küng
77cea8844f ROMFS: fix SYS_USE_IO==0
When SYS_USE_IO was disabled, px4io would not start and thus there was no
RC. SYS_USE_IO=0 is interesting on Quads to avoid the IO and reduce output
latency.

Tested on Pixhawk 1 and Pixhawk 4
2018-05-28 19:03:33 +02:00
nathan
f754d092f8 Initial omnibusf4sd target support
Flight tested: ekf2 w/ mag and compass by @nathantsoi: https://logs.px4.io/plot_app?log=79b81031-cf1e-41f0-890b-d6cd7d559766

NOTE: external I2C devices need a pullup. I have tested with a 3.3v 2.2k pullup.

Working:
 - mpu6000, bench tested and verified via nsh
 - fmu
 - all 6 ch output bench tested w/ pwm and oneshot via nsh
 - ppm input bench tested
 - dsm input bench tested
 - bmp280, bench tested and verified via nsh
 - hmc5883, bench tested and verified via nsh, but requires an external i2c pullup
 - gps on uart6
 - startuplog, nsh, mavlink on uart4, but params are not sent for some reason. RSSI pin is TX, MOTOR 5 is RX (normal mode, 57600 baud)
 - rgbled over i2c, bench tested and workingp
 - sbus via the shared sbus/ppm pin (which includes an inverter to the mcu SBUS in pin), remove the solder bridge or jumper to the ppm pin before use

Not yet implemented:
  - ADC
  - OSD: passthrough video is untested, use at your own risk until a basic driver is implemented.
2018-05-20 11:54:17 +02:00
Beat Küng
06df2fcb65 rc.interface: disable AUX mixer on NXPHLITE_V3 2018-03-12 11:56:59 +01:00
Beat Küng
37a082255a rc.interface: enable aux mixer for FMU-v5 2018-02-16 07:58:40 +01:00
Beat Küng
a56d2ab981 rc.interface: merge 'ver hwcmp' for different boards 2018-01-10 07:59:32 +01:00
Daniel Agar
4e6ca271e7 more px4fmu-v1 cleanup (#7981) 2017-09-20 00:04:23 -04:00
David Sidrane
62a2351a72 ROMFS:Removed FMUv1 from rcS etal 2017-09-10 13:37:23 -04:00
sanderux
220bd82b93 Per channel PWM disarmed values 2017-08-09 22:28:05 +02:00
Beat Küng
0668d61665 SYS_FMU_TASK: add param to start fmu as task (default=work queue) 2017-07-18 20:06:10 +02:00
Beat Küng
9e4d1235ac pwm command: fix -e param (it was just ignored)
to keep the behavior the same, remove the -e flags from all pwm commands
that use it in the scripts.
2017-07-14 11:57:11 +02:00
Beat Küng
3f3ac414e3 fix rc.interface: do not append .mix when setting MIXER_AUX
Because further down the mixer file is set as:
	set MIXER_AUX_FILE /etc/mixers/${MIXER_AUX}.aux.mix
2017-04-24 16:46:28 +02:00
Beat Küng
ce2502a74c rc.interface: fix indentation 2017-04-18 11:58:18 +02:00
Lorenz Meier
494d2c9ecf ROMFS: Enable robust PWM command mode during startup 2016-12-26 15:34:53 +01:00