Extracting event constants

This commit is contained in:
Rodrigo Alfonso
2025-01-03 08:39:35 -03:00
parent 9bc88c9dd5
commit a062a3acd6
2 changed files with 5 additions and 1 deletions

View File

@@ -84,6 +84,10 @@ class LinkRawWireless {
static constexpr int COMMAND_RECEIVE_DATA = 0x26;
static constexpr int COMMAND_WAIT = 0x27;
static constexpr int COMMAND_BYE = 0x3d;
static constexpr int EVENT_WAIT_TIMEOUT = 0x27;
static constexpr int EVENT_DATA_AVAILABLE = 0x28;
static constexpr int EVENT_DISCONNECTED = 0x29;
static constexpr u16 LOGIN_PARTS[] = {0x494e, 0x494e, 0x544e, 0x544e, 0x4e45,
0x4e45, 0x4f44, 0x4f44, 0x8001};

View File

@@ -519,7 +519,7 @@ class LinkWirelessMultiboot {
return FAILURE;
}
if (remoteCommand.commandId != 0x28) {
if (remoteCommand.commandId != LinkRawWireless::EVENT_DATA_AVAILABLE) {
_LWMLOG_("! expected EVENT 0x28");
_LWMLOG_("! but got " + toHex(remoteCommand.commandId));
return FAILURE;