User mode toggling

I’m not sure if anyone would know this, but is there a way (in coding) to make a button my controls (p2_trig for example) toggle the OI display between user mode (u000) and something else like team number (0151)?

Nope. Unfortunately, what is displayed on the OI is controlled by the uP’s inside the OI, which aren’t accessible from the RC. The only thing you can control is what is displayed while the OI is in user mode and the 9 (if you include basic run) LEDs you have direct control over.

As stated, you cannot control the OI from your joystick, but you can control what your User Mode displays. Just leave the OI in user_mode, and use “selection buttons” on your console.

vbutton, &c, are aliases for console buttons (OI_swAb.bit#), temp is a scratch pad, byte-size variable. The way this is arranged, if two people want to see different things (volts & direction, say) the first branch gets priority, so they will see voltage in the user window.

program snippet…

if vbutton then show_volts
if dbutton then show_direction

show_amps:
temp = sensor3
goto show_it

show_volts:
temp = battery_volts (=sensor8) * bewitch_factor
goto show_it

show_direction:
temp = gyro_heading.highbyte

show_it:
out8 = temp.bit0
out9 = temp.bit1
out10 = temp.bit2
out11 = temp.bit3
out12 = temp.bit4
out13 = temp.bit5
out14 = temp.bit6
out15 = temp.bit7

…rest of program