works

Dependencies:   SRF05 mbed

Fork of SRF05_HelloWorld by Simon Ford

Revision:
6:fae63ea5ba75
Parent:
5:df7cdf275ec9
Child:
7:974ba1b166ad
diff -r df7cdf275ec9 -r fae63ea5ba75 main.cpp
--- a/main.cpp	Tue Dec 06 14:44:31 2016 +0000
+++ b/main.cpp	Tue Dec 06 16:19:08 2016 +0000
@@ -13,7 +13,7 @@
     float range = tankempty-tankfull; // 100-(value-5)/range*100
      while(1) { 
          curval = srf.read();
-         percentage = 100-((curval-5)/range)*100;
+         percentage = 100-(((curval-5)/range)*100);
          printf ("Percentage Remaining: %.0f (%.0f)\n\r", percentage, curval);             
          wait(0.2); 
      }