![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Code required for data acquisition of couple tanks system with WSE sbc
Dependencies: mbed mbedWSEsbc
Revision 2:a69d07fe0e62, committed 2016-09-19
- Comitter:
- jdawkins
- Date:
- Mon Sep 19 12:04:31 2016 +0000
- Parent:
- 1:a87d98b19444
- Commit message:
- Fixed overflow safety by removing break. Also changed safety values to 4.1 volts which is about 24 cm on the tank.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r a87d98b19444 -r a69d07fe0e62 main.cpp --- a/main.cpp Thu Sep 01 17:48:04 2016 +0000 +++ b/main.cpp Mon Sep 19 12:04:31 2016 +0000 @@ -42,10 +42,9 @@ float tank1 = read_max1270_volts(1, 1, 1); //Logic to exit loop if tank gets too full - if(tank1 > 4.0 || tank2 > 4.0) { - pc.printf("%.2f, %.3f, %.3f, %.3f\r\n", t.read(),tank1,tank2,pwm); - run_flag = false; - break; + if(tank1 > 4.1 || tank2 > 4.1) { + pc.printf("%.2f, %.3f, %.3f, %.3f\r\n", t.read() -log_start,tank1,tank2,pwm); + run_flag = false; }