Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MainBoard2018_Auto_Master_A by
Safty/Safty.cpp@0:669ef71cba68, 2018-09-08 (annotated)
- Committer:
- t_yamamoto
- Date:
- Sat Sep 08 06:05:22 2018 +0000
- Revision:
- 0:669ef71cba68
???????
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| t_yamamoto | 0:669ef71cba68 | 1 | #include "Safty.h" |
| t_yamamoto | 0:669ef71cba68 | 2 | |
| t_yamamoto | 0:669ef71cba68 | 3 | #include "../Communication/Controller/Controller.h" |
| t_yamamoto | 0:669ef71cba68 | 4 | #include "../Input/Switch/Switch.h" |
| t_yamamoto | 0:669ef71cba68 | 5 | |
| t_yamamoto | 0:669ef71cba68 | 6 | using namespace SWITCH; |
| t_yamamoto | 0:669ef71cba68 | 7 | |
| t_yamamoto | 0:669ef71cba68 | 8 | |
| t_yamamoto | 0:669ef71cba68 | 9 | namespace SAFTY { |
| t_yamamoto | 0:669ef71cba68 | 10 | ErrorStatus ErrorCheck::Check() { |
| t_yamamoto | 0:669ef71cba68 | 11 | ErrorStatus error = 0; |
| t_yamamoto | 0:669ef71cba68 | 12 | CONTROLLER::Controller::CheckControllerLost() ? error |= Error::ControllerLost : error &=~ Error::ControllerLost; |
| t_yamamoto | 0:669ef71cba68 | 13 | // #ifdef USE_DRIVECHECK |
| t_yamamoto | 0:669ef71cba68 | 14 | (DRIVECHECK_LIMITSW == SW_OFF) ? error |= Error::DrivePowerLost : error &=~ Error::DrivePowerLost; |
| t_yamamoto | 0:669ef71cba68 | 15 | // #endif |
| t_yamamoto | 0:669ef71cba68 | 16 | return error; |
| t_yamamoto | 0:669ef71cba68 | 17 | } |
| t_yamamoto | 0:669ef71cba68 | 18 | } |
