ese519
/
ESE519_Lab3_EC_v1
Lab3
Fork of ESE519_Lab3_v4 by
Diff: main.cpp
- Revision:
- 3:2f8e2399dfe8
- Parent:
- 2:d7103c7e0671
- Child:
- 4:0b22363eb57c
--- a/main.cpp Fri Oct 16 16:54:34 2015 +0000 +++ b/main.cpp Fri Oct 16 17:01:02 2015 +0000 @@ -56,9 +56,6 @@ int main() { - // start button checker thread - bpc_thread = new Thread(bpc_func); - // init interrupt handler IRSensor.fall(&get_period); @@ -80,7 +77,10 @@ while (!cur_floor) { // wait for a floor to be detected wait(0.25); } - if (!desired_floor) desired_floor = cur_floor; + if (!desired_floor) { + desired_floor = cur_floor; + bpc_thread = new Thread(bpc_func); // start button checker thread + } led_update(); // check for key press