func decodeSetting(data []byte) *common.Setting { if len(data) < 8 { return nil } setting := new(common.Setting) setting.Flags = common.Flags(data[0]) setting.ID = common.BytesToUint24(data[1:]) setting.Value = common.BytesToUint32(data[4:]) return setting }
func decodeSetting(data []byte) *common.Setting { if len(data) < 8 { return nil } setting := new(common.Setting) setting.ID = common.BytesToUint24Reverse(data[0:]) // Might need to reverse this. setting.Flags = common.Flags(data[3]) setting.Value = common.BytesToUint32(data[4:]) return setting }