daad
Dependencies: mbed TrapezoidControl QEI
Diff: Input/Switch/Switch.cpp
- Revision:
- 1:b1219d8ca117
- Parent:
- 0:669ef71cba68
- Child:
- 2:c015739085d3
--- a/Input/Switch/Switch.cpp Sat Sep 08 06:05:22 2018 +0000 +++ b/Input/Switch/Switch.cpp Mon Sep 10 01:39:15 2018 +0000 @@ -45,14 +45,47 @@ printf("%d\n", index); MP_Channel ch; - ch.all = index; + + switch(index){ + case 0: + ch.all = 10; + break; + case 1: + ch.all = 11; + break; + case 2: + ch.all = 8; + break; + case 3: + ch.all = 9; + break; + case 4: + ch.all = 6; + break; + case 5: + ch.all = 7; + break; + case 6: + ch.all = 4; + break; + case 7: + ch.all = 5; + break; + case 8: + ch.all = 2; + break; + case 9: + ch.all = 3; + break; + } + selectPin[0] = ch.s0; selectPin[1] = ch.s1; selectPin[2] = ch.s2; selectPin[3] = ch.s3; - while(1); + wait_us(1); return limitSw ? false : true; }