removed handling of tariff, as this is not downloaded to dc
This commit is contained in:
parent
af337874a6
commit
57b82094c8
13
update.cpp
13
update.cpp
@ -43,7 +43,7 @@ Update::Update(QString update_ctrl_file,
|
||||
, m_init(true)
|
||||
, m_delete(hw == nullptr) {
|
||||
|
||||
qCritical() << "workingDir" << m_workingDir;
|
||||
// qCritical() << "workingDir" << m_workingDir;
|
||||
|
||||
execUpdateScript();
|
||||
|
||||
@ -103,12 +103,12 @@ bool Update::execUpdateScript() {
|
||||
}
|
||||
|
||||
bool Update::updateBinary(char const *fileToSendToDC) {
|
||||
return true; // debug
|
||||
// return true; // debug
|
||||
return m_hw->dc_updateDC(fileToSendToDC, m_baudrate, m_serialInterface);
|
||||
}
|
||||
|
||||
bool Update::updatePrinterConf(int nrOfTemplate, char const *fileToSendToDC) {
|
||||
return true; // debug
|
||||
// return true; // debug
|
||||
QVector<int> printTemplates{ nrOfTemplate };
|
||||
QVector<QString> filesToSend{ fileToSendToDC };
|
||||
return m_hw->dc_updatePrinterTemplate(hwapi::FileTypeJson::PRINTER,
|
||||
@ -208,13 +208,6 @@ bool Update::doUpdate() {
|
||||
qInfo() << "Downloaded" << name;
|
||||
}
|
||||
} else
|
||||
//if (name.contains("tariff") && name.endsWith(".json")) {
|
||||
// int i = name.indexOf("tariff");
|
||||
// int templateIdx = name.mid(i).midRef(6, 2).toInt();
|
||||
// if ((res = updatePrinterConf(templateIdx, name.toStdString().c_str())) == true) {
|
||||
// qInfo() << "Downloaded" << name;
|
||||
// }
|
||||
//} else
|
||||
if (name.contains("opkg")) {
|
||||
int i = name.indexOf("opkg ");
|
||||
QString rest = name.mid(i+5).trimmed();
|
||||
|
Loading…
Reference in New Issue
Block a user