Skip to content

Commit fddfef1

Browse files
committed
Clean up
1 parent a02b028 commit fddfef1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

server/server.ino

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ const int IN_PIN_POWER_LED = 7;
99
const int OUT_PIN_POWER = 8, OUT_PIN_RESET = 9;
1010

1111
// Commands
12-
bool powerOn;
13-
bool standBy;
14-
bool reset;
15-
bool kill;
12+
bool powerOn, standBy, reset, kill;
1613
// States
1714
bool powerLed;
1815

@@ -117,13 +114,15 @@ void sendResponse(String req, EthernetClient client) {
117114
else
118115
client.println("\n\r\n\r");
119116

117+
// Send file to client
120118
File webFile = SD.open(req);
121119
if (webFile) {
122120
while (webFile.available()) {
123-
client.write(webFile.read()); // send web page to client
121+
client.write(webFile.read());
124122
}
125123
webFile.close();
126124
}
125+
// Other actions
127126
else {
128127
if(req == "powerStatus")
129128
client.write(powerLed);

0 commit comments

Comments
 (0)