PX4 Firmware
PX4 Autopilot Software http://px4.io
pwm_params_main.c File Reference

Parameters defined for PWM output. More...

Go to the source code of this file.

Functions

 PARAM_DEFINE_INT32 (PWM_RATE, 400)
 Set the PWM output frequency for the main outputs. More...
 
 PARAM_DEFINE_INT32 (PWM_MIN, 1000)
 Set the minimum PWM for the main outputs. More...
 
 PARAM_DEFINE_INT32 (PWM_MAX, 2000)
 Set the maximum PWM for the main outputs. More...
 
 PARAM_DEFINE_INT32 (PWM_DISARMED, 900)
 Set the disarmed PWM for the main outputs. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_MIN1, -1)
 Set the min PWM value for the main 1 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_MIN2, -1)
 Set the min PWM value for the main 2 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_MIN3, -1)
 Set the min PWM value for the main 3 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_MIN4, -1)
 Set the min PWM value for the main 4 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_MIN5, -1)
 Set the min PWM value for the main 5 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_MIN6, -1)
 Set the min PWM value for the main 6 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_MIN7, -1)
 Set the min PWM value for the main 7 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_MIN8, -1)
 Set the min PWM value for the main 8 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_MAX1, -1)
 Set the max PWM value for the main 1 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_MAX2, -1)
 Set the max PWM value for the main 2 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_MAX3, -1)
 Set the max PWM value for the main 3 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_MAX4, -1)
 Set the max PWM value for the main 4 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_MAX5, -1)
 Set the max PWM value for the main 5 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_MAX6, -1)
 Set the max PWM value for the main 6 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_MAX7, -1)
 Set the max PWM value for the main 7 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_MAX8, -1)
 Set the max PWM value for the main 8 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_FAIL1, -1)
 Set the failsafe PWM for the main 1 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_FAIL2, -1)
 Set the failsafe PWM for the main 2 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_FAIL3, -1)
 Set the failsafe PWM for the main 3 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_FAIL4, -1)
 Set the failsafe PWM for the main 4 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_FAIL5, -1)
 Set the failsafe PWM for the main 5 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_FAIL6, -1)
 Set the failsafe PWM for the main 6 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_FAIL7, -1)
 Set the failsafe PWM for the main 7 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_FAIL8, -1)
 Set the failsafe PWM for the main 8 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_DIS1, -1)
 Set the disarmed PWM for the main 1 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_DIS2, -1)
 Set the disarmed PWM for the main 2 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_DIS3, -1)
 Set the disarmed PWM for the main 3 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_DIS4, -1)
 Set the disarmed PWM for the main 4 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_DIS5, -1)
 Set the disarmed PWM for the main 5 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_DIS6, -1)
 Set the disarmed PWM for the main 6 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_DIS7, -1)
 Set the disarmed PWM for the main 7 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_DIS8, -1)
 Set the disarmed PWM for the main 8 output. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_REV1, 0)
 Invert direction of main output channel 1. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_REV2, 0)
 Invert direction of main output channel 2. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_REV3, 0)
 Invert direction of main output channel 3. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_REV4, 0)
 Invert direction of main output channel 4. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_REV5, 0)
 Invert direction of main output channel 5. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_REV6, 0)
 Invert direction of main output channel 6. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_REV7, 0)
 Invert direction of main output channel 7. More...
 
 PARAM_DEFINE_INT32 (PWM_MAIN_REV8, 0)
 Invert direction of main output channel 8. More...
 
 PARAM_DEFINE_FLOAT (PWM_MAIN_TRIM1, 0)
 Trim value for main output channel 1. More...
 
 PARAM_DEFINE_FLOAT (PWM_MAIN_TRIM2, 0)
 Trim value for main output channel 2. More...
 
 PARAM_DEFINE_FLOAT (PWM_MAIN_TRIM3, 0)
 Trim value for main output channel 3. More...
 
 PARAM_DEFINE_FLOAT (PWM_MAIN_TRIM4, 0)
 Trim value for main output channel 4. More...
 
 PARAM_DEFINE_FLOAT (PWM_MAIN_TRIM5, 0)
 Trim value for main output channel 5. More...
 
 PARAM_DEFINE_FLOAT (PWM_MAIN_TRIM6, 0)
 Trim value for main output channel 6. More...
 
 PARAM_DEFINE_FLOAT (PWM_MAIN_TRIM7, 0)
 Trim value for main output channel 7. More...
 
 PARAM_DEFINE_FLOAT (PWM_MAIN_TRIM8, 0)
 Trim value for main output channel 8. More...
 

