mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-30 19:33:45 +08:00
StarPilot
This commit is contained in:
@@ -67,18 +67,13 @@
|
||||
},
|
||||
{
|
||||
"name": "system",
|
||||
"url": "https://commadist.azureedge.net/agnosupdate/system-e0007afa5d1026671c1943d44bb7f7ad26259f673392dd00a03073a2870df087.img.xz",
|
||||
"hash": "1468d50b7ad0fda0f04074755d21e786e3b1b6ca5dd5b17eb2608202025e6126",
|
||||
"hash_raw": "e0007afa5d1026671c1943d44bb7f7ad26259f673392dd00a03073a2870df087",
|
||||
"url": "https://www.dropbox.com/scl/fi/1l949sdyse7mgiz2n09t7/system.img.xz?rlkey=63kws9ktx9pr9c7su2vgtf9xc&st=sm8qfkp3&dl=1",
|
||||
"hash": "d26f8e0f105a93ea0b386f259e1597d1cb10720cb6406491c570749e01d550c1",
|
||||
"hash_raw": "d26f8e0f105a93ea0b386f259e1597d1cb10720cb6406491c570749e01d550c1",
|
||||
"size": 5368709120,
|
||||
"sparse": true,
|
||||
"sparse": false,
|
||||
"full_check": false,
|
||||
"has_ab": true,
|
||||
"ondevice_hash": "242aa5adad1c04e1398e00e2440d1babf962022eb12b89adf2e60ee3068946e7",
|
||||
"alt": {
|
||||
"hash": "e0007afa5d1026671c1943d44bb7f7ad26259f673392dd00a03073a2870df087",
|
||||
"url": "https://commadist.azureedge.net/agnosupdate/system-e0007afa5d1026671c1943d44bb7f7ad26259f673392dd00a03073a2870df087.img",
|
||||
"size": 5368709120
|
||||
}
|
||||
"ondevice_hash": "242aa5adad1c04e1398e00e2440d1babf962022eb12b89adf2e60ee3068946e7"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
@@ -125,7 +125,7 @@ class Tici(HardwareBase):
|
||||
return int(f.read())
|
||||
|
||||
def set_ir_power(self, percent: int):
|
||||
if self.get_device_type() in ("tici", "tizi"):
|
||||
if self.get_device_type() == "tizi":
|
||||
return
|
||||
|
||||
value = int((percent / 100) * 300)
|
||||
|
||||
@@ -10,8 +10,43 @@ if [[ ! -f "$AGNOS_PY" || ! -f "$MANIFEST" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if systemctl is-active --quiet weston-ready; then
|
||||
PYTHON_BIN="python3"
|
||||
if [[ -x /usr/local/venv/bin/python3 ]]; then
|
||||
PYTHON_BIN="/usr/local/venv/bin/python3"
|
||||
fi
|
||||
|
||||
# Ensure AGNOS python can import openpilot modules when called directly.
|
||||
REPO_ROOT="$(cd "$DIR/../../.." >/dev/null 2>&1 && pwd)"
|
||||
if [[ -d "$REPO_ROOT" ]]; then
|
||||
export PYTHONPATH="$REPO_ROOT/frogpilot/third_party:$REPO_ROOT${PYTHONPATH:+:$PYTHONPATH}"
|
||||
fi
|
||||
|
||||
run_headless_swap() {
|
||||
echo "jeepney unavailable; falling back to headless AGNOS updater (--swap)"
|
||||
exec "$PYTHON_BIN" "$AGNOS_PY" --swap "$MANIFEST"
|
||||
}
|
||||
|
||||
run_magic_with_fallback() {
|
||||
"$DIR/updater_magic" "$AGNOS_PY" "$MANIFEST"
|
||||
local rc=$?
|
||||
if [[ $rc -ne 0 ]]; then
|
||||
echo "updater_magic failed (rc=$rc); falling back to headless AGNOS updater"
|
||||
run_headless_swap
|
||||
fi
|
||||
}
|
||||
|
||||
DEVICE_TYPE=""
|
||||
if [[ -f /sys/firmware/devicetree/base/model ]]; then
|
||||
MODEL="$(tr -d '\000' </sys/firmware/devicetree/base/model 2>/dev/null)"
|
||||
DEVICE_TYPE="${MODEL##*comma }"
|
||||
fi
|
||||
|
||||
# non-tici/tizi devices (comma four variants) use the small raylib UI stack.
|
||||
# Route through updater_magic so setup/reset/update screens stay on the small UI.
|
||||
if [[ "$DEVICE_TYPE" != "tici" && "$DEVICE_TYPE" != "tizi" ]]; then
|
||||
run_magic_with_fallback
|
||||
elif systemctl is-active --quiet weston-ready; then
|
||||
$DIR/updater_weston $AGNOS_PY $MANIFEST
|
||||
else
|
||||
$DIR/updater_magic $AGNOS_PY $MANIFEST
|
||||
run_magic_with_fallback
|
||||
fi
|
||||
|
||||
Regular → Executable
BIN
Binary file not shown.
Regular → Executable
Reference in New Issue
Block a user