Implement sending controller ACKs

This commit is contained in:
redfast00 2020-09-11 21:14:40 +02:00
parent b7fd5b404a
commit bfcdd19e9b
No known key found for this signature in database
GPG key ID: 5946E0E34FD0553C
2 changed files with 3 additions and 2 deletions

View file

@ -142,9 +142,10 @@ inline void _send_payld_gamestatus(
/**
* Send a controller "ACK" OBUS message
*/
inline void send_c_ack(struct module from) {
inline void send_c_ack(struct module from, struct module payload_address) {
assert(from.type == OBUS_TYPE_CONTROLLER);
struct message msg = _msg(from, false, OBUS_MSGTYPE_C_ACK);
msg.payload_address = payload_address;
send(&msg);
}

View file

@ -157,7 +157,7 @@ void receive_hello() {
Serial.println(F("W Max # modules reached"));
}
obus_can::send_c_ack(this_module);
obus_can::send_c_ack(this_module, msg.from);
Serial.println(" ACK");
}