Detailed Description

Parameters defined for PWM output.

Definition in file pwm_params_main.c.

Function Documentation

◆ PARAM_DEFINE_FLOAT() [1/8]

PARAM_DEFINE_FLOAT ( PWM_MAIN_TRIM1  ,
 
)

Trim value for main output channel 1.

Set to normalized offset

-0.2 0.2 2 PWM Outputs

◆ PARAM_DEFINE_FLOAT() [2/8]

PARAM_DEFINE_FLOAT ( PWM_MAIN_TRIM2  ,
 
)

Trim value for main output channel 2.

Set to normalized offset

-0.2 0.2 2 PWM Outputs

◆ PARAM_DEFINE_FLOAT() [3/8]

PARAM_DEFINE_FLOAT ( PWM_MAIN_TRIM3  ,
 
)

Trim value for main output channel 3.

Set to normalized offset

-0.2 0.2 2 PWM Outputs

◆ PARAM_DEFINE_FLOAT() [4/8]

PARAM_DEFINE_FLOAT ( PWM_MAIN_TRIM4  ,
 
)

Trim value for main output channel 4.

Set to normalized offset

-0.2 0.2 2 PWM Outputs

◆ PARAM_DEFINE_FLOAT() [5/8]

PARAM_DEFINE_FLOAT ( PWM_MAIN_TRIM5  ,
 
)

Trim value for main output channel 5.

Set to normalized offset

-0.2 0.2 2 PWM Outputs

◆ PARAM_DEFINE_FLOAT() [6/8]

PARAM_DEFINE_FLOAT ( PWM_MAIN_TRIM6  ,
 
)

Trim value for main output channel 6.

Set to normalized offset

-0.2 0.2 2 PWM Outputs

◆ PARAM_DEFINE_FLOAT() [7/8]

PARAM_DEFINE_FLOAT ( PWM_MAIN_TRIM7  ,
 
)

Trim value for main output channel 7.

Set to normalized offset

-0.2 0.2 2 PWM Outputs

◆ PARAM_DEFINE_FLOAT() [8/8]

PARAM_DEFINE_FLOAT ( PWM_MAIN_TRIM8  ,
 
)

Trim value for main output channel 8.

Set to normalized offset

-0.2 0.2 2 PWM Outputs

◆ PARAM_DEFINE_INT32() [1/44]

PARAM_DEFINE_INT32 ( PWM_RATE  ,
400   
)

Set the PWM output frequency for the main outputs.

Set to 400 for industry default or 1000 for high frequency ESCs.

Set to 0 for Oneshot125.

true

-1 2000 Hz PWM Outputs

◆ PARAM_DEFINE_INT32() [2/44]

PARAM_DEFINE_INT32 ( PWM_MIN  ,
1000   
)

Set the minimum PWM for the main outputs.

Set to 1000 for industry default or 900 to increase servo travel.

true

800 1400 us PWM Outputs

◆ PARAM_DEFINE_INT32() [3/44]

PARAM_DEFINE_INT32 ( PWM_MAX  ,
2000   
)

Set the maximum PWM for the main outputs.

Set to 2000 for industry default or 2100 to increase servo travel.

true

1600 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [4/44]

PARAM_DEFINE_INT32 ( PWM_DISARMED  ,
900   
)

Set the disarmed PWM for the main outputs.

This is the PWM pulse the autopilot is outputting if not armed. The main use of this parameter is to silence ESCs when they are disarmed.

true

0 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [5/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_MIN1  ,
1 
)

Set the min PWM value for the main 1 output.

This is the minimum PWM pulse the autopilot is allowed to output. When set to -1 the value for PWM_MIN will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [6/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_MIN2  ,
1 
)

Set the min PWM value for the main 2 output.

This is the minimum PWM pulse the autopilot is allowed to output. When set to -1 the value for PWM_MIN will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [7/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_MIN3  ,
1 
)

Set the min PWM value for the main 3 output.

