aa

Dependencies:   mbed

Safty/Safty.cpp

Committer:
yabahiro
Date:
2019-12-12
Revision:
60:24ebb611f26e
Parent:
30:8f092276b2ba

File content as of revision 60:24ebb611f26e:

#include "Safty.h"

#include "../Communication/Controller/Controller.h"
#include "../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;
    }
}