====== Reading from Mouse and XBoxController ====== ===== Mouse Input ===== You can use a mouse for position information or its button states. In the control system you create an instance of type [[eeros_architecture:control_system:available_blocks:mouseinput|]]. \\ It is also possible to check for mouse input in the safety system by means of critical inputs. Defining a [[eeros_architecture:control_system:available_blocks:mouseinput|]] the HAL will contain 3 registered mouse button inputs under the names of: * leftMouseButton * middleMouseButton * rightMouseButton As an example you could define a critical input in the safety system as follows Input* in1 = HAL::instance().getLogicInput("leftMouseButton", false); criticalInputs = { in1 }; A more complete example is given in [[getting_started:tutorials:inputdev1|]] \\ WARNING The HAL will contain the three inputs mentioned above only after the control system created its [[eeros_architecture:control_system:available_blocks:mouseinput|]] object. ===== XBox Input ===== You can use a XBox controller for position information or its button states. In the control system you create an instance of type [[eeros_architecture:control_system:available_blocks:xboxinput|]]. \\ It is also possible to check for XBox input in the safety system by means of critical inputs. Defining a [[eeros_architecture:control_system:available_blocks:xboxinput|]] the HAL will contain 8 registered XBox button inputs under the names of: - XBoxButtonA - XBoxButtonB - XBoxButtonX - XBoxButtonY - XBoxButtonLB - XBoxButtonRB - XBoxButtonBack - XBoxButtonStart As an example you could define a critical input in the safety system as follows Input* in1 = HAL::instance().getLogicInput("XBoxButtonX", false); criticalInputs = { in1 }; A more complete example is given in [[getting_started:tutorials:inputdev1|]]. \\ WARNING The HAL will contain the three inputs mentioned above only after the control system created its [[eeros_architecture:control_system:available_blocks:xboxinput|]] object.