tr("There are locally changed parameters. Please transmit them first (<TRANSMIT>) or update them with the onboard values (<REFRESH>) before storing onboard from RAM to ROM."));
emittextMessageReceived(uasId,0,MAV_SEVERITY_WARNING,QString("QGC WARNING: Parameter name %1 is more than %2 bytes long. This might lead to errors and mishaps!").arg(parameter).arg(MAVLINK_MSG_PARAM_REQUEST_READ_FIELD_PARAM_ID_LEN-1));
/** @brief Set current mode of operation, e.g. auto or manual, does not check the arming status, for anything else than arming/disarming operations use setMode instead */
setParameterStatusMsg(tr("SUCCESS: Wrote %2 (#%1): %3").arg(paramId+1).arg(paramName).arg(value.toDouble()));
}
if(!writeMismatch){
if(0==waitingWritesCount){
setParameterStatusMsg(tr("SUCCESS: Wrote all params for component %1").arg(compId));
if(persistParamsAfterSend){
writeParamsToPersistentStorage();
persistParamsAfterSend=false;
}
}
}
else{
// Mismatch, tell user
setParameterStatusMsg(tr("FAILURE: Wrote %1: sent %2 != onboard %3").arg(paramName).arg(compMissingWrites->value(paramName).toDouble()).arg(value.toDouble()),
ParamCommsStatusLevel_Warning);
}
}
else{
intwaitingReadsCount=compMissingReads->count();
if(0==waitingReadsCount){
// Transmission done
QTimetime=QTime::currentTime();
QStringtimeString=time.toString();
setParameterStatusMsg(tr("All received. (updated at %1)").arg(timeString));
//TODO warn the user somehow ?? Appears these are saved currently with mav ID 0 but mav ID is often nonzero?
QStringmsg=tr("The parameters in the stream have been saved from system %1, but the currently selected system has the ID %2.").arg(lineMavId).arg(uasId);
qDebug()<<msg;
//MainWindow::instance()->showCriticalMessage(
// tr("Parameter loading warning"),
// tr("The parameters from the file %1 have been saved from system %2, but the currently selected system has the ID %3. If this is unintentional, please click on <READ> to revert to the parameters that are currently onboard").arg(fileName).arg(wpParams.at(0).toInt()).arg(mav->getUASID()));