This is the minimum PWM pulse the autopilot is allowed to output. When set to -1 the value for PWM_MIN will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [8/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_MIN4  ,
1 
)

Set the min PWM value for the main 4 output.

This is the minimum PWM pulse the autopilot is allowed to output. When set to -1 the value for PWM_MIN will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [9/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_MIN5  ,
1 
)

Set the min PWM value for the main 5 output.

This is the minimum PWM pulse the autopilot is allowed to output. When set to -1 the value for PWM_MIN will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [10/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_MIN6  ,
1 
)

Set the min PWM value for the main 6 output.

This is the minimum PWM pulse the autopilot is allowed to output. When set to -1 the value for PWM_MIN will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [11/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_MIN7  ,
1 
)

Set the min PWM value for the main 7 output.

This is the minimum PWM pulse the autopilot is allowed to output. When set to -1 the value for PWM_MIN will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [12/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_MIN8  ,
1 
)

Set the min PWM value for the main 8 output.

This is the minimum PWM pulse the autopilot is allowed to output. When set to -1 the value for PWM_MIN will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [13/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_MAX1  ,
1 
)

Set the max PWM value for the main 1 output.

This is the maximum PWM pulse the autopilot is allowed to output. When set to -1 the value for PWM_MAX will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [14/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_MAX2  ,
1 
)

Set the max PWM value for the main 2 output.

This is the maximum PWM pulse the autopilot is allowed to output. When set to -1 the value for PWM_MAX will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [15/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_MAX3  ,
1 
)

Set the max PWM value for the main 3 output.

This is the maximum PWM pulse the autopilot is allowed to output. When set to -1 the value for PWM_MAX will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [16/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_MAX4  ,
1 
)

Set the max PWM value for the main 4 output.

This is the maximum PWM pulse the autopilot is allowed to output. When set to -1 the value for PWM_MAX will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [17/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_MAX5  ,
1 
)

Set the max PWM value for the main 5 output.

This is the maximum PWM pulse the autopilot is allowed to output. When set to -1 the value for PWM_MAX will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [18/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_MAX6  ,
1 
)

Set the max PWM value for the main 6 output.

This is the maximum PWM pulse the autopilot is allowed to output. When set to -1 the value for PWM_MAX will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [19/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_MAX7  ,
1 
)

Set the max PWM value for the main 7 output.

This is the maximum PWM pulse the autopilot is allowed to output. When set to -1 the value for PWM_MAX will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [20/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_MAX8  ,
1 
)

Set the max PWM value for the main 8 output.

This is the maximum PWM pulse the autopilot is allowed to output. When set to -1 the value for PWM_MAX will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [21/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_FAIL1  ,
1 
)

Set the failsafe PWM for the main 1 output.

This is the PWM pulse the autopilot is outputting if in failsafe mode. When set to -1 the value is set automatically depending if the actuator is a motor (900us) or a servo (1500us)

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [22/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_FAIL2  ,
1 
)

Set the failsafe PWM for the main 2 output.

This is the PWM pulse the autopilot is outputting if in failsafe mode. When set to -1 the value is set automatically depending if the actuator is a motor (900us) or a servo (1500us)

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [23/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_FAIL3  ,
1 
)

Set the failsafe PWM for the main 3 output.

This is the PWM pulse the autopilot is outputting if in failsafe mode. When set to -1 the value is set automatically depending if the actuator is a motor (900us) or a servo (1500us)

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [24/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_FAIL4  ,
1 
)

Set the failsafe PWM for the main 4 output.

This is the PWM pulse the autopilot is outputting if in failsafe mode. When set to -1 the value is set automatically depending if the actuator is a motor (900us) or a servo (1500us)

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [25/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_FAIL5  ,
1 
)

Set the failsafe PWM for the main 5 output.

This is the PWM pulse the autopilot is outputting if in failsafe mode. When set to -1 the value is set automatically depending if the actuator is a motor (900us) or a servo (1500us)

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [26/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_FAIL6  ,
1 
)

Set the failsafe PWM for the main 6 output.

This is the PWM pulse the autopilot is outputting if in failsafe mode. When set to -1 the value is set automatically depending if the actuator is a motor (900us) or a servo (1500us)

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [27/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_FAIL7  ,
1 
)

Set the failsafe PWM for the main 7 output.

