Changed coments accordingly and changed for better "collapsability"

This commit is contained in:
Georg 2018-03-27 18:32:09 +02:00
parent 531b4c847f
commit b2277d12e8

View File

@ -258,7 +258,8 @@ void serialCom() {
if (command == '#') { //1 General Info Command if (command == '#') { //1 General Info Command
if (subCommand == '1') { // Get All Drinks if (subCommand == '1') { // Get All Drinks
print_drinks_JSON(box, &Serial); print_drinks_JSON(box, &Serial);
} else if (subCommand == '2') { // Get All persons }
else if (subCommand == '2') { // Get All persons
Serial.print("{\"persons\":["); Serial.print("{\"persons\":[");
for (int i = 0; i < box->personCount; i++) { for (int i = 0; i < box->personCount; i++) {
if (i != 0)Serial.print(","); if (i != 0)Serial.print(",");
@ -277,7 +278,8 @@ void serialCom() {
} }
Serial.println("{\"Success\"}"); Serial.println("{\"Success\"}");
} }
} else if (command == '!') { //2 User Managment Command }
else if (command == '!') { //2 User Managment Command
if (subCommand == '1') { // Create new User if (subCommand == '1') { // Create new User
char incomingByte = Serial.read(); char incomingByte = Serial.read();
String personName = data; String personName = data;
@ -484,7 +486,7 @@ void serialCom() {
} }
}//set name }//set name
} // User Managment Command } // User Managment Command
} //BLE available } //Serial available
}//end function }//end function