mirror of
https://github.com/tdaede/td-io.git
synced 2025-02-25 22:38:06 +01:00
Support 0x15 message.
This commit is contained in:
parent
3eec407f6b
commit
7268b370b9
@ -70,6 +70,7 @@ uint8_t prev_coin_p2 = 0;
|
|||||||
#define SR_TEST 30
|
#define SR_TEST 30
|
||||||
#define SR_TILT 29
|
#define SR_TILT 29
|
||||||
|
|
||||||
|
const uint8_t JVS_COMM_VER = 0x10;
|
||||||
const char id_str[] = "TD;TD-IO;v1.0;https://github.com/tdaede/td-io";
|
const char id_str[] = "TD;TD-IO;v1.0;https://github.com/tdaede/td-io";
|
||||||
|
|
||||||
const uint8_t input_desc[] = {
|
const uint8_t input_desc[] = {
|
||||||
@ -301,10 +302,10 @@ int main() {
|
|||||||
o++;
|
o++;
|
||||||
} else if ((msg_length - i) >= 1 && message[i] == 0x13) {
|
} else if ((msg_length - i) >= 1 && message[i] == 0x13) {
|
||||||
i++;
|
i++;
|
||||||
printf("Got io revision request\n");
|
printf("Got comm revision request\n");
|
||||||
msg_send[o] = JVS_REPORT_GOOD;
|
msg_send[o] = JVS_REPORT_GOOD;
|
||||||
o++;
|
o++;
|
||||||
msg_send[o] = 0x10;
|
msg_send[o] = JVS_COMM_VER;
|
||||||
o++;
|
o++;
|
||||||
} else if ((msg_length - i) >= 1 && message[i] == 0x14) {
|
} else if ((msg_length - i) >= 1 && message[i] == 0x14) {
|
||||||
i++;
|
i++;
|
||||||
@ -313,6 +314,18 @@ int main() {
|
|||||||
o++;
|
o++;
|
||||||
memcpy(&msg_send[o], input_desc, sizeof(input_desc));
|
memcpy(&msg_send[o], input_desc, sizeof(input_desc));
|
||||||
o += sizeof(input_desc);
|
o += sizeof(input_desc);
|
||||||
|
} else if ((msg_length - i) >= 1 && message[i] == 0x13) {
|
||||||
|
i++;
|
||||||
|
printf("Got main board ID: ");
|
||||||
|
while (i < msg_length) {
|
||||||
|
char c = message[i];
|
||||||
|
i++;
|
||||||
|
if (c == 0) break;
|
||||||
|
putchar(message[i]);
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
msg_send[o] = JVS_REPORT_GOOD;
|
||||||
|
o++;
|
||||||
} else if ((msg_length - i) >= 3 && message[i] == 0x20) {
|
} else if ((msg_length - i) >= 3 && message[i] == 0x20) {
|
||||||
int num_players = message[i+1];
|
int num_players = message[i+1];
|
||||||
int bytes_per_player = message[i+2];
|
int bytes_per_player = message[i+2];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user