File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -565,7 +565,7 @@ void PWMOut::update_params()
565
565
int32_t pwm_min = -1 ;
566
566
567
567
if (param_get (param_find (str), &pwm_min) == PX4_OK) {
568
- if (pwm_min >= 0 ) {
568
+ if (pwm_min >= 0 && pwm_min != 1000 ) {
569
569
_mixing_output.minValue (i) = math::constrain (pwm_min, (int32_t ) PWM_LOWEST_MIN, (int32_t ) PWM_HIGHEST_MIN);
570
570
571
571
if (pwm_min != _mixing_output.minValue (i)) {
@@ -585,7 +585,7 @@ void PWMOut::update_params()
585
585
int32_t pwm_max = -1 ;
586
586
587
587
if (param_get (param_find (str), &pwm_max) == PX4_OK) {
588
- if (pwm_max >= 0 ) {
588
+ if (pwm_max >= 0 && pwm_max != 2000 ) {
589
589
_mixing_output.maxValue (i) = math::constrain (pwm_max, (int32_t ) PWM_LOWEST_MAX, (int32_t ) PWM_HIGHEST_MAX);
590
590
591
591
if (pwm_max != _mixing_output.maxValue (i)) {
@@ -622,7 +622,7 @@ void PWMOut::update_params()
622
622
int32_t pwm_dis = -1 ;
623
623
624
624
if (param_get (param_find (str), &pwm_dis) == PX4_OK) {
625
- if (pwm_dis >= 0 ) {
625
+ if (pwm_dis >= 0 && pwm_dis != 900 ) {
626
626
_mixing_output.disarmedValue (i) = math::constrain (pwm_dis, (int32_t ) 0 , (int32_t ) PWM_HIGHEST_MAX);
627
627
628
628
if (pwm_dis != _mixing_output.disarmedValue (i)) {
Original file line number Diff line number Diff line change @@ -743,7 +743,7 @@ void PX4IO::update_params()
743
743
int32_t pwm_min = -1 ;
744
744
745
745
if (param_get (param_find (str), &pwm_min) == PX4_OK) {
746
- if (pwm_min >= 0 ) {
746
+ if (pwm_min >= 0 && pwm_min != 1000 ) {
747
747
_mixing_output.minValue (i) = math::constrain (pwm_min, static_cast <int32_t >(PWM_LOWEST_MIN),
748
748
static_cast <int32_t >(PWM_HIGHEST_MIN));
749
749
@@ -768,7 +768,7 @@ void PX4IO::update_params()
768
768
int32_t pwm_max = -1 ;
769
769
770
770
if (param_get (param_find (str), &pwm_max) == PX4_OK) {
771
- if (pwm_max >= 0 ) {
771
+ if (pwm_max >= 0 && pwm_max != 2000 ) {
772
772
_mixing_output.maxValue (i) = math::constrain (pwm_max, static_cast <int32_t >(PWM_LOWEST_MAX),
773
773
static_cast <int32_t >(PWM_HIGHEST_MAX));
774
774
@@ -816,7 +816,7 @@ void PX4IO::update_params()
816
816
int32_t pwm_dis = -1 ;
817
817
818
818
if (param_get (param_find (str), &pwm_dis) == PX4_OK) {
819
- if (pwm_dis >= 0 ) {
819
+ if (pwm_dis >= 0 && pwm_dis != 900 ) {
820
820
_mixing_output.disarmedValue (i) = math::constrain (pwm_dis, static_cast <int32_t >(0 ),
821
821
static_cast <int32_t >(PWM_HIGHEST_MAX));
822
822
You can’t perform that action at this time.
0 commit comments