Lab 3 Part 2.2

Fork of ADCandticker_sample by William Marsh

Revision:
3:b20239a6bd91
Parent:
2:bb80af536422
Child:
4:d9666f1c135b
--- a/main.cpp	Fri Feb 09 23:34:47 2018 +0000
+++ b/main.cpp	Fri Feb 09 23:42:36 2018 +0000
@@ -109,8 +109,8 @@
      
         if(pressEvent)
         {
-            pressEvent=0
-            max = !max_volt;
+            pressEvent=0;
+            max_volt = !max_volt;
             change_detect=false;
             }
         osEvent evt = mailbox.get(); // wait for mail 
@@ -133,7 +133,7 @@
                 ledw = 0;
                 ledg = 0;   
                 }
-            else if(volts >=(threshold[1])&&volts <=(threshold[2] and max_volt=false)){
+            else if(volts >=(threshold[1])&&volts <=(threshold[2] && max_volt=false)){
                 ledy = 1;
                 ledb = 1;
                 ledr = 0;
@@ -162,7 +162,7 @@
                 ledg = 1;  
                 }  
                 if(volts>=(threshold[5])){
-                    max_power=false;
+                    max_volt=false;
                     
                     }
                     else{}