A guide to icons on the V5
When you upload a program to the V5, you may notice that the icon for it corresponds with what program you used to code it in. But you’ve probably wondered at some point how to change the icon, right? Well here’s a guide on how to do so, wether you code in PROS or VexCode (but it still requires PROS either way).
How it works
But first, let’s get into how it works. VexOS looks for the icon you specify in the .ini file uploaded to the brain when uploading your program to it. Every time your program is uploaded it sends a .ini file with info about your program (icon, description, what editor it was written in, etc.) and the actual program itself (a .bin file), both with the name of
slot_# (with the # being the program slot). By changing the icon filename in the .ini file, you can use any icon you please.
From what I found by brute-forcing all (reasonable) filenames, there are 18 total icons that are usable by programs. All of them are in the format
USER9##x.bmp, with ## representing the icon. And before you ask – no, you can’t upload custom images to use. Not by uploading it to the flash and not by using an SD card and pointing to it. However, there still are some interesting icons to use. Here’s a quick breakdown of them:
USER901x.bmp: MATLAB logo
USER902x.bmp: PROS logo
USER903x.bmp: Robot Mesh Studio logo
USER910x.bmp: Robot Mesh Studio logo (again)
USER911x.bmp: Robot Mesh Studio C++ logo
USER912x.bmp: Robot Mesh Studio Blockly logo
USER913x.bmp: Robot Mesh Studio Flowol logo
USER915x.bmp: Robot Mesh Studio Python logo
USER920x.bmp: Default file logo
USER921x.bmp: VexCode logo
USER922x.bmp: VexCode Blocks logo
USER923x.bmp: Default file logo
USER924x.bmp: Default file logo
USER925x.bmp: VexCode Python logo
USER926x.bmp: VexCode C++ logo
USER999x.bmp: Default file logo (A file with </> in it)
Any other filename: A question mark
So it looks like the 0s are for other types of programming, the 10s are for Robot Mesh Studio, and the 20s are for VexCode. No valid icons for anything beginning with VEX either.
Now, how to actually change the icons. If your program is already written in PROS it is very simple, if it’s written in something else, it becomes a bit more involved.
Just simply run
prosv5 upload --icon '[icon filename]'
to get the icon you desire when uploading.
Anything else (VexCode, etc)
For uploading anything else, you need a way of modifying the .ini file. The easiest way I could think of was modifying the PROS-cli to get it to upload binary files along with .ini files. Technically, you could upload a modified version of an .ini file every time you upload a file with
prosv5 v5 upload-file [slot_#.ini]
but you’d have to manually create and maintain that. Not to mention that it has to change depending on what slot you upload it to. So instead what I’ve done is modify the PROS-cli a little to get it working with .bin files only. Here’s a link to my fork of it. Just install it and it will run as normal. This way you can just run
prosv5 upload --icon '[icon filename]' --target v5 build/Program.bin
replacing build/Program.bin with your binary file. For example, in VexCode now you just have to run
make every time and then the above command to upload the program with the custom icon. I’ve only tried this method with VexCode, so if there’s any problems with anything else just post them.
If anyone knows any other valid icons, I’d be interested in hearing what they are. Have fun changing those icons!