|
|
|
@ -561,7 +561,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
@@ -561,7 +561,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
|
|
|
|
|
|
|
|
|
|
if (statechanged && ((int)state.system_status == (int)MAV_STATE_CRITICAL || state.system_status == (int)MAV_STATE_EMERGENCY)) |
|
|
|
|
{ |
|
|
|
|
GAudioOutput::instance()->say(QString("emergency for system %1").arg(this->getUASID()), GAudioOutput::AUDIO_SEVERITY_EMERGENCY); |
|
|
|
|
GAudioOutput::instance()->say(QString("Emergency for system %1").arg(this->getUASID()), GAudioOutput::AUDIO_SEVERITY_EMERGENCY); |
|
|
|
|
QTimer::singleShot(3000, GAudioOutput::instance(), SLOT(startEmergency())); |
|
|
|
|
} |
|
|
|
|
else if (modechanged || statechanged) |
|
|
|
@ -617,7 +617,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
@@ -617,7 +617,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
|
|
|
|
|
/* warn only every 12 seconds */ |
|
|
|
|
&& (QGC::groundTimeUsecs() - lastVoltageWarning) > 12000000) |
|
|
|
|
{ |
|
|
|
|
GAudioOutput::instance()->say(QString("voltage warning: %1 volts").arg(lpVoltage, 0, 'f', 1, QChar(' '))); |
|
|
|
|
GAudioOutput::instance()->say(QString("Voltage warning for system %1: %2 volts").arg(getUASID()).arg(lpVoltage, 0, 'f', 1, QChar(' '))); |
|
|
|
|
lastVoltageWarning = QGC::groundTimeUsecs(); |
|
|
|
|
lastTickVoltageValue = tickLowpassVoltage; |
|
|
|
|
} |
|
|
|
@ -1209,7 +1209,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
@@ -1209,7 +1209,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
|
|
|
|
|
mavlink_mission_item_reached_t wpr; |
|
|
|
|
mavlink_msg_mission_item_reached_decode(&message, &wpr); |
|
|
|
|
waypointManager.handleWaypointReached(message.sysid, message.compid, &wpr); |
|
|
|
|
QString text = QString("System %1 reached waypoint %2").arg(getUASName()).arg(wpr.seq); |
|
|
|
|
QString text = QString("System %1 reached waypoint %2").arg(getUASID()).arg(wpr.seq); |
|
|
|
|
GAudioOutput::instance()->say(text); |
|
|
|
|
emit textMessageReceived(message.sysid, message.compid, MAV_SEVERITY_INFO, text); |
|
|
|
|
} |
|
|
|
@ -3360,7 +3360,7 @@ void UAS::startLowBattAlarm()
@@ -3360,7 +3360,7 @@ void UAS::startLowBattAlarm()
|
|
|
|
|
{ |
|
|
|
|
if (!lowBattAlarm) |
|
|
|
|
{ |
|
|
|
|
GAudioOutput::instance()->alert(tr("system %1 has low battery").arg(getUASName())); |
|
|
|
|
GAudioOutput::instance()->alert(tr("System %1 has low battery").arg(getUASID())); |
|
|
|
|
QTimer::singleShot(3000, GAudioOutput::instance(), SLOT(startEmergency())); |
|
|
|
|
lowBattAlarm = true; |
|
|
|
|
} |
|
|
|
|