mirror of
https://github.com/djhackersdev/minime.git
synced 2026-07-19 00:31:30 -05:00
24 lines
684 B
TypeScript
24 lines
684 B
TypeScript
import { SaveSettingsRequest } from "../request/saveSettings";
|
|
import { AimeId } from "../../../model";
|
|
|
|
saveSettings.msgCode = 0x00a5;
|
|
saveSettings.msgLen = 0x0020;
|
|
|
|
export function saveSettings(buf: Buffer): SaveSettingsRequest {
|
|
return {
|
|
type: "save_settings_req",
|
|
aimeId: buf.readUInt32LE(0x0004) as AimeId,
|
|
version: 1,
|
|
dpoint: buf.readUInt32LE(0x0008),
|
|
settings: {
|
|
music: buf.readUInt16LE(0x0002),
|
|
pack: buf.readUInt32LE(0x000c),
|
|
paperCup: buf.readUInt8(0x0011),
|
|
gauges: buf.readUInt8(0x0012),
|
|
aura: buf.readUInt8(0x0013),
|
|
drivingStyle: 0, // Not supported until idz2
|
|
},
|
|
field_0010: buf.readUInt8(0x0010),
|
|
};
|
|
}
|