• Ok, no problem! The issue is you're not erasing behind the text, so it's drawing the numbers over each other. You currently have:

    function updateScreen() {
        g.reset();
        g.clearRect(0,h/2 - 20,w-20,h/2 + 20);
        g.setFontVector(40).setFontAlign(0,0);
        g.drawString(x1.toFixed(2),w/3,h/3.2);
        g.drawString(y1.toFixed(2),w/3,h/1.4);
      }
    

    so try something like:

    function updateScreen() {
        g.reset();
        g.setFontVector(40).setFontAlign(0,0);
        g.clearRect(0,h/3.2 - 20,w-20,h/3.2 + 20);
        g.drawString(x1.toFixed(2),w/3,h/3.2);
        g.clearRect(0,h/1.4 - 20,w-20,h/1.4 + 20);
        g.drawString(y1.toFixed(2),w/3,h/1.4);
      }
    
About

Avatar for Gordon @Gordon started