remove of choixModeJeu and choixDifficulty in web mod update oled web menu
This commit is contained in:
parent
15f5d46b55
commit
de0afba0bf
@ -18,11 +18,13 @@ uint16_t currtouched = 0;
|
|||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
|
||||||
|
/*
|
||||||
if (!cap.begin(0x5B)) {
|
if (!cap.begin(0x5B)) {
|
||||||
Serial.println("MPR121 not found, check wiring?");
|
Serial.println("MPR121 not found, check wiring?");
|
||||||
while (1);
|
while (1);
|
||||||
}
|
}
|
||||||
Serial.println("MPR121 found!");
|
Serial.println("MPR121 found!");
|
||||||
|
*/
|
||||||
|
|
||||||
setupMenu();
|
setupMenu();
|
||||||
}
|
}
|
||||||
@ -31,6 +33,7 @@ void loop() {
|
|||||||
readButton();
|
readButton();
|
||||||
if (!isPlay) {
|
if (!isPlay) {
|
||||||
menu();
|
menu();
|
||||||
|
Serial.println("ok");
|
||||||
} else {
|
} else {
|
||||||
if (!local) {
|
if (!local) {
|
||||||
if(!isWebSet){
|
if(!isWebSet){
|
||||||
|
|||||||
8
menu.h
8
menu.h
@ -23,7 +23,7 @@ Adafruit_SH1107 display = Adafruit_SH1107(64, 128, &Wire);
|
|||||||
|
|
||||||
unsigned long lastDebounceTimeA = 0;
|
unsigned long lastDebounceTimeA = 0;
|
||||||
unsigned long lastDebounceTimeB = 0;
|
unsigned long lastDebounceTimeB = 0;
|
||||||
const unsigned long debounceDelay = 200; // délai de rebond (200 ms)
|
const unsigned long debounceDelay = 200;
|
||||||
|
|
||||||
void setupMenu() {
|
void setupMenu() {
|
||||||
pinMode(BUTTON_A, INPUT_PULLUP);
|
pinMode(BUTTON_A, INPUT_PULLUP);
|
||||||
@ -88,12 +88,12 @@ void choixDifficulty() {
|
|||||||
void menu() {
|
void menu() {
|
||||||
if (!isMod) {
|
if (!isMod) {
|
||||||
choixMode();
|
choixMode();
|
||||||
} else if (!isModJeu) {
|
} else if (local && !isModJeu) {
|
||||||
choixModeJeu();
|
choixModeJeu();
|
||||||
} else if (solo && !isDifficulty) {
|
} else if (local && solo && !isDifficulty) {
|
||||||
choixDifficulty();
|
choixDifficulty();
|
||||||
} else {
|
} else {
|
||||||
isPlay = true; // mode duo sans choix difficulté
|
isPlay = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
11
web.h
11
web.h
@ -23,8 +23,11 @@ void setupWeb(){
|
|||||||
|
|
||||||
display.clearDisplay();
|
display.clearDisplay();
|
||||||
display.setCursor(0, 0);
|
display.setCursor(0, 0);
|
||||||
display.print("Connectez vous au\nreseau ");
|
display.println("Connectez vous a :");
|
||||||
|
display.print("Nom : ");
|
||||||
display.println(ssid);
|
display.println(ssid);
|
||||||
|
display.print("Mdp : ");
|
||||||
|
display.println(password);
|
||||||
display.println();
|
display.println();
|
||||||
display.print("Puis accedez a \nl'adresse ");
|
display.print("Puis accedez a \nl'adresse ");
|
||||||
display.print(myIP);
|
display.print(myIP);
|
||||||
@ -324,11 +327,7 @@ void loopWeb(){
|
|||||||
client.println();
|
client.println();
|
||||||
|
|
||||||
// the content of the HTTP response follows the header:
|
// the content of the HTTP response follows the header:
|
||||||
if(solo){
|
webGame(client);
|
||||||
webSolo(client);
|
|
||||||
}else{
|
|
||||||
webGame(client);
|
|
||||||
}
|
|
||||||
client.println();
|
client.println();
|
||||||
break;
|
break;
|
||||||
} else { // if you got a newline, then clear currentLine:
|
} else { // if you got a newline, then clear currentLine:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user