/****************************************************************** ****************************************************************** * * * MOTOR RECALIBRATION SEQUENCE * * * ****************************************************************** ******************************************************************/ void motorRecalibrate(void) { // ===================================================================== // Calibrate decision // Display Test Stand calibration entry instructions on Serial Monitor Serial.println(serialLine); Serial.println(F("Test Stand Calibration")); Serial.println(); Serial.println(F("The test stand should be calibrated prior to testing.")); Serial.println(F("If you have previously calibrated the test stand you")); Serial.println(F("can use that calibration if you have saved it.")); Serial.println(); Serial.println(F("If you did not save a previous calibration, if a ")); Serial.println(F("calibration has never been performed, or if you wish")); Serial.println(F("to perform a new calibration, hit 'c' followed by the")); Serial.println(F("'ENTER' key.")); Serial.println(); Serial.println(F("If you wish to bypass the calibration process hit 'b'")); Serial.println(F("followed by the 'ENTER' key.")); Serial.println(); // Get calibration decision resumeProcedure = false; while (resumeProcedure == false) { if (Serial.available() > 0) { charInput = Serial.read(); { if (charInput == 'b' || charInput == 'B') { Serial.println(F("Calibration Bypassed")); dateTimeSerialMonitor(); Serial.println(); // System Log for Calibration Bypass timeMillis = micros()/1000000.f; sdTimeStamp = timeMillis; sdRTCStamp = bufferTime; sdMessage = (F("Recalibrate Load Cell")); sdResult = (F("Bypassed")); writeSysDataToCard(); resumeProcedure = true; } else if (charInput == 'c' || charInput == 'C') { // System Log for Recalibraion timeMillis = micros()/1000000.f; sdTimeStamp = timeMillis; sdRTCStamp = bufferTime; sdMessage = (F("Recalibrate Load Cell")); sdResult = (F("Yes")); writeSysDataToCard(); // Go to calibraion function loadCellCalibrate(); resumeProcedure = true; } } } } }