diff --git a/selfdrive/hardware/tici/agnos.py b/selfdrive/hardware/tici/agnos.py index 340e0887e4..8dba363bd1 100755 --- a/selfdrive/hardware/tici/agnos.py +++ b/selfdrive/hardware/tici/agnos.py @@ -150,7 +150,8 @@ def flash_partition(target_slot_number: int, partition: dict, cloudlog): for chunk in unsparsify(downloader): raw_hash.update(chunk) out.write(chunk) - print(f"Installing {partition['name']}: {out.tell() / partition_size * 100}", file=sys.stderr) + p = int(out.tell() / partition_size * 100) + print(f"Installing {partition['name']}: {p}") if raw_hash.hexdigest().lower() != partition['hash_raw'].lower(): raise Exception(f"Unsparse hash mismatch '{raw_hash.hexdigest().lower()}'") diff --git a/selfdrive/hardware/tici/updater b/selfdrive/hardware/tici/updater index 2d589b83c3..5c3fab6514 100755 --- a/selfdrive/hardware/tici/updater +++ b/selfdrive/hardware/tici/updater @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a242a48497a398be53dee2cbe7f1f11f37c0b3ad28c5bee51b5ab16ef0de1019 -size 7820552 +oid sha256:5a3feb8ff998745e6a25ded05fcd310453948d4d7bc525eba95ce05d6e2fb809 +size 7829896 diff --git a/selfdrive/ui/qt/setup/updater.cc b/selfdrive/ui/qt/setup/updater.cc index f35a062c90..c8055a9c08 100644 --- a/selfdrive/ui/qt/setup/updater.cc +++ b/selfdrive/ui/qt/setup/updater.cc @@ -136,24 +136,24 @@ Updater::Updater(const QString &updater_path, const QString &manifest_path, QWid void Updater::installUpdate() { setCurrentWidget(progress); - QObject::connect(&proc, &QProcess::readyReadStandardError, this, &Updater::readProgress); + QObject::connect(&proc, &QProcess::readyReadStandardOutput, this, &Updater::readProgress); QObject::connect(&proc, QOverload::of(&QProcess::finished), this, &Updater::updateFinished); - proc.setProcessChannelMode(QProcess::ForwardedOutputChannel); + proc.setProcessChannelMode(QProcess::ForwardedErrorChannel); proc.start(updater, {"--swap", manifest}); } void Updater::readProgress() { - auto lines = QString(proc.readAllStandardError()); + auto lines = QString(proc.readAllStandardOutput()); for (const QString &line : lines.trimmed().split("\n")) { auto parts = line.split(":"); if (parts.size() == 2) { text->setText(parts[0]); bar->setValue((int)parts[1].toDouble()); - repaint(); } else { qDebug() << line; } } + update(); } void Updater::updateFinished(int exitCode, QProcess::ExitStatus exitStatus) {