mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-10 02:03:57 +08:00
Logging
This commit is contained in:
@@ -174,7 +174,7 @@ def restart_processes(sm):
|
||||
|
||||
if not any(ps.ignitionLine or ps.ignitionCan for ps in sm["pandaStates"] if ps.pandaType != log.PandaState.PandaType.unknown):
|
||||
for name in ["mapd", "ui"]:
|
||||
get_managed_processes()[name].stop(block=True, retry=True, sig=signal.SIGKILL)
|
||||
get_managed_processes()[name].stop(block=False, retry=False, sig=signal.SIGKILL)
|
||||
|
||||
def run_cmd(cmd, success_message, fail_message, report=True):
|
||||
try:
|
||||
|
||||
@@ -391,7 +391,7 @@ class FrogPilotVariables:
|
||||
self.vetting_branch = self.short_branch == "FrogPilot-Vetting"
|
||||
|
||||
self.frogpilot_toggles.frogs_go_moo = Path("/persist/frogsgomoo.py").is_file()
|
||||
self.frogpilot_toggles.block_user = self.development_branch and not self.frogpilot_toggles.frogs_go_moo
|
||||
self.frogpilot_toggles.block_user = False
|
||||
|
||||
self.frogpilot_toggles.use_konik_server = params.get_bool("UseKonikServer")
|
||||
self.frogpilot_toggles.use_konik_server |= Path("/data/openpilot/not_vetted").is_file()
|
||||
|
||||
@@ -7,6 +7,7 @@ fi
|
||||
source "$BASEDIR/launch_env.sh"
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
ONCE_FLAG_FILE="/data/openpilot/.setup_done"
|
||||
|
||||
function agnos_init {
|
||||
# TODO: move this to agnos
|
||||
@@ -31,6 +32,24 @@ function agnos_init {
|
||||
fi
|
||||
}
|
||||
|
||||
function one_time_setup {
|
||||
if [ ! -f "$ONCE_FLAG_FILE" ]; then
|
||||
echo "Performing one-time setup tasks..."
|
||||
|
||||
# Run once:
|
||||
echo "Wiping old params..."
|
||||
rm /data/params/d/DongleId
|
||||
rm /data/params/d/StockDongleId
|
||||
rm /cache/params/d/DongleId
|
||||
rm /cache/params/d/StockDongleId
|
||||
echo "Old params wiped."
|
||||
|
||||
touch "$ONCE_FLAG_FILE"
|
||||
else
|
||||
echo "One-time setup already completed. Skipping."
|
||||
fi
|
||||
}
|
||||
|
||||
function launch {
|
||||
# Remove orphaned git lock if it exists on boot
|
||||
[ -f "$DIR/.git/index.lock" ] && rm -f $DIR/.git/index.lock
|
||||
@@ -78,6 +97,9 @@ function launch {
|
||||
agnos_init
|
||||
fi
|
||||
|
||||
# Perform one-time setup tasks
|
||||
one_time_setup
|
||||
|
||||
# write tmux scrollback to a file
|
||||
tmux capture-pane -pq -S-1000 > /tmp/launch_log
|
||||
|
||||
|
||||
Reference in New Issue
Block a user