Hello there,
I'm currently working on a STM32F469I-Disco Board.
I'm successfully using CAN and TouchScreen for my application.
At the moment I'm using the CAN example program sending a value each second on the bus.
But once I try to call the send funtion with e.g. a touch press, my compiler gives me the following error:
"No instance of constructor "mbed::CANMessage::CANMessage" matches the argument list in "main.cpp" - pointing towards "CANMessage"
In short, this is working:
Works
Ticker ticker; // Define ticker
void send() {
if(can2.write(CANMessage(1337, &npressed, 1))) {
sprintf((char*)text, "Message sent: %d", counter);
lcd.DisplayStringAt(100, 100, (uint8_t *)&text, LEFT_MODE);
counter++;
}
led1 = !led1;
}
...
void main(){
ticker.attach(&send, 1); // Call function every second
}
This not:
Not working
...
x = TS_State.touchX[idx];
y = TS_State.touchY[idx];
if (y > 100 && y < 150)
{
if(x > 100 && x < 330) // "Press me" Button
{
can2.frequency(500000);
can2.write(CANMessage(1337, &npressed, 1));
}
...
Any idea how to fix it?
Best,
ludgerf321
Hello there,
I'm currently working on a STM32F469I-Disco Board. I'm successfully using CAN and TouchScreen for my application. At the moment I'm using the CAN example program sending a value each second on the bus.
But once I try to call the send funtion with e.g. a touch press, my compiler gives me the following error:
"No instance of constructor "mbed::CANMessage::CANMessage" matches the argument list in "main.cpp" - pointing towards "CANMessage"
In short, this is working:
Works
This not:
Not working
Any idea how to fix it?
Best, ludgerf321