diff options
| author | Mandar1jn <marijnkneppers@gmail.com> | 2023-07-19 22:16:13 +0200 |
|---|---|---|
| committer | Mandar1jn <marijnkneppers@gmail.com> | 2023-07-20 23:58:33 +0200 |
| commit | eba5291ec765742b576ab882c72631f4ea075bc6 (patch) | |
| tree | 9829c573b59f69ff22c78bb9465357feafc6d9f4 /Source/Core | |
| parent | 90b1f5c60af29c4e7b41620427a9a1ee761d81f5 (diff) | |
Skylanders: Update J command documentation
I initially thought the 0x01 side was both sides (equavalent to just C. However, this turned out to be something I forgot I implemented in my personal interface. 0x01 does not seem to change any colors.
Recently discovered how exactly the last 2 bytes of the J command for timing data
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/IOS/USB/Emulated/Skylander.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Source/Core/Core/IOS/USB/Emulated/Skylander.cpp b/Source/Core/Core/IOS/USB/Emulated/Skylander.cpp index 8d1fabeff2..2838f848ae 100644 --- a/Source/Core/Core/IOS/USB/Emulated/Skylander.cpp +++ b/Source/Core/Core/IOS/USB/Emulated/Skylander.cpp @@ -668,18 +668,13 @@ int SkylanderUSB::SubmitTransfer(std::unique_ptr<CtrlMessage> cmd) // Sided color // The 2nd byte is the side // 0x00: right - // 0x01: left and right // 0x02: left // The 3rd, 4th and 5th bytes are red, green and blue - // The 6th byte is unknown. Observed values are 0x00, 0x0D and 0xF4 - - // The 7th byte is the fade duration. Exact value-time corrolation unknown. Observed values - // are 0x00, 0x01 and 0x07. Custom commands show that the higher this value the longer the - // duration. - - // Empty J response is sent after the fade is completed. + // The 6th and 7th bytes form a little-endian short for how long the fade duration should be + // in milliseconds. + // For example, 500 milliseconds becomes 0xF4, 0x01 if (cmd->length == 7) { control_response = {buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]}; |
