Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
rombie18 committed May 3, 2023
1 parent 76bd91f commit b9d133a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Software/threads/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,17 @@ def transform_centerangle_to_angle(self, centerangle):

### Controller functions ###
def controller_add(self, joy):
logging.debug('Controller connected: ', joy)
logging.debug('Controller connected: ', str(joy))

def controller_remove(self, joy):
logging.debug('Controller disconnected: ', joy)
logging.debug('Controller disconnected: ', str(joy))
# Robot sould stop here or at least continue in a very slow safe mode
logging.warning('Controller disconnected, no controls available. Stopping for safety!')
self.stop_event.set()

def controller_process(self, key):
try:
logging.debug("Controller key event: " + key)
logging.debug("Controller key event: " + str(key))
if key.keytype == "Axis" and key.number == 0:
# Left joystick, left - right
# Steering
Expand Down

0 comments on commit b9d133a

Please sign in to comment.