Silvan Li
/
mbedKart_sp
single player mbedKart
(notes)
Diff: main.cpp
- Revision:
- 34:7989a5914d7d
- Parent:
- 33:820a1510cf2e
- Child:
- 35:b0c68a76acc9
--- a/main.cpp Thu Dec 13 01:28:11 2018 +0000 +++ b/main.cpp Thu Dec 13 01:30:07 2018 +0000 @@ -103,11 +103,11 @@ itembox = true; cstate = 0; } - else if(C_value < t && R_value < t && G_value < t && B_value > t) { //Check for if cart runs over a speed boost panel + else if(R_value < 2000 && B_value > 6500) { //Check for if cart runs over a speed boost panel powerup = true; //change this depending on speed up panel algs cstate = 0; } - else if(C_value < t && R_value > t && G_value < t && B_value < t) { //Check if cart reaches next checkpoint. cstate is set to 1 upon seeing first color of checkpoint + else if(R_value > 4000 && G_value < 2000 && B_value < 2000) { //Check if cart reaches next checkpoint. cstate is set to 1 upon seeing first color of checkpoint victory = true; } pc.printf("[C: %d, R: %d, G: %d, B: %d]\r\n", C_value, R_value, G_value, B_value);