btadv: convert GPS flags to bits

pull/2587/head
Rob Pilling 2023-02-19 21:06:25 +00:00
parent 9ad799e0f3
commit 5efba8bf4a
1 changed files with 2 additions and 2 deletions

View File

@ -419,8 +419,8 @@ const encodeGps: LenFunc<GPSFix> = (data: GPSFix) => {
const heading = toByteArray(Math.round(data.course * 100), 2, false);
return [
0x9d, // 0b10011101: speed, location, elevation, heading [...]
0x2, // 0b00000010: position ok, 3d speed/distance(?)
0b10011101, // speed, location, elevation, heading [...]
0b00000010, // position ok, 3d speed/distance
speed[0]!, speed[1]!,
lat[0]!, lat[1]!, lat[2]!, lat[3]!,
lon[0]!, lon[1]!, lon[2]!, lon[3]!,