Rev 636 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 636 | Rev 653 | ||
|---|---|---|---|
| Line 57... | Line 57... | ||
| 57 | void action(uint8_t type); |
57 | void action(uint8_t type); |
| 58 | void alarm(void); |
58 | void alarm(void); |
| 59 | void refreshDisplay(void); |
59 | void refreshDisplay(void); |
| 60 | 60 | ||
| 61 | uint32_t timeBase = 0; |
61 | uint32_t timeBase = 0; |
| - | 62 | ||
| - | 63 | uint32_t timeBase_turnspeed = 0; |
|
| 62 | 64 | ||
| 63 | char lcdBuffer[5]; |
65 | char lcdBuffer[5]; |
| 64 | 66 | ||
| 65 | //Struct for countdown |
67 | //Struct for countdown |
| 66 | typedef struct |
68 | typedef struct |
| Line 242... | Line 244... | ||
| 242 | 244 | ||
| 243 | void action(uint8_t type){ |
245 | void action(uint8_t type){ |
| 244 | //Let's do something with something! |
246 | //Let's do something with something! |
| 245 | lcd_clrscr(); |
247 | lcd_clrscr(); |
| 246 | if (type == LEFT){ |
248 | if (type == LEFT){ |
| 247 | countTimer1.timerCnt- |
249 | countTimer1.timerCnt = countTimer1.timerCnt - 10; |
| 248 | refreshDisplay(); |
250 | refreshDisplay(); |
| 249 | } |
251 | } |
| 250 | if (type == RIGHT){ |
252 | if (type == RIGHT){ |
| 251 | countTimer1.timerCnt+ |
253 | countTimer1.timerCnt = countTimer1.timerCnt + 10; |
| 252 | if (countTimer1.timerCnt > countTimer1.timerMax){ |
254 | if (countTimer1.timerCnt > countTimer1.timerMax){ |
| 253 | countTimer1.timerMax = countTimer1.timerCnt; |
255 | countTimer1.timerMax = countTimer1.timerCnt; |
| 254 | } |
256 | } |
| 255 | refreshDisplay(); |
257 | refreshDisplay(); |
| 256 | } |
258 | } |