Index: Accel.c =================================================================== diff -u -rf0e04691367769926254704486af9a52fe6badca -rc52be7e1c57818955bf17fea2f5d7c861703cdbd --- Accel.c (.../Accel.c) (revision f0e04691367769926254704486af9a52fe6badca) +++ Accel.c (.../Accel.c) (revision c52be7e1c57818955bf17fea2f5d7c861703cdbd) @@ -164,8 +164,8 @@ switch ( accelState ) { - case ACCELEROMETER_START_STATE: - accelState = ACCELEROMETER_MONITOR_STATE; + case ACCELEROMETER_START_STATE: + accelState = ACCELEROMETER_MONITOR_STATE; break; case ACCELEROMETER_MONITOR_STATE: @@ -190,7 +190,7 @@ * The handleAccelMonitorState function handles the accelerometer monitor * state of the accelerometer monitor state machine. * @details Inputs: accelNoNewSampleTimerCounter, accelFPGASampleCtr, - * accelAxes, accelFPGAFaultReg, accelSensorCalRecord + * accelAxes, accelFPGAFaultReg, accelSensorCalRecord, accelSelfTestState * @details Outputs: accelNoNewSampleTimerCounter, accelFPGASampleCtr, * accelAxes * alarm if accelerometer failed @@ -250,9 +250,14 @@ // filter readings to get a stable vector for tilt filterAccelReadings(); - // check tilt and shock - checkForTiltError(); - checkForShockError(); + /* check tilt and shock once accelerometer self test completed that indicates + * calibration records read from Non volatile memory during power up. + */ + if ( ACCELEROMETER_SELF_TEST_STATE_COMPLETE == accelSelfTestState ) + { + checkForTiltError(); + checkForShockError(); + } return result; }