diff --git a/selfdrive/ui/qt/body.cc b/selfdrive/ui/qt/body.cc index 6829d83..e405a39 100644 --- a/selfdrive/ui/qt/body.cc +++ b/selfdrive/ui/qt/body.cc @@ -15,6 +15,10 @@ #include "common/params.h" #include "common/timing.h" +#include "system/hardware/hw.h" +#include "selfdrive/ui/qt/qt_window.h" +#include "selfdrive/ui/qt/util.h" + LogoWidget::LogoWidget(QWidget *parent) : QWidget(parent) { setAttribute(Qt::WA_OpaquePaintEvent); setFixedSize(spinner_size); diff --git a/shell/revert_logo.sh b/shell/revert_logo.sh index 2f755a0..b933d3e 100644 --- a/shell/revert_logo.sh +++ b/shell/revert_logo.sh @@ -9,8 +9,9 @@ if [ ! -f /data/openpilot/shell/bg.jpg ]; then sudo cp /usr/comma/bg.org /usr/comma/bg.jpg # Remove /usr/comma/bg.org sudo rm /usr/comma/bg.org - sudo sync - sleep 2 - sudo reboot + echo Reverted custom logo for comma boot sequence + sudo sync + sleep 2 + sudo reboot fi fi \ No newline at end of file diff --git a/shell/set_logo.sh b/shell/set_logo.sh index e2b18d7..5f582c4 100644 --- a/shell/set_logo.sh +++ b/shell/set_logo.sh @@ -32,14 +32,16 @@ if [ "$(md5sum /usr/comma/bg.jpg | awk '{print $1}')" != "$(md5sum /data/openpil # Check if the file contains the line before which we want to insert our line. if grep -qF -- "$INSERT_BEFORE" "$FILE_PATH"; then # Use awk to insert the line before the specified pattern. + cp /usr/comma/comma.sh /tmp/comma.sh awk -v insert_line="$SEARCH_STRING" -v before_line="$INSERT_BEFORE" \ - 'BEGIN{found=0} - $0 ~ before_line && found == 0 {print insert_line; found=1} - {print}' "$FILE_PATH" > "$FILE_PATH.tmp" && mv "$FILE_PATH.tmp" "$FILE_PATH" + 'BEGIN{found=0} + $0 ~ before_line && found == 0 {print insert_line; found=1} + {print}' "/tmp/comma.sh" > "/tmp/comma.sh.tmp" && sudo mv "/tmp/comma.sh.tmp" "$FILE_PATH" fi fi fi + echo Applied custom logo for comma boot sequence sudo sync sleep 2 sudo reboot