zs6buj / mav2pt

Mavlink to FrSky Passthrough protocol telemetry
GNU General Public License v3.0
120 stars 47 forks source link

Please re-open issue #48 #54

Closed rotorman closed 3 years ago

rotorman commented 3 years ago

Please re-open issue #48, as the introduced change wrongly outputs for satellite count 16 to 254 zero.

Please consider the following instead:

if (ap24_sat_visible > 15) 
{
  if (ap24_sat_visible == 255)
    pt_numsats = 0; // for special case 255 == unknown satellite count
  else
    pt_numsats = 15; // limit to 15 due to only 4 bits available
}
 else 
   pt_numsats = ap24_sat_visible;
zs6buj commented 3 years ago

Lol. Done.