Hey everyone, I am trying to configure vex link to work on my two AI robots. i used this code to configure them and they link and blink accordingly
vex::message_link LinkA( PORT20, "vex_robotics_team_2147_Z", linkType::manager );
However, the code wont build when i try to use some of the code from the API
LinkA.received("run", isoAutonDev);
indows build for platform vexv5
clean project
windows build for platform vexv5
"CXX src/main.cpp"
src/main.cpp:161:11: error: no matching member function for call to 'received'
LinkA.received("run", isoAutonDev);
~~~~~~^~~~~~~~
c:\Users\Murad\AppData\Roaming\Code\User\globalStorage\vexrobotics.vexcode\sdk\cpp\V5\V5_20240223_11_00_00/vexv5/include/vex_vexlink.h:131:19: note: candidate function not viable: no known conversion from 'void ()' to 'void (*)(const char *, const char *, double)' for 2nd argument
void received( const char *message, void (* callback)(const char *, const char *, double) );
^
c:\Users\Murad\AppData\Roaming\Code\User\globalStorage\vexrobotics.vexcode\sdk\cpp\V5\V5_20240223_11_00_00/vexv5/include/vex_vexlink.h:132:19: note: candidate function not viable: no known conversion from 'void ()' to 'void (*)(const char *, const char *, int32_t, double)' (aka 'void (*)(const char *, const char *, long, double)') for 2nd argument
void received( const char *message, void (* callback)(const char *, const char *, int32_t, double) );
^
c:\Users\Murad\AppData\Roaming\Code\User\globalStorage\vexrobotics.vexcode\sdk\cpp\V5\V5_20240223_11_00_00/vexv5/include/vex_vexlink.h:128:19: note: candidate function not viable: requires single argument 'callback', but 2 arguments were provided
void received( void (* callback)(const char *, const char *, double) );
^
c:\Users\Murad\AppData\Roaming\Code\User\globalStorage\vexrobotics.vexcode\sdk\cpp\V5\V5_20240223_11_00_00/vexv5/include/vex_vexlink.h:129:19: note: candidate function not viable: requires single argument 'callback', but 2 arguments were provided
void received( void (* callback)(const char *, const char *, int32_t, double) );
^
c:\Users\Murad\AppData\Roaming\Code\User\globalStorage\vexrobotics.vexcode\sdk\cpp\V5\V5_20240223_11_00_00/vexv5/include/vex_vexlink.h:144:19: note: candidate function not viable: requires single argument 'callback', but 2 arguments were provided
void received( void (* callback)(const char *, data& data) );
^
1 error generated.
make: *** [vex/mk
please advise!