kh
Dependencies: mbed PinDetect Servo
Diff: authentication.cpp
- Revision:
- 1:2c365f6da61d
- Parent:
- 0:28e05e1a3d1e
- Child:
- 2:04bbd14722bd
--- a/authentication.cpp Sat Nov 10 19:30:54 2018 +0000 +++ b/authentication.cpp Sat Nov 10 20:08:46 2018 +0000 @@ -3,7 +3,7 @@ * Purpose: Controls Input and Output Data * Language: C */ -#include "logging.h" +#include "authentication.h" #include "powerManagement.h" #include "parameters.h" @@ -17,6 +17,14 @@ int entryNum3; int entryNum4; + +Serial blue(p28,p27); + +AnalogIn pot1(p18); +AnalogIn pot2(p18); +AnalogIn pot3(p20); +AnalogIn pot4(p20); + /* * Function: setEntrySequence * -------------------- @@ -44,9 +52,7 @@ p3 = float(pot3) * 10; p4 = float(pot4) * 10; - if(checkPot(p1,entryNum1) && checkPot(p2,entryNum2) && checkPot(p3,entryNum3) && checkPot(p3,entryNum3) ){ - return true; - } + return (checkPot(p1,entryNum1) && checkPot(p2,entryNum2) && checkPot(p3,entryNum3) && checkPot(p3,entryNum3)); } bool checkPot(int p1, int p2) {