teri
August 14, 2020, 3:24am
1
I am currently using PROS, and I am working on programming the new 3-wire port expander. After looking through the PROS API, I was unable to find any documentation. I am assuming that the PROS developers have not yet added support for the new product, but I thought I’d ask in case I missed it. Does anyone know of a way to program the expander using PROS?
1 Like
Keep up to date on the pros development on the github.
purduesigbots:develop
← djava:develop
opened 02:31AM - 13 Aug 20 UTC
#### Summary:
Changed the C and C++ API for ADI devices to support changing the… selected smart port, which lets you use the ADI Expander.
I used the format `function(smart_port, adi_port)`, i.e. `int32_t adi_port_get_value(uint8_t smart_port, uint8_t adi_port);`, as was suggested by @kunwarsahni01
The intention is for people to use the `INTERNAL_ADI_PORT` macro for those ports.
I changed the C types for ADI Devices (i.e. `adi_encoder_t`) from`typedef int32_t adi_encoder_t` to
`
typedef struct {
int32_t smart_port;
int32_t adi_port;
} adi_encoder_t;
` to include the smart port and the adi port, since now we have to worry about storing both.
#### Motivation:
PROS should support the 3-wire expander because it's a VRC-legal electronic part and PROS supports all the VRC-legal electronics parts.
#### Test Plan:
Try all the ADI devices through a 3-wire expander and through the internal brain ports.
They are in the progress of adding support. Vex apparently didn’t give it to them early.
1 Like
Yo that’s a dope PR! the guy who wrote that must’ve been prettttty cool!