Skip to content

Commit

Permalink
Add parameter to start LTEST and IR-Lock
Browse files Browse the repository at this point in the history
  • Loading branch information
dvornikov-aa committed Apr 12, 2019
1 parent 99aa0f1 commit 874da05
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
2 changes: 0 additions & 2 deletions ROMFS/px4fmu_common/init.d/rc.mc_apps
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,3 @@ mc_pos_control start
# Start Land Detector
#
land_detector start multicopter

landing_target_estimator start
6 changes: 5 additions & 1 deletion ROMFS/px4fmu_common/init.d/rc.sensors
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,11 @@ then
fi
fi

irlock start -b i2cbus
# Landing target estimator is enabled with IR-Lock
if param compare LTEST_EN 2
then
irlock start
fi

# Wait 20 ms for sensors (because we need to wait for the HRT and work queue callbacks to fire)
usleep 20000
Expand Down
6 changes: 6 additions & 0 deletions ROMFS/px4fmu_common/init.d/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,12 @@ fi
fi
fi

# Landing target estimator
if param greater LTEST_EN 0
then
landing_target_estimator start
fi

sh /etc/init.d/rc.logging

# End of autostart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,16 @@ PARAM_DEFINE_FLOAT(LTEST_SCALE_X, 1.0f);
* @group Landing target Estimator
*/
PARAM_DEFINE_FLOAT(LTEST_SCALE_Y, 1.0f);

/**
* Landing target estimator
*
* @reboot_required true
* @min 0
* @max 2
* @group Landing target Estimator
* @value 0 Disabled
* @value 1 Estimator only
* @value 2 IR-Lock
*/
PARAM_DEFINE_INT32(LTEST_EN, 0);

0 comments on commit 874da05

Please sign in to comment.