Finished some missing comment lines.

This commit is contained in:
2018-11-11 09:14:16 +00:00
parent 19bbe242c3
commit 3ba527d06c

View File

@@ -149,40 +149,37 @@ ISR(TIMER1_COMPA_vect)
digitalWrite(load_line, load_status); // Turn load on or off depending on the load_status digitalWrite(load_line, load_status); // Turn load on or off depending on the load_status
if (mySerial.available()) { // If there is incoming serial data
ble_data = mySerial.read(); // save it caracter into ble_data
if (mySerial.available()) { switch(ble_data) // Evaluate caracter
ble_data = mySerial.read();
// Serial.write(mySerial.read()); // For debug only
switch(ble_data)
{ {
case 'a': case 'a': // If caracter is 'a'
dtostrf(parameters[battery_volt], 5, 2, outstr); dtostrf(parameters[battery_volt], 5, 2, outstr); // convert battery voltage to string
mySerial.write(outstr); mySerial.write(outstr); // and send it to bluetooth
break; break; // finish switch statment
case 'b': case 'b': // If caracter is 'b'
dtostrf(parameters[voltage_1], 5, 2, outstr); dtostrf(parameters[voltage_1], 5, 2, outstr); // convert voltage 1 to string
mySerial.write(outstr); mySerial.write(outstr); // and send it to bluetooth
break; break; // finish switch statment
case 'c': case 'c': // If caracter is 'c'
dtostrf(parameters[voltage_2], 5, 2, outstr); dtostrf(parameters[voltage_2], 5, 2, outstr); // convert voltage 2 to string
mySerial.write(outstr); mySerial.write(outstr); // and send it to bluetooth
break; break; // finish switch statment
case 'd': case 'd': // If caracter is 'd'
dtostrf(parameters[curr], 5, 2, outstr); dtostrf(parameters[curr], 5, 2, outstr); // convert load current to string
mySerial.write(outstr); mySerial.write(outstr); // and send it to bluetooth
break; break; // finish switch statment
case 'e': case 'e': // If caracter is 'd'
load_status = on; load_status = on; // turn ON load
break; break; // finish switch statment
case 'f': case 'f': // If caracter is 'f'
load_status = off; load_status = off; // turn OFF load
break; break; // finish switch statment
} }
} }
} }