![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Lab 6 Part 1
Fork of Watchdog_sample_nocoverage by
Diff: main.cpp
- Revision:
- 7:f356a62d5c52
- Parent:
- 6:8311b4ad8438
- Child:
- 8:3a8c46bc268f
--- a/main.cpp Fri Mar 09 20:29:19 2018 +0000 +++ b/main.cpp Fri Mar 09 23:24:59 2018 +0000 @@ -109,43 +109,43 @@ -void Detec_Thread() -{ - int counter=0; - while (1) - { - volt1 = ainled1; - // pc.printf("%f\n\r",volt1); - if (volt1>0.90) - { - pc.printf("short circuit\n\r"); - led_red=0; - } - else - { - if(led1==1) - { - if ((volt1<0.1)) - { - counter++; - if (counter>5) - { - pc.printf("open circuit\n\r"); - if(led_red==1)led_red=0; - counter =0; - } - } - else - { - pc.printf("%f\n\r",volt1); - if (led_red==0)led_red=1; - } - } - } - - waitButton(); // POSSIBLE FAULT HERE - } -} +//void Detec_Thread() +//{ +// int counter=0; +// while (1) +// { +// volt1 = ainled1; +// // pc.printf("%f\n\r",volt1); +// if (volt1>0.90) +// { +// pc.printf("short circuit\n\r"); +// led_red=0; +// } +// else +// { +// if(led1==1) +// { +// if ((volt1<0.1)) +// { +// counter++; +// if (counter>5) +// { +// pc.printf("open circuit\n\r"); +// if(led_red==1)led_red=0; +// counter =0; +// } +// } +// else +// { +// pc.printf("%f\n\r",volt1); +// if (led_red==0)led_red=1; +// } +// } +// } +// +// waitButton(); // POSSIBLE FAULT HERE +// } +//} // -----------MAIN-------------------------------