ThuanLeUte / RMD_X8_PRO_CAN_BUS_CONTROLER

Control RMD X8 PRO motor by CAN
9 stars 7 forks source link

code error -CAN.readMsgBuf(&can_rx_len, can_rx_data); #5

Open haxord7hasib opened 1 year ago

haxord7hasib commented 1 year ago

D:\rmd 8- can bus pro\RMD_X8_PRO_CAN_BUS_CONTROLER-main\main\main.ino: In function 'void m_can_receive()': main:258:44: error: no matching function for call to 'MCP_CAN::readMsgBuf(uint8_t, uint8_t [8])' CAN.readMsgBuf(&can_rx_len, can_rx_data); ^ In file included from D:\rmd 8- can bus pro\RMD_X8_PRO_CAN_BUS_CONTROLER-main\main\main.ino:16:0: C:\Users\User\Documents\Arduino\libraries\mcp_can/mcp_can.h:119:11: note: candidate: byte MCP_CAN::readMsgBuf(long unsigned int, byte, byte, byte) INT8U readMsgBuf(INT32U id, INT8U ext, INT8U len, INT8U buf); // Read message from receive buffer ^~~~~~ C:\Users\User\Documents\Arduino\libraries\mcp_can/mcp_can.h:119:11: note: candidate expects 4 arguments, 2 provided C:\Users\User\Documents\Arduino\libraries\mcp_can/mcp_can.h:120:11: note: candidate: byte MCP_CAN::readMsgBuf(long unsigned int, byte, byte) INT8U readMsgBuf(INT32U id, INT8U len, INT8U buf); // Read message from receive buffer ^~~~~~ C:\Users\User\Documents\Arduino\libraries\mcp_can/mcp_can.h:120:11: note: candidate expects 3 arguments, 2 provided D:\rmd 8- can bus pro\RMD_X8_PRO_CAN_BUS_CONTROLER-main\main\main.ino: In function 'void x8_can_init()': main:430:39: error: no matching function for call to 'MCP_CAN::begin(int)' if (CAN_OK != CAN.begin(CAN_1000KBPS)) ^ In file included from D:\rmd 8- can bus pro\RMD_X8_PRO_CAN_BUS_CONTROLER-main\main\main.ino:16:0: C:\Users\User\Documents\Arduino\libraries\mcp_can/mcp_can.h:110:11: note: candidate: byte MCP_CAN::begin(byte, byte, byte) INT8U begin(INT8U idmodeset, INT8U speedset, INT8U clockset); // Initialize controller parameters ^~~~~ C:\Users\User\Documents\Arduino\libraries\mcp_can/mcp_can.h:110:11: note: candidate expects 3 arguments, 1 provided exit status 1 no matching function for call to 'MCP_CAN::readMsgBuf(uint8_t, uint8_t [8])'