This is the PWM pulse the autopilot is outputting if in failsafe mode. When set to -1 the value is set automatically depending if the actuator is a motor (900us) or a servo (1500us)

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [28/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_FAIL8  ,
1 
)

Set the failsafe PWM for the main 8 output.

This is the PWM pulse the autopilot is outputting if in failsafe mode. When set to -1 the value is set automatically depending if the actuator is a motor (900us) or a servo (1500us)

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [29/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_DIS1  ,
1 
)

Set the disarmed PWM for the main 1 output.

This is the PWM pulse the autopilot is outputting if not armed. When set to -1 the value for PWM_DISARMED will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [30/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_DIS2  ,
1 
)

Set the disarmed PWM for the main 2 output.

This is the PWM pulse the autopilot is outputting if not armed. When set to -1 the value for PWM_DISARMED will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [31/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_DIS3  ,
1 
)

Set the disarmed PWM for the main 3 output.

This is the PWM pulse the autopilot is outputting if not armed. When set to -1 the value for PWM_DISARMED will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [32/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_DIS4  ,
1 
)

Set the disarmed PWM for the main 4 output.

This is the PWM pulse the autopilot is outputting if not armed. When set to -1 the value for PWM_DISARMED will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [33/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_DIS5  ,
1 
)

Set the disarmed PWM for the main 5 output.

This is the PWM pulse the autopilot is outputting if not armed. When set to -1 the value for PWM_DISARMED will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [34/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_DIS6  ,
1 
)

Set the disarmed PWM for the main 6 output.

This is the PWM pulse the autopilot is outputting if not armed. When set to -1 the value for PWM_DISARMED will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [35/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_DIS7  ,
1 
)

Set the disarmed PWM for the main 7 output.

This is the PWM pulse the autopilot is outputting if not armed. When set to -1 the value for PWM_DISARMED will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [36/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_DIS8  ,
1 
)

Set the disarmed PWM for the main 8 output.

This is the PWM pulse the autopilot is outputting if not armed. When set to -1 the value for PWM_DISARMED will be used

true

-1 2200 us PWM Outputs

◆ PARAM_DEFINE_INT32() [37/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_REV1  ,
 
)

Invert direction of main output channel 1.

Enable to invert the channel. Warning: Use this parameter when connected to a servo only. For a brushless motor, invert manually two phases to reverse the direction.

PWM Outputs

◆ PARAM_DEFINE_INT32() [38/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_REV2  ,
 
)

Invert direction of main output channel 2.

Enable to invert the channel. Warning: Use this parameter when connected to a servo only. For a brushless motor, invert manually two phases to reverse the direction.

PWM Outputs

◆ PARAM_DEFINE_INT32() [39/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_REV3  ,
 
)

Invert direction of main output channel 3.

Enable to invert the channel. Warning: Use this parameter when connected to a servo only. For a brushless motor, invert manually two phases to reverse the direction.

PWM Outputs

◆ PARAM_DEFINE_INT32() [40/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_REV4  ,
 
)

Invert direction of main output channel 4.

Enable to invert the channel. Warning: Use this parameter when connected to a servo only. For a brushless motor, invert manually two phases to reverse the direction.

PWM Outputs

◆ PARAM_DEFINE_INT32() [41/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_REV5  ,
 
)

Invert direction of main output channel 5.

Enable to invert the channel. Warning: Use this parameter when connected to a servo only. For a brushless motor, invert manually two phases to reverse the direction.

PWM Outputs

◆ PARAM_DEFINE_INT32() [42/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_REV6  ,
 
)

Invert direction of main output channel 6.

Enable to invert the channel. Warning: Use this parameter when connected to a servo only. For a brushless motor, invert manually two phases to reverse the direction.

PWM Outputs

◆ PARAM_DEFINE_INT32() [43/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_REV7  ,
 
)

Invert direction of main output channel 7.

Enable to invert the channel. Warning: Use this parameter when connected to a servo only. For a brushless motor, invert manually two phases to reverse the direction.

PWM Outputs

◆ PARAM_DEFINE_INT32() [44/44]

PARAM_DEFINE_INT32 ( PWM_MAIN_REV8  ,
 
)

Invert direction of main output channel 8.

Enable to invert the channel. Warning: Use this parameter when connected to a servo only. For a brushless motor, invert manually two phases to reverse the direction.

PWM Outputs