WACCA Console - Touch : Success

This commit is contained in:
Hay1tsme 2022-01-10 01:07:01 -05:00 committed by Hay1tsme
parent d633cb9838
commit 3628395a9c

View File

@ -319,14 +319,18 @@ static HRESULT touch_handle_get_unit_board_ver(const struct touch_req *req)
dprintf("Wacca Touch%d: get unit board version\n", req->side);
resp.cmd = 0xa8;
if (req->side == 0) {
memcpy(resp.version, unit_board_ver, sizeof(unit_board_ver));
resp.checksum = 0;
resp.checksum = calc_checksum(&resp, sizeof(resp));
if (req->side == 0) {
hr = iobuf_write(&touch0_uart.readable, &resp, sizeof(resp));
}
else {
unit_board_ver[6] = 0x4c;
memcpy(resp.version, unit_board_ver, sizeof(unit_board_ver));
resp.checksum = 0;
resp.checksum = calc_checksum(&resp, sizeof(resp));
hr = iobuf_write(&touch1_uart.readable, &resp, sizeof(resp));
}
return hr;
@ -419,7 +423,7 @@ static void touch_res_auto_scan(const bool *state)
frame0.cmd = 0x81;
frame0.count = input_frame_count_0++;
input_frame_count_0 %= 0x7f;
// for now return no data
memcpy(frame0.data1, data, sizeof(data));
memcpy(frame0.data2, data2, sizeof(data2));
frame0.checksum = 0;