diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-17 18:24:18 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-20 11:10:20 +0300 |
| commit | 6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75 (patch) | |
| tree | e925740a5c04b1c5c44e725dab04f9b1833cf9e3 /pkg/messages/types/svcFixAngle.go | |
| parent | parse netSignOnState flags (diff) | |
| download | sdp.go-6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75.tar.gz sdp.go-6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75.tar.bz2 sdp.go-6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75.zip | |
decide what message types are left
Diffstat (limited to 'pkg/messages/types/svcFixAngle.go')
| -rw-r--r-- | pkg/messages/types/svcFixAngle.go | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/pkg/messages/types/svcFixAngle.go b/pkg/messages/types/svcFixAngle.go index 675c50e..95f67ec 100644 --- a/pkg/messages/types/svcFixAngle.go +++ b/pkg/messages/types/svcFixAngle.go | |||
| @@ -4,12 +4,22 @@ import "github.com/pektezol/bitreader" | |||
| 4 | 4 | ||
| 5 | type SvcFixAngle struct { | 5 | type SvcFixAngle struct { |
| 6 | Relative bool | 6 | Relative bool |
| 7 | Angle []int16 | 7 | Angle fixAngles |
| 8 | } | ||
| 9 | |||
| 10 | type fixAngles struct { | ||
| 11 | X float32 | ||
| 12 | Y float32 | ||
| 13 | Z float32 | ||
| 8 | } | 14 | } |
| 9 | 15 | ||
| 10 | func ParseSvcFixAngle(reader *bitreader.Reader) SvcFixAngle { | 16 | func ParseSvcFixAngle(reader *bitreader.Reader) SvcFixAngle { |
| 11 | return SvcFixAngle{ | 17 | return SvcFixAngle{ |
| 12 | Relative: reader.TryReadBool(), | 18 | Relative: reader.TryReadBool(), |
| 13 | Angle: []int16{int16(reader.TryReadBits(16)), int16(reader.TryReadBits(16)), int16(reader.TryReadBits(16))}, | 19 | Angle: fixAngles{ |
| 20 | X: float32(reader.TryReadBits(16)), | ||
| 21 | Y: float32(reader.TryReadBits(16)), | ||
| 22 | Z: float32(reader.TryReadBits(16)), | ||
| 23 | }, | ||
| 14 | } | 24 | } |
| 15 | } | 25 | } |