Start Work on Firmware Update

This patch implements the first step towards OSTC 3 firmware update.
Its not much, just file selection, but I will build up on it from there.

Implements a thread to initiate firmware updates. Currently, this is
for the OSTC 3.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
This commit is contained in:
Joseph W. Joshua 2014-06-23 18:16:27 +03:00 committed by Thiago Macieira
parent 8aa7fddb22
commit cc6c385f33
7 changed files with 94 additions and 14 deletions

View file

@ -24,10 +24,10 @@ void ConfigureDiveComputer::readSettings(device_data_t *data)
readThread->deleteLater();
readThread = new ReadSettingsThread(this, data);
connect (readThread, SIGNAL(finished()),
connect(readThread, SIGNAL(finished()),
this, SLOT(readThreadFinished()), Qt::QueuedConnection);
connect (readThread, SIGNAL(error(QString)), this, SLOT(setError(QString)));
connect (readThread, SIGNAL(devicedetails(DeviceDetails*)), this,
connect(readThread, SIGNAL(error(QString)), this, SLOT(setError(QString)));
connect(readThread, SIGNAL(devicedetails(DeviceDetails*)), this,
SIGNAL(deviceDetailsChanged(DeviceDetails*)));
readThread->start();
@ -41,9 +41,9 @@ void ConfigureDiveComputer::saveDeviceDetails(DeviceDetails *details, device_dat
writeThread->deleteLater();
writeThread = new WriteSettingsThread(this, data);
connect (writeThread, SIGNAL(finished()),
connect(writeThread, SIGNAL(finished()),
this, SLOT(writeThreadFinished()), Qt::QueuedConnection);
connect (writeThread, SIGNAL(error(QString)), this, SLOT(setError(QString)));
connect(writeThread, SIGNAL(error(QString)), this, SLOT(setError(QString)));
writeThread->setDeviceDetails(details);
writeThread->start();
@ -417,6 +417,11 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
return true;
}
void ConfigureDiveComputer::startFirmwareUpdate(QString fileName, device_data_t *data, QString errorText)
{
}
void ConfigureDiveComputer::setState(ConfigureDiveComputer::states newState)
{
currentState = newState;