PROS accessing hidden functionality (Solution)

I was trying to access functions in pros that you can find in their source code, but don’t have access to, in particular I wanted access to these functions…

v5_smart_device_s_t* registry_get_device(uint8_t port);
v5_device_e_t registry_get_plugged_type(uint8_t port);

The solution turned out to be super simple. All you need to do is copy the include folder (which contain header files for all of PROS’ functions) from PROS’ github into your program folder (replace the old include folder). Then I also need to change a couple of things like add a v5_api.h since it was missing and also the files in the folder vdml didn’t have using namespce pros::c and V5_DeviceT wasn’t defined. If someone working on pros could explain why this is, I would be interested.


Anyway if you want to do this replace the include folder in your project with the one from this zip file…
include.zip (353.5 KB)

1 Like

We don’t use the namespace pros::c in vdml files because they’re internal only and also all written in C.

As for the V5 device type, that’s defined somewhere in the vexOS SDK which is proprietary.

2 Likes