Better scr0ller

This commit is contained in:
roy rocket 2011-08-06 03:37:55 +02:00
parent 910e8d8416
commit e9927488d1
1 changed files with 6 additions and 7 deletions

View File

@ -39,6 +39,7 @@ void ram(void) {
char stepmode=0; char stepmode=0;
while (1) { while (1) {
++iter;
lcdDisplay(); lcdDisplay();
lcdClear(); lcdClear();
// draw_area(); // xor life pattern again to restore original display content // draw_area(); // xor life pattern again to restore original display content
@ -59,7 +60,7 @@ void ram(void) {
return; return;
case BTN_RIGHT: case BTN_RIGHT:
getInputWaitRelease(); getInputWaitRelease();
speedmode=(speedmode+1)%7; speedmode=(speedmode+1)%4;
delay=15; delay=15;
switch(speedmode) { switch(speedmode) {
case 0: case 0:
@ -67,9 +68,9 @@ void ram(void) {
case 1: case 1:
LCDSHIFTX_EVERY_N=2; LCDSHIFTY_EVERY_N=2; break; LCDSHIFTX_EVERY_N=2; LCDSHIFTY_EVERY_N=2; break;
case 2: case 2:
LCDSHIFTX_EVERY_N=4; LCDSHIFTY_EVERY_N=4; break; LCDSHIFTX_EVERY_N=3; LCDSHIFTY_EVERY_N=4; break;
case 3: case 3:
LCDSHIFTX_EVERY_N=1; LCDSHIFTY_EVERY_N=1; break; LCDSHIFTX_EVERY_N=4; LCDSHIFTY_EVERY_N=1; break;
case 4: case 4:
LCDSHIFTX_EVERY_N=1; LCDSHIFTY_EVERY_N=1; break; LCDSHIFTX_EVERY_N=1; LCDSHIFTY_EVERY_N=1; break;
case 5: case 5:
@ -83,11 +84,9 @@ void ram(void) {
getInputWaitRelease(); getInputWaitRelease();
break; break;
case BTN_LEFT: case BTN_LEFT:
break; return;
case BTN_UP: case BTN_UP:
stepmode=1; return;
getInputWaitRelease();
break;
} }
delayms_queue_plus(delay,0); delayms_queue_plus(delay,0);
} }