Dear Community:
The Openpilot Community needs your help to continue to keep opc.ai's lights on and support the path to Workbench v0.2. With only a one person crew and without commercial funding it's not always financially feasible to fund these services out of pocket. Please consider becoming a Patreon supporter of the Openpilot Community project and receive exclusive perks and benefits!
Become a patreon Learn more Maybe Later

DISCLAIMER: This website is maintained by openpilot users and contributors. The content found here (including Workbench and Oppey the Bot) are not approved, supported, affiliated or funded by Comma.ai, Inc. Please DO NOT contact Comma.ai, Inc. staff about these things as they WILL NOT provide support. For support on openpilot, opc.ai, oppey, workbench, etc. please contact a community member on Discord.

icmma
Feb 02·2 min read

How to add multiple branches on EON using tri-state?

If you have OG EON that has tri-state physical buttons, You can have 3 branches overall however if you the new LEON(EON GOLD) then you will need UI button to switch between each branches. The only branch that has UI button for tri-state is in https://github.com/BogGyver/openpilot that's for now i will add simple branch where the UI button will can be imported into any regular branch in general that being said first thing you have to do is modify the continue.sh which is located at:

/data/data/com.termux/files/

You can edit the files using filezilla:

https://opc.ai/guides/how-to-use-filezilla-to-edit-files-on-eon-in-3-simple-steps-ders4a

Following is link for the modified version of continue.sh
https://raw.githubusercontent.com/icmma/tristate/master/continue.sh

After you have modified the continue.sh, Please reboot your EON than you will see just black screen which is not an issue since you haven't installed OP yet for tri-state buttons. Following is script i have built for your intial setup for 3 branches example:

cd /data && rm -rf openpilot* && rm -rf openpilot.1* && rm -rf openpilot.2* && rm -rf openpilot.3* && git clone https://github.com/priuscom/openpilot openpilot.1 && cd /data/openpilot.1 && git checkout resonant && cd /data && git clone https://github.com/priuscom/openpilot openpilot.2 && cd /data/openpilot.2 && git checkout alca && cd /data && git clone https://github.com/priuscom/openpilot openpilot.3 && cd /data/openpilot.3 && git checkout FLag && reboot

Please modify each fork username and branch name in general:

Following script if you want to modify tri-state button 1:

cd /data && rm -rf openpilot.1* && git clone https://github.com/icmma/openpilot openpilot.1 && cd /data/openpilot.1 && git checkout branchname && reboot

Following script if you want to modify tri-state button 2:

cd /data && rm -rf openpilot.2* && git clone https://github.com/icmma/openpilot openpilot.2 && cd /data/openpilot.2 && git checkout branchname && reboot

Following script if you want to modify tri-state button 3:

cd /data && rm -rf openpilot.3* && git clone https://github.com/icmma/openpilot openpilot.3 && cd /data/openpilot.3 && git checkout branchname && reboot

Please note after each branch is installed, Using each tri-state button position reboot after each directory has been created for inisital OP files example:

After all 3 branches are install, Have your tri-state button at #1 then reboot which will take a while to boot. After #1 has booted successfully then switch tri-state to #2 then reboot again and then last of all do same thing for 3. The entire process for each reboot can take about 30 mins.