Return explicit booleans (#98)

I was being prompted to calibrate on every power-up or reset. Returning explicit boolean values
from these methods fixed it for me.
This commit is contained in:
WJCarpenter
2019-02-11 01:20:04 -08:00
committed by Marcel Stör
parent 086416bd62
commit 850f8fd13e

View File

@@ -30,7 +30,7 @@ bool TouchControllerWS::loadCalibration() {
}
f.close();
return true;
}
bool TouchControllerWS::saveCalibration() {
@@ -40,6 +40,7 @@ bool TouchControllerWS::saveCalibration() {
File f = SPIFFS.open("/calibration.txt", "w");
if (!f) {
Serial.println("file creation failed");
return false;
}
// now write two lines in key/value style with end-of-line characters
f.println(dx);
@@ -48,6 +49,7 @@ bool TouchControllerWS::saveCalibration() {
f.println(ay);
f.close();
return true;
}
void TouchControllerWS::startCalibration(CalibrationCallback *calibrationCallback) {