diff options
Diffstat (limited to 'proto-vjoystick/vjoystick.cpp')
-rw-r--r-- | proto-vjoystick/vjoystick.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/proto-vjoystick/vjoystick.cpp b/proto-vjoystick/vjoystick.cpp index 557b5e99..9ff64998 100644 --- a/proto-vjoystick/vjoystick.cpp +++ b/proto-vjoystick/vjoystick.cpp @@ -125,6 +125,21 @@ vjoystick_proto::~vjoystick_proto() { } +module_status vjoystick_proto::check_status() +{ + switch (h.get_state()) + { + case state_notent: + return error("vjoystick #1 doesn't exist"); + case state_fail: + return error("can't initialize vjoystick"); + case state_success: + return status_ok(); + default: + return error("unknown error"); + } +} + void vjoystick_proto::pose(const double *pose) { if (h.get_state() != state_success) |