Addressed review comments from #9769

This commit is contained in:
Alessandro Simovic
2018-07-05 14:17:55 +02:00
committed by Beat Küng
parent df257c6555
commit 155089c800
3 changed files with 8 additions and 12 deletions
+4 -5
View File
@@ -52,8 +52,6 @@
* @group Events
* @boolean
* @reboot_required true
* @value 0 OFF
* @value 1 ON
*/
PARAM_DEFINE_INT32(EV_TSK_STAT_DIS, 0);
@@ -61,12 +59,13 @@ PARAM_DEFINE_INT32(EV_TSK_STAT_DIS, 0);
* RC Loss Alarm
*
* Enable/disable event task for RC Loss. When enabled, an alarm tune will be
* played via buzzer or ESCs, if supported.
* played via buzzer or ESCs, if supported. The alarm will sound after a disarm,
* if the vehicle was previously armed and only if the vehicle had RC signal at
* some point. Particularly useful for locating crashes drones without a GPS
* sensor.
*
* @group Events
* @boolean
* @reboot_required true
* @value 0 OFF
* @value 1 ON
*/
PARAM_DEFINE_INT32(EV_TSK_RC_LOSS, 0);
+4 -4
View File
@@ -94,15 +94,15 @@ void RC_Loss_Alarm::process()
void RC_Loss_Alarm::play_tune()
{
struct tune_control_s tune_control = {};
tune_control.tune_id = static_cast<int>(TuneID::ERROR_TUNE);
tune_control.strength = tune_control_s::STRENGTH_MAX;
tune_control.tune_override = 1;
tune_control.timestamp = hrt_absolute_time();
if (_tune_control_pub == nullptr) {
_tune_control_pub = orb_advertise(ORB_ID(tune_control), &tune_control);
} else {
tune_control.tune_id = static_cast<int>(TuneID::ERROR_TUNE);
tune_control.strength = tune_control_s::STRENGTH_MAX;
tune_control.tune_override = 1;
tune_control.timestamp = hrt_absolute_time();
orb_publish(ORB_ID(tune_control), _tune_control_pub, &tune_control);
}
}
-3
View File
@@ -68,9 +68,6 @@ private:
/** Publish tune control to sound alarm */
void play_tune();
/** Publish tune control to stop any ongoing tune, including alarm */
void stop_tune();
int _vehicle_status_sub = -1;
struct vehicle_status_s _vehicle_status = {};
bool _was_armed = false;