function drawCompassHeading() {
      //log_debug("drawCompassHeading()");
      var hding = Math.round(heading);
      var hd = hding.toString();
      hd = hding < 10 ? "00"+hd : hding < 100 ? "0"+hd : hd;

      if (previous.hding !== hd) {
        previous.hding = hd;
        g.setColor(1,1,1);
        g.setFontAlign(-1,-1);
        g.setFont("Vector",38);
        g.clearRect(80, 200, 159, 239);
        g.drawString(hd, 80, 200);
      }
    }
// only used when acting as compass with GPS off
only used when acting as compass with GPS off
only used when acting as compass with GPS off
function drawCompassHeading() {
      var hding = Math.round(heading);
      var hd = hding.toString();
      hd = hding < 10 ? "00"+hd : hding < 100 ? "0"+hd : hd;
      if (previous.hding !== hd) {
        previous.hding = hd;
        g.setColor(1,1,1);
        g.setFontAlign(-1,-1);
        g.setFont("Vector",38);
        g.clearRect(80, 200, 159, 239);
        g.drawString(hd, 80, 200);
      }
    }
function drawCompassHeading ( ) { var hding = Math . round ( heading ) ; var hd = hding . toString ( ) ; hd = hding < 10 ? "00" + hd : hding < 100 ? "0" + hd : hd ; if ( previous . hding !== hd ) { previous . hding = hd ; g . setColor ( 1 , 1 , 1 ) ; g . setFontAlign ( - 1 , - 1 ) ; g . setFont ( "Vector" , 38 ) ; g . clearRect ( 80 , 200 , 159 , 239 ) ; g . drawString ( hd , 80 , 200 ) ; } }
only used when acting as compass with GPS off
only used when acting as compass with GPS off
//log_debug("drawCompassHeading()");