TeensyNanoExoCode
Loading...
Searching...
No Matches
error_types.h
Go to the documentation of this file.
1#ifndef ERROR_TYPES_H
2#define ERROR_TYPES_H
3
4#include "ExoData.h"
5#include "Exo.h"
6
7#if defined(ARDUINO_TEENSY36) | defined(ARDUINO_TEENSY41) // Nano has issues with these declarations
8typedef void (*error_handler_t) (Exo*, ExoData*, int error_code);
9
10typedef int (*error_trigger_t) (Exo*, ExoData*);
11#endif
12
13enum ErrorCodes : int
14{
16
17 // Soft Errors
18 SOFT_ERROR, // General Soft Error
20 // Hard Errors
21 HARD_ERROR, // General Hard Error
23 // Fatal Errors
24 FATAL_ERROR, // General Fatal Error
33
34 // System Errors
35 SYSTEM_ERROR, // General System Error
37
39};
40
41#endif
Declares for the different exo class that all the other components will live in.
Declares a class used to store data for the Exo to access.
Class to store all the data related to the exo.
Definition ExoData.h:38
ErrorCodes
Definition error_types.h:14
@ MOTOR_TIMEOUT
Definition error_types.h:36
@ MOTOR_POSTION_OUT_OF_BOUNDS
Definition error_types.h:27
@ FORCE_VARIANCE_ERROR
Definition error_types.h:31
@ TORQUE_OUT_OF_BOUNDS
Definition error_types.h:29
@ TRACKING_ERROR
Definition error_types.h:32
@ FATAL_ERROR
Definition error_types.h:24
@ SYSTEM_ERROR
Definition error_types.h:35
@ TORQUE_VARIANCE_ERROR
Definition error_types.h:30
@ HARD_ERROR
Definition error_types.h:21
@ NO_ERROR
Definition error_types.h:15
@ MOTOR_INERTIA_ERROR
Definition error_types.h:26
@ POOR_CALIBRATION
Definition error_types.h:19
@ SOFT_ERROR
Definition error_types.h:18
@ ERROR_CODE_LENGTH
Definition error_types.h:38
@ JOINT_POSITION_OUT_OF_BOUNDS
Definition error_types.h:28
@ POOR_TRANSMISSION_EFFICIENCY
Definition error_types.h:25
@ POOR_STATE_VARIANCE
Definition error_types.h:22
error_code
Definition uart_commands.h:95