Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 3:743125ca6a46
- Parent:
- 2:156af70e6f15
- Child:
- 4:6547599b54a0
--- a/main.cpp	Thu Jan 26 14:37:07 2017 +0000
+++ b/main.cpp	Mon Feb 06 12:18:29 2017 +0000
@@ -229,12 +229,9 @@
     
     // If the measured cp voltage is within a range of +/- ACCEPTABLE_VOLTAGE_RANGE around the 
     // value (12V, 9V, 6V) then we change the flag state to true.
-    if (cp_voltage < (v + ACCEPTABLE_VOLTAGE_RANGE) && cp_voltage > (v - ACCEPTABLE_VOLTAGE_RANGE))
-    {
-        voltage_in_range = true;
-        return voltage_in_range;
-    }
-    else{ return PILOT_NOK;}                                    // The function then returns the value of the flag state.
+    if (cp_voltage < (v + ACCEPTABLE_VOLTAGE_RANGE) && cp_voltage > (v - ACCEPTABLE_VOLTAGE_RANGE)) voltage_in_range = true;
+                            
+    return voltage_in_range;                                     // The function then returns the value of the flag state.
 }