Dsolberg8132
Active member
I am scaling back the use cases for my CAN bus interface to a Huawei power supply so that I no longer will be reading and decoding the CAN bus data frames but just sending data frames.
I have been sending 0x108040FE 00 00 00 00 00 00 00 00 which was the data frame to instruct the power supply to respond with data values but now I have to send the following:
0x108180FE 01 00 00 00 00 A5 5A
When I used the data message format that I used with the request data frame message I get the following error Compilation error: unable to find numeric literal operator 'operator""A' This is the code from this function
Any help would be greatly appreciated.
Don
I have been sending 0x108040FE 00 00 00 00 00 00 00 00 which was the data frame to instruct the power supply to respond with data values but now I have to send the following:
0x108180FE 01 00 00 00 00 A5 5A
When I used the data message format that I used with the request data frame message I get the following error Compilation error: unable to find numeric literal operator 'operator""A' This is the code from this function
Code:
void SetVolt41 (){
CAN_message_t msg;
msg.flags.extended = 1; //sets extended frames
msg.len = 8;
msg.id = 0x108180FE;
msg.buf[0] = 00;
msg.buf[1] = 00;
msg.buf[2] = 00;
msg.buf[3] = 00;
msg.buf[4] = 00;
msg.buf[5] = 00;
msg.buf[6] = A5;
msg.buf[7] = 5A;
//Set the on-line output voltage to 41.5V
if (myCan.write(msg)) {
Serial.print("Message sent on CAN3=");
Serial.println (msg.id, HEX);
Serial.print(" Data=");
for (int i = 0; i < msg.len; i++) {
Serial.println(msg.buf[i], HEX);
Serial.print(" ");
}
}
}
Any help would be greatly appreciated.
Don