This commit is contained in:
Your Name
2024-04-27 15:44:26 -05:00
parent 50be724af1
commit b6e1ed1d06
39 changed files with 32 additions and 4980 deletions

View File

@@ -69,7 +69,8 @@ class FrogPilotFunctions:
@classmethod
def backup_frogpilot(cls):
frogpilot_backup_directory = "/data/backups"
# CLEARPILOT - changed backups to /data/cp_backups
frogpilot_backup_directory = "/data/cp_backups"
os.makedirs(frogpilot_backup_directory, exist_ok=True)
auto_backups = sorted(glob.glob(os.path.join(frogpilot_backup_directory, "*_auto")),
@@ -99,7 +100,8 @@ class FrogPilotFunctions:
if value is not None:
params_storage.put(key, value)
toggle_backup_directory = "/data/toggle_backups"
# CLEARPILOT changed to cp_toggle_backups
toggle_backup_directory = "/data/cp_toggle_backups"
os.makedirs(toggle_backup_directory, exist_ok=True)
auto_backups = sorted(glob.glob(os.path.join(toggle_backup_directory, "*_auto")),
@@ -142,15 +144,17 @@ class FrogPilotFunctions:
if os.listdir('/persist/comma/params') and os.listdir('/persist/params'):
shutil.rmtree('/persist/comma/params')
frogpilot_boot_logo = f'{BASEDIR}/selfdrive/frogpilot/assets/other_images/frogpilot_boot_logo.png'
boot_logo_location = '/usr/comma/bg.jpg'
# CLEARPILOT
# Disable boot logo
#frogpilot_boot_logo = f'{BASEDIR}/selfdrive/frogpilot/assets/other_images/frogpilot_boot_logo.png'
#boot_logo_location = '/usr/comma/bg.jpg'
remount_cmd = ['sudo', 'mount', '-o', 'remount,rw', '/']
cls.run_cmd(remount_cmd, "File system remounted as read-write.", "Failed to remount file system")
#remount_cmd = ['sudo', 'mount', '-o', 'remount,rw', '/']
#cls.run_cmd(remount_cmd, "File system remounted as read-write.", "Failed to remount file system")
if not filecmp.cmp(frogpilot_boot_logo, boot_logo_location, shallow=False):
copy_cmd = ['sudo', 'cp', frogpilot_boot_logo, boot_logo_location]
cls.run_cmd(copy_cmd, "Successfully replaced bg.jpg with frogpilot_boot_logo.png.", "Failed to replace boot logo")
#if not filecmp.cmp(frogpilot_boot_logo, boot_logo_location, shallow=False):
# copy_cmd = ['sudo', 'cp', frogpilot_boot_logo, boot_logo_location]
# cls.run_cmd(copy_cmd, "Successfully replaced bg.jpg with frogpilot_boot_logo.png.", "Failed to replace boot logo")
@classmethod
def uninstall_frogpilot(cls):