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.
Diff: errors.cpp
- Revision:
 - 179:935f9d78d936
 - Child:
 - 187:523cf8c962e4
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/errors.cpp	Thu Feb 08 02:42:16 2018 +0000
@@ -0,0 +1,18 @@
+#include "errors.h"
+
+int errors = 0, moded_errors = 0;
+int masks[32];
+
+void init_masks() {
+    masks[ERR_THROTTLE_DISABLED] =  _MASK_MODE_RUN |
+                                    _MASK_OP_TORQUE | _MASK_OP_DRIVING | _MASK_OP_SPEED | _MASK_OP_POSITION |
+                                    _MASK_SRC_RC | _MASK_SRC_ANALOG;
+    masks[ERR_POS_INVALID] =        _MASK_MODE_RUN | _MASK_MODE_ZERO | _MASK_MODE_CFG |
+                                    _MASK_OP_TORQUE | _MASK_OP_DRIVING | _MASK_OP_SPEED | _MASK_OP_POSITION |
+                                    _MASK_SRC_RC | _MASK_SRC_ANALOG | _MASK_SRC_TERMINAL | _MASK_SRC_SERIAL |
+                                    _MASK_SRC_CAN | _MASK_SRC_INTERNAL;
+    masks[ERR_NOT_DRIVING] =        _MASK_MODE_RUN |
+                                    _MASK_OP_TORQUE | _MASK_OP_DRIVING |
+                                    _MASK_SRC_RC | _MASK_SRC_ANALOG | _MASK_SRC_TERMINAL | _MASK_SRC_SERIAL |
+                                    _MASK_SRC_CAN | _MASK_SRC_INTERNAL;
+}
\ No newline at end of file