ttt

Dependencies:   mbed TrapezoidControl QEI Pulse LM61CIZ

Safty/Safty.cpp

Committer:
M_souta
Date:
2019-09-28
Revision:
26:4c0ce2f05688
Parent:
0:669ef71cba68

File content as of revision 26:4c0ce2f05688:

#include "Safty.h"

#include "../Communication/Controller/Controller.h"
#include "../Input/Switch/Switch.h"

using namespace SWITCH;


namespace SAFTY {
    ErrorStatus ErrorCheck::Check() {
        ErrorStatus error = 0;
        CONTROLLER::Controller::CheckControllerLost() ? error |= Error::ControllerLost : error &=~ Error::ControllerLost;
        // #ifdef USE_DRIVECHECK
        (DRIVECHECK_LIMITSW == SW_OFF) ? error |= Error::DrivePowerLost : error &=~ Error::DrivePowerLost;
        // #endif
        return error;
    }
}