Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of TSI_sample by
Revision 6:968bd77025bb, committed 2018-03-05
- Comitter:
- Tobden
- Date:
- Mon Mar 05 13:53:45 2018 +0000
- Parent:
- 5:fb3b23290880
- Commit message:
- TSI Lab5 code
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Mar 02 23:39:52 2018 +0000
+++ b/main.cpp Mon Mar 05 13:53:45 2018 +0000
@@ -98,36 +98,37 @@
pc.putc(' ') ;
switch (area)
{
+
case LeftOut:
- if (numb == 0)
+ if (d>0)
redLED = redLED;
- if (d<3 || d>9)
+ else if (d<3 || d>9)
{numb = 1;
area = None;
break;
}
case LeftIn:
- if (numb == 0)
+ if (d>0)
greenLED = greenLED;
- if (d<13 || d > 19){
+ else if (d<13 || d > 19){
numb = 1;
area = None;
break;
}
case RightIn:
- if (numb == 0)
+ if (d>0)
blueLED = blueLED;
- if (d< 23 || d > 29){
+ else if (d< 23 || d > 29){
numb = 1;
area = None;
break;
}
case RightOut:
- if (numb == 0)
+ if (d>0)
led1 = led1;
- if (d<33)
+ else if (d<33)
{numb = 1;
area = None;
break;
