aaaaaaaaa

Dependencies:   QEI mbed

Fork of MainBoard2018_Auto_Master_A_new by Akihiro Nakabayashi

Safty/Safty.cpp

Committer:
kishibekairohan
Date:
2018-10-21
Revision:
14:dfcec98f5aa9
Parent:
0:669ef71cba68

File content as of revision 14:dfcec98f5aa9:

#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;
    }
}