Implement sending controller ACKs
This commit is contained in:
parent
b7fd5b404a
commit
bfcdd19e9b
2 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue