![](/media/cache/profiles/LinkedIn_0NghoZJ.jpeg.50x50_q85.jpg)
Snake vs Block Game to be run upon K64F.
Diff: Settings/Settings.cpp
- Revision:
- 6:3ffab44ed49c
- Parent:
- 5:e4df87957a5b
- Child:
- 30:461231877c89
--- a/Settings/Settings.cpp Wed Mar 20 11:41:18 2019 +0000 +++ b/Settings/Settings.cpp Sat Mar 23 15:07:15 2019 +0000 @@ -38,7 +38,7 @@ { lcd.printString("Control Speeds",0,0); float cs; - cs = pad.read_pot()*6+1; + cs = pad.read_pot()*5+1; lcd.drawRect(15,22,54,13,FILL_TRANSPARENT); lcd.drawRect(15,22,pad.read_pot()*54,13,FILL_BLACK); pad.leds_on(); @@ -60,7 +60,7 @@ { lcd.printString("Contrast",16,0); float pot; - pot = (pad.read_pot()+1)/3; + pot = ((pad.read_pot()+3.5)/8); lcd.drawRect(15,22,54,13,FILL_TRANSPARENT); lcd.drawRect(15,22,pad.read_pot()*54,13,FILL_BLACK); lcd.setContrast(pot); @@ -84,15 +84,16 @@ int show = 1; pot = pad.read_pot(); - if((0.1<=pot<=0.2)||(0.3<=pot<=0.4)||(0.5<=pot<=0.6)||(0.7<=pot<=0.8)||(0.9<=pot)) { + if(((0.1<=pot)&&(pot<=0.2))||((0.3<=pot)&&(pot<=0.4))||((0.5<=pot)&&(pot<=0.6))||((0.7<=pot)&&(pot<=0.8))||((0.9<=pot)&&(pot<=1))) { lcd.printString("NO",36,3); show = 0; } - else if((pot<0.1)||(0.2<pot<0.3)||(0.4<pot<0.5)||(0.6<pot<0.7)||(0.8<pot<0.9)) { + else { lcd.printString("YES",33,3); show = 1; } + pad.leds_on(); return show; } \ No newline at end of file