瀏覽代碼

changed int to long to overcome overflow of number display

- related bug reports: Issue #201, Issue #213
stohn 11 年之前
父節點
當前提交
31873ec707
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3
    3
      Marlin/ultralcd.pde

+ 3
- 3
Marlin/ultralcd.pde 查看文件

@@ -2621,7 +2621,7 @@ char *ftostr31(const float &x)
2621 2621
 
2622 2622
 char *ftostr32(const float &x)
2623 2623
 {
2624
-  int xx=x*100;
2624
+  long xx=x*100;
2625 2625
   conv[0]=(xx>=0)?'+':'-';
2626 2626
   xx=abs(xx);
2627 2627
   conv[1]=(xx/100)%10+'0';
@@ -2666,7 +2666,7 @@ char *itostr4(const int &xx)
2666 2666
 //  convert float to string with +1234.5 format
2667 2667
 char *ftostr51(const float &x)
2668 2668
 {
2669
-  int xx=x*10;
2669
+  long xx=x*10;
2670 2670
   conv[0]=(xx>=0)?'+':'-';
2671 2671
   xx=abs(xx);
2672 2672
   conv[1]=(xx/10000)%10+'0';
@@ -2682,7 +2682,7 @@ char *ftostr51(const float &x)
2682 2682
 //  convert float to string with +123.45 format
2683 2683
 char *ftostr52(const float &x)
2684 2684
 {
2685
-  int xx=x*100;
2685
+  long xx=x*100;
2686 2686
   conv[0]=(xx>=0)?'+':'-';
2687 2687
   xx=abs(xx);
2688 2688
   conv[1]=(xx/10000)%10+'0';

Loading…
取消
儲存