mirror of
https://github.com/bcomsugi/VSS_Rally_V3.git
synced 2026-01-10 10:22:38 +07:00
update main menu and setWiFi.html
This commit is contained in:
parent
6a8d497214
commit
cc2cdedf7b
29
data/main_menu.html
Normal file
29
data/main_menu.html
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<!DOCTYPE HTML><html><head>
|
||||||
|
<title>Rally TerraTrip v1</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<!-- Bootstrap CSS -->
|
||||||
|
<!--
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
|
||||||
|
-->
|
||||||
|
<link href="bootstrap.css" rel="stylesheet">
|
||||||
|
</head><body>
|
||||||
|
<!--
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
|
||||||
|
-->
|
||||||
|
<script src="bootstrap.bundle.min.js"></script>
|
||||||
|
<fieldset>
|
||||||
|
<div class="card text-white bg-secondary mb-3" style="max-width: 40rem;">
|
||||||
|
<div class="card-header"><h1>MENU</h1></div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row align-self-end g-1">
|
||||||
|
<div class="col text-center "><button onclick="location.href='/startrally1';" id="startrally" name="startrally" class="btn btn-primary btn-lg me-2 mb-2">RALLY</button></div>
|
||||||
|
<div class="col text-center"><button onclick="location.href='/calibration';" id="calibration" name="calibration" class="btn btn-primary me-2 mb-2">CALIBRATION</button></div>
|
||||||
|
<div class="col text-center"><button onclick="location.href='/constanta';" id="constanta" name="constanta" class="btn btn-primary me-2 mb-2">CONSTANTA</button></div>
|
||||||
|
<div class="col text-center"><button onclick="location.href='/settime';" id="constanta" name="constanta" class="btn btn-primary me-2 mb-2">Set TIME</button></div>
|
||||||
|
<div class="col text-center"><button onclick="location.href='/wifi';" id="settime" name="settime" class="btn btn-primary me-2 mb-2">Set WiFi</button></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</body></html>
|
||||||
21
data/setWiFi.html
Normal file
21
data/setWiFi.html
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<!DOCTYPE HTML><html><head>
|
||||||
|
<title>RALLY WIFI Station</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link href="bootstrap.css" rel="stylesheet">
|
||||||
|
</head><body><script src="bootstrap.bundle.min.js"></script>
|
||||||
|
<h3>Your Local IP is: %localip%</h3>
|
||||||
|
<fieldset><h4>
|
||||||
|
<form action="/setwifi" method="POST" target="hidden-form">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="emailID" class="form-label">Wifi SSID (current value %ssidString%): </label>
|
||||||
|
<input type="text" name="ssidString" id="emailID" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="pwdID" class="form-label">Password (current value %inputPwd%): </label>
|
||||||
|
<input type="password" name="inputPwd" id="pwdID" class="form-control">
|
||||||
|
</div>
|
||||||
|
<input type="submit" value="Submit" class="btn btn-primary fw-bold mt-2 mb-2 ms-3">
|
||||||
|
</form><button ondblclick="location.href='/menu';" class="btn btn-primary fw-bold mt-2 mb-2 ms-3">Back to Menu</button>
|
||||||
|
</h4></fieldset>
|
||||||
|
<iframe style="display:none" name="hidden-form"></iframe>
|
||||||
|
</body></html>
|
||||||
@ -1,4 +1,4 @@
|
|||||||
const char HTML_startrally1[] PROGMEM = R"rawliteral(
|
const char HTML_startrally[] PROGMEM = R"rawliteral(
|
||||||
<!DOCTYPE HTML><html><head>
|
<!DOCTYPE HTML><html><head>
|
||||||
<title>Rally TerraTrip v1</title>
|
<title>Rally TerraTrip v1</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|||||||
84
src/main.cpp
84
src/main.cpp
@ -406,12 +406,9 @@ String procConst(const String& var){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void OnWiFiEvent(WiFiEvent_t event)
|
void OnWiFiEvent(WiFiEvent_t event)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
||||||
case SYSTEM_EVENT_STA_CONNECTED:
|
case SYSTEM_EVENT_STA_CONNECTED:
|
||||||
Serial.println("ESP32 Connected to WiFi Network");
|
Serial.println("ESP32 Connected to WiFi Network");
|
||||||
break;
|
break;
|
||||||
@ -427,6 +424,7 @@ void OnWiFiEvent(WiFiEvent_t event)
|
|||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String getPin(){
|
String getPin(){
|
||||||
struct tm timeinfo;
|
struct tm timeinfo;
|
||||||
String hasil;
|
String hasil;
|
||||||
@ -1086,19 +1084,34 @@ void printMonth(int month)
|
|||||||
default: lcd.print(" Error ");break;
|
default: lcd.print(" Error ");break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void showIPAddressOnLCD(){
|
||||||
|
IPAddress mlocalIP;
|
||||||
|
if(WiFi.isConnected()) mlocalIP = WiFi.localIP();
|
||||||
|
else mlocalIP = WiFi.softAPIP();
|
||||||
|
Serial.println(mlocalIP);
|
||||||
|
lcd.setCursor(17,0);
|
||||||
|
lcd.print(mlocalIP[0]);
|
||||||
|
lcd.setCursor(17,1);
|
||||||
|
lcd.print(mlocalIP[1]);
|
||||||
|
lcd.setCursor(17,2);
|
||||||
|
lcd.print(mlocalIP[2]);
|
||||||
|
lcd.setCursor(17,3);
|
||||||
|
lcd.print(mlocalIP[3]);
|
||||||
|
|
||||||
|
}
|
||||||
void mainMenu()
|
void mainMenu()
|
||||||
{
|
{
|
||||||
MENU = MAIN;
|
MENU = MAIN;
|
||||||
lcd.clear();
|
lcd.clear();
|
||||||
lcd.print("1. Rally TSD");
|
lcd.print("1. Rally TSD");
|
||||||
lcd.setCursor(0,1);
|
lcd.setCursor(0,1);
|
||||||
lcd.print("2. Set Main Time");
|
lcd.print("2. Main Time");
|
||||||
lcd.setCursor(0,2);
|
lcd.setCursor(0,2);
|
||||||
lcd.print("3. Input Constanta");
|
lcd.print("3. Constanta");
|
||||||
lcd.setCursor(0,3);
|
lcd.setCursor(0,3);
|
||||||
lcd.print("4. Calibration ODO");
|
lcd.print("4. Calibration");
|
||||||
//lcd.home();
|
//lcd.home();
|
||||||
|
showIPAddressOnLCD();
|
||||||
x=2;
|
x=2;
|
||||||
y=0;
|
y=0;
|
||||||
lcd.cursor();
|
lcd.cursor();
|
||||||
@ -2598,8 +2611,6 @@ DS3231_init(DS3231_CONTROL_INTCN);
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
//Serial.begin(115200);
|
|
||||||
//DynamicJsonDocument doc(512);
|
|
||||||
// Initialize SPIFFS
|
// Initialize SPIFFS
|
||||||
#ifdef ESP32
|
#ifdef ESP32
|
||||||
if(!SPIFFS.begin(true)){
|
if(!SPIFFS.begin(true)){
|
||||||
@ -2627,7 +2638,7 @@ DS3231_init(DS3231_CONTROL_INTCN);
|
|||||||
Serial.println(ssid);
|
Serial.println(ssid);
|
||||||
if (yourSSIDString != ""){
|
if (yourSSIDString != ""){
|
||||||
strncpy(ssid, yourSSIDString.c_str() , (sizeof ssid)-1);
|
strncpy(ssid, yourSSIDString.c_str() , (sizeof ssid)-1);
|
||||||
// strncpy(ssid, yourSSIDString.c_str() , (sizeof yourSSIDString)-1);
|
// strncpy(ssid, yourSSIDString.c_str() , (sizeof yourSSIDString)-1); //dont show the old password for security reason
|
||||||
}
|
}
|
||||||
|
|
||||||
Serial.println(ssid);
|
Serial.println(ssid);
|
||||||
@ -2652,6 +2663,7 @@ Serial.print("try to connect to ssid:");Serial.print(ssid);Serial.print("; with
|
|||||||
Serial.print("IP Address: ");
|
Serial.print("IP Address: ");
|
||||||
Serial.println(WiFi.localIP());
|
Serial.println(WiFi.localIP());
|
||||||
|
|
||||||
|
mainMenu();
|
||||||
// //settingup MDNS
|
// //settingup MDNS
|
||||||
// if(!MDNS.begin("esp32")) {
|
// if(!MDNS.begin("esp32")) {
|
||||||
// Serial.println("Error starting mDNS");
|
// Serial.println("Error starting mDNS");
|
||||||
@ -2659,6 +2671,7 @@ Serial.print("try to connect to ssid:");Serial.print(ssid);Serial.print("; with
|
|||||||
// }
|
// }
|
||||||
// Serial.println(“MDNS started.”);
|
// Serial.println(“MDNS started.”);
|
||||||
// MDNS.addService(“http”, “tcp”, 80);
|
// MDNS.addService(“http”, “tcp”, 80);
|
||||||
|
|
||||||
// // Init and get the time
|
// // Init and get the time
|
||||||
configTime(gmtOffset_sec, daylightOffset_sec, ntpServer);
|
configTime(gmtOffset_sec, daylightOffset_sec, ntpServer);
|
||||||
printLocalTime();
|
printLocalTime();
|
||||||
@ -2676,7 +2689,6 @@ Serial.print("try to connect to ssid:");Serial.print(ssid);Serial.print("; with
|
|||||||
request->send_P(200, "text/html", wifi_html, processor);
|
request->send_P(200, "text/html", wifi_html, processor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
server.on("/wifi", HTTP_GET, [](AsyncWebServerRequest * request) {
|
server.on("/wifi", HTTP_GET, [](AsyncWebServerRequest * request) {
|
||||||
@ -2696,77 +2708,51 @@ Serial.print("try to connect to ssid:");Serial.print(ssid);Serial.print("; with
|
|||||||
request->send(200, "text/plain", "Hello from undefined");
|
request->send(200, "text/plain", "Hello from undefined");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Send a GET request to <ESP_IP>/get?inputString=<inputMessage>
|
// Send a GET request to <ESP_IP>/get?inputString=<inputMessage>
|
||||||
server.on("/setwifi", HTTP_POST, [] (AsyncWebServerRequest *request) {
|
server.on("/setwifi", HTTP_POST, [] (AsyncWebServerRequest *request) {
|
||||||
String inputMessage;
|
String inputMessage;
|
||||||
boolean bolrestart=false;
|
boolean bolrestart=false;
|
||||||
boolean POST=true;
|
boolean POST=true;
|
||||||
Serial.println("ini masuk /setwifi");
|
Serial.print("/setwifi:");
|
||||||
// GET inputString value on <ESP_IP>/get?inputString=<inputMessage>
|
// GET inputString value on <ESP_IP>/get?inputString=<inputMessage>
|
||||||
if (request->hasParam(PARAM_SSID, POST)) {
|
if (request->hasParam(PARAM_SSID, POST)) {
|
||||||
inputMessage = request->getParam(PARAM_SSID, POST )->value();
|
inputMessage = request->getParam(PARAM_SSID, POST )->value();
|
||||||
|
Serial.print(inputMessage);Serial.print(";");
|
||||||
if (inputMessage!=""){
|
if (inputMessage!=""){
|
||||||
|
Serial.print(inputMessage);
|
||||||
writeFile(SPIFFS, "/ssidString.txt", inputMessage.c_str());
|
writeFile(SPIFFS, "/ssidString.txt", inputMessage.c_str());
|
||||||
delay(50);
|
delay(50);
|
||||||
bolrestart=true;
|
bolrestart=true;
|
||||||
//ESP.restart();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// GET inputPwd value on <ESP_IP>/wifi/get?inputPwd=<inputMessage>
|
// GET inputPwd value on <ESP_IP>/wifi/get?inputPwd=<inputMessage>
|
||||||
if (request->hasParam(PARAM_PWD, POST)) {
|
if (request->hasParam(PARAM_PWD, POST)) {
|
||||||
inputMessage = request->getParam(PARAM_PWD, POST)->value();
|
inputMessage = request->getParam(PARAM_PWD, POST)->value();
|
||||||
|
Serial.print(inputMessage);Serial.print(";");
|
||||||
if (inputMessage!=""){
|
if (inputMessage!=""){
|
||||||
writeFile(SPIFFS, "/inputPwd.txt", inputMessage.c_str());
|
writeFile(SPIFFS, "/inputPwd.txt", inputMessage.c_str());
|
||||||
delay(50);
|
delay(50);
|
||||||
bolrestart=true;
|
bolrestart=true;
|
||||||
//ESP.restart();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
inputMessage = "No message sent";
|
inputMessage = "No message sent";
|
||||||
}
|
}
|
||||||
|
Serial.println("");
|
||||||
if (bolrestart) {
|
if (bolrestart) {
|
||||||
ESP.restart();
|
ESP.restart();
|
||||||
}
|
}
|
||||||
Serial.println("ini /setwifi aja");Serial.println(inputMessage);
|
// Serial.println("ini /setwifi aja");Serial.println(inputMessage);
|
||||||
request->send(200, "text/text", inputMessage);
|
request->send(200, "text/text", inputMessage);
|
||||||
});
|
});
|
||||||
|
|
||||||
// // Send a GET request to <ESP_IP>/wifi/get?ssidString=<inputMessage>
|
|
||||||
// server.on("/wifi/get", HTTP_GET, [] (AsyncWebServerRequest *request) {
|
|
||||||
// String inputMessage;
|
|
||||||
// // GET ssidString value on <ESP_IP>/wifi/get?ssidString=<inputMessage>
|
|
||||||
// Serial.println("ini masuk wifi get");
|
|
||||||
// Serial.println(request->params());
|
|
||||||
// if (request->hasParam(PARAM_SSID)) {
|
|
||||||
// inputMessage = request->getParam(PARAM_SSID)->value();
|
|
||||||
// writeFile(SPIFFS, "/ssidString.txt", inputMessage.c_str());
|
|
||||||
// delay(100);
|
|
||||||
// ESP.restart();
|
|
||||||
// }
|
|
||||||
// // GET inputPwd value on <ESP_IP>/wifi/get?inputPwd=<inputMessage>
|
|
||||||
// else if (request->hasParam(PARAM_PWD)) {
|
|
||||||
// inputMessage = request->getParam(PARAM_PWD)->value();
|
|
||||||
// writeFile(SPIFFS, "/inputPwd.txt", inputMessage.c_str());
|
|
||||||
// delay(100);
|
|
||||||
// ESP.restart();
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// inputMessage = "No message sent";
|
|
||||||
// }
|
|
||||||
// Serial.println("/wifi/get value:"); Serial.println(inputMessage);
|
|
||||||
// request->send(200, "text/text", inputMessage);
|
|
||||||
// });
|
|
||||||
|
|
||||||
server.on("/menu", HTTP_GET, [] (AsyncWebServerRequest *request) {
|
server.on("/menu", HTTP_GET, [] (AsyncWebServerRequest *request) {
|
||||||
//String s = MAIN_page; //Read HTML contents
|
//String s = MAIN_page; //Read HTML contents
|
||||||
//request->send_P(200, "text/html", s); //Send web page
|
//request->send_P(200, "text/html", s); //Send web page
|
||||||
request->send_P(200, "text/html", main_menu);
|
request->send_P(200, "text/html", main_menu);
|
||||||
});
|
});
|
||||||
|
|
||||||
server.on("/startrally", HTTP_GET, [] (AsyncWebServerRequest *request) {
|
server.on("/startrallytest", HTTP_GET, [] (AsyncWebServerRequest *request) {
|
||||||
//String s = MAIN_page; //Read HTML contents
|
//String s = MAIN_page; //Read HTML contents
|
||||||
//request->send_P(200, "text/html", s); //Send web page
|
//request->send_P(200, "text/html", s); //Send web page
|
||||||
String PAGE;
|
String PAGE;
|
||||||
@ -2782,8 +2768,8 @@ Serial.print("try to connect to ssid:");Serial.print(ssid);Serial.print("; with
|
|||||||
request->send(200, "text/html", PAGE);
|
request->send(200, "text/html", PAGE);
|
||||||
});
|
});
|
||||||
|
|
||||||
server.on("/startrally1", HTTP_GET, [] (AsyncWebServerRequest *request) {
|
server.on("/startrally", HTTP_GET, [] (AsyncWebServerRequest *request) {
|
||||||
request->send_P(200, "text/html", HTML_startrally1, processor);
|
request->send_P(200, "text/html", HTML_startrally, processor);
|
||||||
});
|
});
|
||||||
|
|
||||||
server.on("/bootstrap.css", HTTP_GET, [] (AsyncWebServerRequest *request) {
|
server.on("/bootstrap.css", HTTP_GET, [] (AsyncWebServerRequest *request) {
|
||||||
@ -2873,14 +2859,6 @@ Serial.print("try to connect to ssid:");Serial.print(ssid);Serial.print("; with
|
|||||||
Serial.println("TOGGLE 2");
|
Serial.println("TOGGLE 2");
|
||||||
request->redirect("/startrally1");
|
request->redirect("/startrally1");
|
||||||
});
|
});
|
||||||
// //server.on("/adc", HTTP_GET); //This is display page
|
|
||||||
// server.on("/readADC", HTTP_GET, [] (AsyncWebServerRequest *request) {
|
|
||||||
// // int a = analogRead(A0);
|
|
||||||
// // String adcValue = String(millis());
|
|
||||||
// String adcValue = getPin();
|
|
||||||
// Serial.println(adcValue);
|
|
||||||
// request->send_P(200, "text/plain", adcValue.c_str()); //Send ADC value only to client ajax request
|
|
||||||
// });
|
|
||||||
|
|
||||||
server.on("/calibration", HTTP_GET, [] (AsyncWebServerRequest *request) {
|
server.on("/calibration", HTTP_GET, [] (AsyncWebServerRequest *request) {
|
||||||
int params = request->params(); //showing all params
|
int params = request->params(); //showing all params
|
||||||
|
|||||||
@ -165,51 +165,27 @@ const char HTML_END[] PROGMEM = R"rawliteral(
|
|||||||
</body></html>
|
</body></html>
|
||||||
)rawliteral";
|
)rawliteral";
|
||||||
|
|
||||||
// HTML web page to handle 3 input fields (inputString, inputInt, inputFloat)
|
|
||||||
const char index_html[] PROGMEM = R"rawliteral(
|
|
||||||
<!DOCTYPE HTML><html><head>
|
|
||||||
<title>ESP Input Form</title>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<script>
|
|
||||||
function submitMessage() {
|
|
||||||
alert("Saved value to ESP SPIFFS");
|
|
||||||
setTimeout(function(){ document.location.reload(false); }, 500);
|
|
||||||
}
|
|
||||||
</script></head><body><h3>
|
|
||||||
<form action="/get" target="hidden-form">
|
|
||||||
inputString (current value %inputString%): <input type="text" name="inputString">
|
|
||||||
<input type="submit" value="Submit" onclick="submitMessage()">
|
|
||||||
</form><br>
|
|
||||||
<form action="/get" target="hidden-form">
|
|
||||||
inputInt (current value %inputInt%): <input type="number " name="inputInt">
|
|
||||||
<input type="submit" value="Submit" onclick="submitMessage()">
|
|
||||||
</form><br>
|
|
||||||
<form action="/get" target="hidden-form">
|
|
||||||
inputFloat (current value %inputFloat%): <input type="number " name="inputFloat">
|
|
||||||
<input type="submit" value="Submit" onclick="submitMessage()">
|
|
||||||
</form>
|
|
||||||
<iframe style="display:none" name="hidden-form"></iframe></h3>
|
|
||||||
</body></html>
|
|
||||||
)rawliteral";
|
|
||||||
|
|
||||||
const char wifi_html[] PROGMEM = R"rawliteral(
|
const char wifi_html[] PROGMEM = R"rawliteral(
|
||||||
<!DOCTYPE HTML><html><head>
|
<!DOCTYPE HTML><html><head>
|
||||||
<title>ESP WIFI Station</title>
|
<title>RALLY WIFI Station</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<script>
|
<link href="bootstrap.css" rel="stylesheet">
|
||||||
function submitMessage() {
|
</head><body><script src="bootstrap.bundle.min.js"></script>
|
||||||
alert("Saved value to ESP SPIFFS");
|
<h3>Your Local IP is: %localip%</h3>
|
||||||
setTimeout(function(){ document.location.reload(false); }, 500);
|
<fieldset><h4>
|
||||||
}
|
|
||||||
</script></head><body>
|
|
||||||
<h3>Your Local IP is: %localip% <hr>
|
|
||||||
<form action="/setwifi" method="POST" target="hidden-form">
|
<form action="/setwifi" method="POST" target="hidden-form">
|
||||||
Wifi SSID (current value %ssidString%): <input type="text" name="ssidString">
|
<div class="mb-3">
|
||||||
Password (current value %inputPwd%): <input type="text" name="inputPwd">
|
<label for="emailID" class="form-label">Wifi SSID (current value %ssidString%): </label>
|
||||||
<input type="submit" value="Submit" >
|
<input type="text" name="ssidString" id="emailID" class="form-control">
|
||||||
</form><br>
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
<iframe style="display:none" name="hidden-form"></iframe></h3>
|
<label for="pwdID" class="form-label">Password (current value %inputPwd%): </label>
|
||||||
|
<input type="password" name="inputPwd" id="pwdID" class="form-control">
|
||||||
|
</div>
|
||||||
|
<input type="submit" value="Submit" class="btn btn-primary fw-bold mt-2 mb-2 ms-3">
|
||||||
|
</form><button ondblclick="location.href='/menu';" class="btn btn-primary fw-bold mt-2 mb-2 ms-3">Back to Menu</button>
|
||||||
|
</h4></fieldset>
|
||||||
|
<iframe style="display:none" name="hidden-form"></iframe>
|
||||||
</body></html>
|
</body></html>
|
||||||
)rawliteral";
|
)rawliteral";
|
||||||
|
|
||||||
@ -231,77 +207,20 @@ const char main_menu[] PROGMEM = R"rawliteral(
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
|
||||||
-->
|
-->
|
||||||
<script src="bootstrap.bundle.min.js"></script>
|
<script src="bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<div class="container">
|
<div class="card text-white bg-secondary mb-3" style="max-width: 40rem;">
|
||||||
<div class="row">
|
<div class="card-header"><h1>MENU</h1></div>
|
||||||
<div class="col align-self-end"><h1>MENU1</h1></div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col justify-content-around d-flex flex-column">
|
|
||||||
<div><button onclick="location.href='/startrally';" id="startrally" name="startrally" class="btn btn-primary mt-2 mb-2">START RALLY</button></div>
|
|
||||||
<div><button onclick="location.href='/startrally1';" id="startrally1" name="startrally1" class="btn btn-primary mt-2 mb-2">START RALLY 1</button></div>
|
|
||||||
<div><button onclick="location.href='/settime';" id="settime" name="settime" class="btn btn-primary mt-2 mb-2">Set TIME</button></div>
|
|
||||||
<div><button onclick="location.href='/wifi';" id="setwifi" name="setwifi" class="btn btn-primary mt-2 mb-2">Set Wifi</button></div>
|
|
||||||
<div><button onclick="location.href='/calibration';" id="calibration" name="calibration" class="btn btn-primary mt-2 mb-2">CALIBRATION</button></div>
|
|
||||||
<div><button onclick="location.href='/constanta';" id="constanta" name="constanta" class="btn btn-primary mt-2 mb-2">CONSTANTA</button></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row row-cols-auto">
|
|
||||||
|
|
||||||
<div class="col"><button onclick="location.href='/startrally';" id="startrally" name="startrally" class="btn btn-primary mt-2 mb-2">START RALLY</button></div>
|
|
||||||
<div class="col"><button onclick="location.href='/settime';" id="settime" name="settime" class="btn btn-primary mt-2 mb-2">Set TIME</button></div>
|
|
||||||
<div class="col"><button onclick="location.href='/wifi';" id="setwifi" name="setwifi" class="btn btn-primary mt-2 mb-2">Set Wifi</button></div>
|
|
||||||
<div class="col"><button onclick="location.href='/calibration';" id="calibration" name="calibration" class="btn btn-primary mt-2 mb-2">CALIBRATION</button></div>
|
|
||||||
<div class="col"><button onclick="location.href='/constanta';" id="constanta" name="constanta" class="btn btn-primary mt-2 mb-2">CONSTANTA</button></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="card text-white bg-primary mb-3" style="max-width: 20rem;">
|
|
||||||
<div class="card-header">MENU</div>
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<button onclick="location.href='/startrally';" id="startrally" name="startrally" class="btn btn-primary ">START RALLY</button>
|
<div class="row align-self-end g-1">
|
||||||
<button onclick="location.href='/wifi';" id="settime" name="settime" class="btn btn-primary">Wifi</button>
|
<div class="col text-center "><button onclick="location.href='/startrally1';" id="startrally" name="startrally" class="btn btn-primary btn-lg me-2 mb-2">RALLY</button></div>
|
||||||
<button onclick="location.href='/calibration';" id="calibration" name="calibration" class="btn btn-primary">CALIBRATION</button>
|
<div class="col text-center"><button onclick="location.href='/calibration';" id="calibration" name="calibration" class="btn btn-primary me-2 mb-2">CALIBRATION</button></div>
|
||||||
<button onclick="location.href='/constanta';" id="constanta" name="constanta" class="btn btn-primary">CONSTANTA</button>
|
<div class="col text-center"><button onclick="location.href='/constanta';" id="constanta" name="constanta" class="btn btn-primary me-2 mb-2">CONSTANTA</button></div>
|
||||||
<a href='/wifi' class='btn btn-primary' alt='Broken Link'>Wifi</a>
|
<div class="col text-center"><button onclick="location.href='/settime';" id="constanta" name="constanta" class="btn btn-primary me-2 mb-2">Set TIME</button></div>
|
||||||
|
<div class="col text-center"><button onclick="location.href='/wifi';" id="settime" name="settime" class="btn btn-primary me-2 mb-2">Set WiFi</button></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
</body></html>
|
|
||||||
)rawliteral";
|
|
||||||
|
|
||||||
const char main_menu1[] PROGMEM = R"rawliteral(
|
|
||||||
<!DOCTYPE HTML><html><head>
|
|
||||||
<title>Rally TerraTrip v1</title>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<!-- Bootstrap CSS -->
|
|
||||||
<!--
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
|
|
||||||
-->
|
|
||||||
<link href="bootstrap.css" rel="stylesheet">
|
|
||||||
</head><body>
|
|
||||||
<!--
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
|
|
||||||
-->
|
|
||||||
<script src="bootstrap.bundle.min.js"></script>
|
|
||||||
<fieldset>
|
|
||||||
<div class="card text-white bg-primary mb-3" style="max-width: 20rem;">
|
|
||||||
<div class="card-header">MENU</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<button onclick="location.href='/startrally';" id="startrally" name="startrally" class="btn btn-primary ">START RALLY</button>
|
|
||||||
<button onclick="location.href='/wifi';" id="settime" name="settime" class="btn btn-primary">Wifi</button>
|
|
||||||
<button onclick="location.href='/calibration';" id="calibration" name="calibration" class="btn btn-primary">CALIBRATION</button>
|
|
||||||
<button onclick="location.href='/constanta';" id="constanta" name="constanta" class="btn btn-primary">CONSTANTA</button>
|
|
||||||
<a href='/wifi' class='btn btn-primary' alt='Broken Link'>Wifi</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
</body></html>
|
</body></html>
|
||||||
)rawliteral";
|
)rawliteral";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user