mirror of
https://github.com/jwetzell/psn-go.git
synced 2026-09-01 20:39:23 +00:00
add crude encoding of PSN chunks
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package encoders
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"math"
|
||||
)
|
||||
|
||||
func EncodeDataTrackerStatusChunk(validity float32) []byte {
|
||||
bytes := make([]byte, 4)
|
||||
|
||||
binary.LittleEndian.PutUint32(bytes, math.Float32bits(validity))
|
||||
|
||||
return EncodeChunk(0x0003, bytes, false)
|
||||
}
|
||||
Reference in New Issue
Block a user