Merge branch 'feature/web' into 'main'

remove of choixModeJeu and choixDifficulty in web mod update oled web menu

See merge request SAE_203_2025/grA_21_Morpion_lumineaux/gra_21_morpion_lumineux_code!2
This commit is contained in:
T'JAMPENS QUENTIN p2406187 2025-06-16 15:07:27 +00:00
commit 42f1b2f818
3 changed files with 12 additions and 10 deletions

View File

@ -18,11 +18,13 @@ void setup() {
Serial.begin(115200);
randomSeed(analogRead(0));
/*
if (!cap.begin(0x5B)) {
Serial.println("MPR121 not found, check wiring?");
while (1);
}
Serial.println("MPR121 found!");
*/
setupMenu();
}
@ -31,6 +33,7 @@ void loop() {
readButton();
if (!isPlay) {
menu();
Serial.println("ok");
} else {
if (!local) {
if(!isWebSet){

8
menu.h
View File

@ -23,7 +23,7 @@ Adafruit_SH1107 display = Adafruit_SH1107(64, 128, &Wire);
unsigned long lastDebounceTimeA = 0;
unsigned long lastDebounceTimeB = 0;
const unsigned long debounceDelay = 200; // délai de rebond (200 ms)
const unsigned long debounceDelay = 200;
void setupMenu() {
pinMode(BUTTON_A, INPUT_PULLUP);
@ -88,12 +88,12 @@ void choixDifficulty() {
void menu() {
if (!isMod) {
choixMode();
} else if (!isModJeu) {
} else if (local && !isModJeu) {
choixModeJeu();
} else if (solo && !isDifficulty) {
} else if (local && solo && !isDifficulty) {
choixDifficulty();
} else {
isPlay = true; // mode duo sans choix difficulté
isPlay = true;
}
}

11
web.h
View File

@ -23,8 +23,11 @@ void setupWeb(){
display.clearDisplay();
display.setCursor(0, 0);
display.print("Connectez vous au\nreseau ");
display.println("Connectez vous a :");
display.print("Nom : ");
display.println(ssid);
display.print("Mdp : ");
display.println(password);
display.println();
display.print("Puis accedez a \nl'adresse ");
display.print(myIP);
@ -324,11 +327,7 @@ void loopWeb(){
client.println();
// the content of the HTTP response follows the header:
if(solo){
webSolo(client);
}else{
webGame(client);
}
webGame(client);
client.println();
break;
} else { // if you got a newline, then clear currentLine: