Factory Monitor
Dependencies: mbed
factory sense HQ
Diff: main.cpp
- Revision:
- 6:e8819487b352
- Parent:
- 5:faa8843f3990
- Child:
- 7:854af9ba3146
--- a/main.cpp Tue Aug 25 13:34:41 2015 +0000 +++ b/main.cpp Tue Aug 25 13:39:32 2015 +0000 @@ -28,14 +28,14 @@ { // if the state has changed, check to see if it is a change from high to low or low to high if (sensorState == 1){ // if the current state is HIGH then increment the counter - if (a == Inputs){ lastSensorState[a] == sensorState;} - if (a == Outputs){ lastSensorState[a] == sensorState;} + if (a == Inputs){ lastSensorState[a] = sensorState;} + if (a == Outputs){ lastSensorState[a] = sensorState;} return sensorState; } else { // if the current state is LOW then ignore - if (a == Inputs){ lastSensorState[a] == sensorState;} - if (a == Outputs){ lastSensorState[a] == sensorState;} + if (a == Inputs){ lastSensorState[a] = sensorState;} + if (a == Outputs){ lastSensorState[a] = sensorState;} return zero; } }