 /**************************************/
 /*                LOOP                 /
 /**************************************/
-void loop()
-{
+void loop(){
 //wait for mqtt commands
 //send out mqtt status
 calculateRPM();
 discSlipCheck();
+lockedRotorCheck();
 //if commanded != actual caution torque slip
 //if commanded != actual over time, report full error
 now = millis();

    }
  }

void motionControlStart(){}
//enable start relay
//check for rotation within x seconds
//rotation state yes
//current rotation value xx
//if rotation doesn't start, report error

void motiionControlStop(){}
//disable start relay

#include "Secrets.h"

//////
//#define DESIREDRPM_TABLE    60      //desired RPM on output wheel
#define DESIREDRPM_MOTOR    600     //desired motor RPM (this may be superfulous) 
#define DISCSLIPCOUNT       250     //How long alarm cond before alarm signal
#define LOCKEDDISCRPM       10      //RPM to consider as "disc stopped"
#define ROTATIONVARIANCE    50      //Variance in RPM before alarm condition 
//#define TRANSMISSIONRATIO   10      //Tranmission drive ratio n:1
#define NUMBEROFRESTARTS    5      //#of restarts attempted after stopped state
#define STARTTIME           10000   //Expected ramp up time, in MS
#define STOPTIME            10000   //Expected ramp down time, in MS
 /////////
#define STARTRELAYPIN       1      //pin locations
#define HALLSENSORPIN       5       //hall sensor to detect rotaion
#define SECONDS             1000    //ms in seconds 

WiFiClient espClient;
