This commit is contained in:
Your Name
2024-02-13 04:00:11 -06:00
parent 794b1d8bdd
commit e2ebe7048c
3 changed files with 13 additions and 6 deletions

View File

@@ -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);

View File

@@ -9,6 +9,7 @@ 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
echo Reverted custom logo for comma boot sequence
sudo sync
sleep 2
sudo reboot

View File

@@ -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"
{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