Emit heading_magnetic correctly.

This commit is contained in:
Oliver Jowett 2016-10-25 21:05:03 +01:00
parent a4cf02a728
commit 14748b1e8f

View file

@ -2004,7 +2004,7 @@ static void writeFATSV()
} }
if (headingMagValid && a->heading_magnetic_valid.updated > a->fatsv_last_emitted) { if (headingMagValid && a->heading_magnetic_valid.updated > a->fatsv_last_emitted) {
p += snprintf(p, bufsize(p,end), "\theading_magnetic\t%d", a->heading); p += snprintf(p, bufsize(p,end), "\theading_magnetic\t%d", a->heading_magnetic);
a->fatsv_emitted_heading_magnetic = a->heading_magnetic; a->fatsv_emitted_heading_magnetic = a->heading_magnetic;
useful = 1; useful = 1;
tisb |= (a->heading_magnetic_valid.source == SOURCE_TISB) ? TISB_HEADING_MAGNETIC : 0; tisb |= (a->heading_magnetic_valid.source == SOURCE_TISB) ? TISB_HEADING_MAGNETIC : 0;