From 57b82094c8230973789d208d7da1547fe274c473 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Tue, 30 May 2023 16:49:48 +0200 Subject: [PATCH] removed handling of tariff, as this is not downloaded to dc --- update.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/update.cpp b/update.cpp index 306c0ac..e1bce05 100644 --- a/update.cpp +++ b/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 printTemplates{ nrOfTemplate }; QVector 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();