The profile tab now shows if there is radio settings like calibration data in the profile or not. It also displays a starage date for the data.

The radio settings are time stamped when they are saved to profile. I would prefer to stamp them when they are retrieved from the sender, but this is not possible in any good way with the current file format. I intended to use file storage times, but this turned out to be a bad idea since the date can get screwed up in a lot of different ways.
This commit is contained in:
Kjell Kernen
2014-03-18 14:35:06 +01:00
parent c55ee5f404
commit b3cb503a0d
5 changed files with 141 additions and 69 deletions
+17 -4
View File
@@ -69,12 +69,13 @@ void appPreferencesDialog::writeValues()
else
g.profile[g.id()].name(ui->profileNameLE->text());
// If a new radio type has been choosen, several things need to change
// If a new radio type has been choosen, several things need to reset
if ( initialRadioType != ui->radioCB->currentIndex())
{
g.profile[g.id()].fwName("");
g.profile[g.id()].fwType(getDefaultFwType(ui->radioCB->currentIndex()));
current_firmware_variant = GetFirmwareVariant(g.profile[g.id()].fwType());
current_firmware_variant = GetFirmwareVariant(g.profile[g.id()].fwType());
g.profile[g.id()].initFwVariables();
}
}
@@ -156,11 +157,23 @@ void appPreferencesDialog::initSettings()
ui->sdPath->setText(g.profile[g.id()].sdPath());
ui->profileNameLE->setText(g.profile[g.id()].name());
ui->SplashFileName->setText(g.profile[g.id()].splashFile());
initialRadioType = getRadioType(g.profile[g.id()].fwType());
ui->radioCB->setCurrentIndex(initialRadioType);
displayImage( g.profile[g.id()].splashFile() );
QString hwSettings;
if (g.profile[g.id()].stickPotCalib() == "" ) {
hwSettings = QString(tr("EMPTY: No radio settings stored in profile"));
}
else {
QString str = g.profile[g.id()].timeStamp();
if (str.isEmpty())
hwSettings = QString(tr("AVAILABLE: Radio settings of unknown age"));
else
hwSettings = QString(tr("AVAILABLE: Radio settings stored %1").arg(str));
}
ui->lblGeneralSettings->setText(hwSettings);
}
void appPreferencesDialog::on_libraryPathButton_clicked()