|
1 | | -# How to Develop |
2 | 1 |
|
3 | | -The majority of your changes will probably be in the /anki folder, which is built from diode-os-victor. |
| 2 | +# iii. How to Develop |
4 | 3 |
|
5 | | -## Set up your dev environment |
| 4 | +Here, we will perform two steps in one: learning how to make modifications to the code, and how to change the final screen in CCIS which describes what the builds are. |
6 | 5 |
|
7 | | -You should have two folders: diode-os-victor and diode-os. |
| 6 | +## What IDE should I use? |
8 | 7 |
|
9 | | -Do NOT just make all of you changes in diode-os/anki/victor, despite it being the same repo. `diode-os-victor` can be built standalone, and deployed to a robot with `rsync`. These builds should not end up in a Yocto environment. |
| 8 | +Anki tended to use Visual Studio Code - just use that. |
10 | 9 |
|
11 | | -TODO |
| 10 | +## What OS should I use? |
12 | 11 |
|
| 12 | +An M-series Macs, or an x86_64 Linux PC - toolchains are only available for these platforms. |
| 13 | + |
| 14 | +## Let's make a modification! |
| 15 | + |
| 16 | +1. Open up the diode-os-victor folder in VSCode. |
| 17 | +2. Open up `animProcess/src/cozmoAnim/faceDisplay/faceInfoScreenManager.cpp` |
| 18 | +3. Modify lines 69-72 to match the details of your new CFW. |
| 19 | +4. Open a terminal and run `cd ~/diode-os-victor` |
| 20 | +5. Build the code by running this: `./build/build-v.sh` |
| 21 | + |
| 22 | +## Deploy |
| 23 | + |
| 24 | +When you deploy code to a robot, his /anki folder gets replaced. This can be done on a laptop (reference: Ryzen 7840U, 16GB RAM). You do not need to build a whole OTA every time you want to test a change. ./build/build.sh just builds a /anki folder. |
| 25 | + |
| 26 | +1. Open a terminal and `cd ~/diode-os-victor` |
| 27 | +2. Echo your robot's IP address to robot_ip.txt: `echo "192.168.1.50" > robot_ip.txt` |
| 28 | +3. Run: `curl -o robot_sshkey https://github.com/kercre123/unlocking-vector/raw/refs/heads/main/ssh_root_key` |
| 29 | +4. Deploy: `./build/deploy-v.sh` |
| 30 | + |
| 31 | +## Build an OTA with your change |
| 32 | + |
| 33 | +1. Run `cd ~/diode-os` |
| 34 | +2. Update the submodule: |
| 35 | +```bash |
| 36 | +cd anki/victor |
| 37 | +git pull origin main |
| 38 | +cd ../../ |
| 39 | +git add . |
| 40 | +git commit -m "vp" |
| 41 | +git push |
| 42 | +``` |
| 43 | +3. Build: |
| 44 | +```bash |
| 45 | +./build/build.sh -bt dev -v 1 |
| 46 | +``` |
| 47 | +4. Your OTA will be at: ./_build/vicos-3.0.1.1d.ota. |
0 commit comments