Last active
December 14, 2019 17:37
-
-
Save gotens87/7fda687734c5dd190e70280bf913b1bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://github.com/icmma/tristate | |
update continue.sh | |
#!/usr/bin/bash | |
# Script to switch openpilot repos loaded on the EON | |
# | |
# This script should replace the file on your EON in /data/data/com.termux/files/ | |
# | |
# Note: This does not work on LeEco Le Pro 3 (since it does not have this switch) | |
# | |
# Usage: | |
# You need to clone the repos with the branch you want into the following directories: | |
# /data/openpilot.1 | |
# /data/openpilot.2 | |
# /data/openpilot.3 | |
# | |
# Then boot up your EON with the switch (going from left to right) in position 1,2,3 to load that branch of openpilot. | |
switchstate=`cat /sys/devices/virtual/switch/tri-state-key/state` | |
switchstate_old=`ls -ltr /data/openpilot|tail -c 2` | |
cp /data/params/d/LiveParameters /data/LiveParameters.$switchstate_old | |
cp /data/kegman.json /data/kegman.json.$switchstate_old | |
rm -rf /data/openpilot | |
rm -f /data/params/d/LiveParameters | |
ln -fs /data/openpilot.$switchstate /data/openpilot | |
cd /data/openpilot | |
cp /data/LiveParameters.$switchstate /data/params/d/LiveParameters | |
cp /data/kegman.json.$switchstate /data/kegman.json | |
exec ./launch_openpilot.sh | |
##END | |
Reboot | |
Run the following: | |
cd /data && rm -rf openpilot.1* && git clone https://github.com/commaai/openpilot openpilot.1 && cd /data/openpilot.1 && git checkout release2 && cd /data && rm -rf openpilot.2* && git clone https://github.com/kegman/openpilot openpilot.2 && cd /data/openpilot.2 && git checkout kegman-0.6.6 && cd /data && rm -rf openpilot.3* && git clone https://github.com/zorrobyte/openpilot openpilot.3 && cd /data/openpilot.3 && git checkout devel_curvatureFactorLearner && reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment