1
0
Fork 0

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
1 changed files with 6 additions and 4 deletions

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(",");
@ -276,8 +277,9 @@ void serialCom() {
print_person_JSON(box, &persons[i], &Serial, false); print_person_JSON(box, &persons[i], &Serial, false);
} }
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