aaaaaaaaa

Dependencies:   QEI mbed

Fork of MainBoard2018_Auto_Master_A_new by Akihiro Nakabayashi

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Safty.cpp Source File

Safty.cpp

00001 #include "Safty.h"
00002 
00003 #include "../Communication/Controller/Controller.h"
00004 #include "../Input/Switch/Switch.h"
00005 
00006 using namespace SWITCH;
00007 
00008 
00009 namespace SAFTY {
00010     ErrorStatus ErrorCheck::Check() {
00011         ErrorStatus error = 0;
00012         CONTROLLER::Controller::CheckControllerLost() ? error |= Error::ControllerLost : error &=~ Error::ControllerLost;
00013         // #ifdef USE_DRIVECHECK
00014         (DRIVECHECK_LIMITSW == SW_OFF) ? error |= Error::DrivePowerLost : error &=~ Error::DrivePowerLost;
00015         // #endif
00016         return error;
00017     }
00018 }