Skip to content
Snippets Groups Projects
Commit 9f79ca81 authored by SeungChul Lee's avatar SeungChul Lee
Browse files

Fix indent

parent 2e4f5897
No related branches found
No related tags found
No related merge requests found
...@@ -71,7 +71,6 @@ WebSocketsServer webSocket = WebSocketsServer(81); ...@@ -71,7 +71,6 @@ WebSocketsServer webSocket = WebSocketsServer(81);
IPAddress ip = IPAddress(192, 168, 4, 1); IPAddress ip = IPAddress(192, 168, 4, 1);
SimpleTimer timer; SimpleTimer timer;
SimpleTimer timer2;
// lcd slave address are 0x27 or 0x3f // lcd slave address are 0x27 or 0x3f
LiquidCrystal_I2C lcd(0x27, 16, 2); LiquidCrystal_I2C lcd(0x27, 16, 2);
...@@ -100,6 +99,14 @@ void setup() { ...@@ -100,6 +99,14 @@ void setup() {
delay(1000); delay(1000);
} }
USE_SERIAL.println("");
USE_SERIAL.println("##############################");
USE_SERIAL.printf("SmartPower2 v");
USE_SERIAL.print(FWversion);
USE_SERIAL.println(" (Serial Interface)");
USE_SERIAL.println("##############################");
USE_SERIAL.println("");
SPIFFS.begin(); SPIFFS.begin();
{ {
Dir dir = SPIFFS.openDir("/"); Dir dir = SPIFFS.openDir("/");
...@@ -240,7 +247,10 @@ bool handleFileRead(String path) { ...@@ -240,7 +247,10 @@ bool handleFileRead(String path) {
} }
void handleFileList() { void handleFileList() {
if(!server->hasArg("dir")) {server->send(500, "text/plain", "BAD ARGS"); return;} if (!server->hasArg("dir")) {
server->send(500, "text/plain", "BAD ARGS");
return;
}
String path = server->arg("dir"); String path = server->arg("dir");
Serial.println("handleFileList: " + path); Serial.println("handleFileList: " + path);
Dir dir = SPIFFS.openDir(path); Dir dir = SPIFFS.openDir(path);
...@@ -265,7 +275,7 @@ void handleFileList() { ...@@ -265,7 +275,7 @@ void handleFileList() {
void handleClientData(uint8_t num, String data) void handleClientData(uint8_t num, String data)
{ {
Serial.println(data); //Serial.println(data);
switch (data.charAt(0)) { switch (data.charAt(0)) {
case PAGE_STATE: case PAGE_STATE:
client_sp2[num].page = data.charAt(1) - 48; client_sp2[num].page = data.charAt(1) - 48;
...@@ -727,9 +737,6 @@ void handler(void) ...@@ -727,9 +737,6 @@ void handler(void)
{ {
if (onoff == ON) { if (onoff == ON) {
digitalWrite(POWERLED, D1state = !D1state); digitalWrite(POWERLED, D1state = !D1state);
if (connectedLCD || connectedWeb || logClient) {
readPower();
}
} }
if (connectedLCD) { if (connectedLCD) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment