Created
June 3, 2020 17:22
-
-
Save HemaZ/1f9277be93cb991ef7124c68c117831b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def on_new_messages(self, messages): | |
if 'brake' in messages: | |
print("Braking signal received...") | |
print(messages['brake'].data) | |
brake_action = messages['brake'].data | |
if brake_action: | |
self.cm.DVA_write(self.brake_quant, 1) | |
else: | |
self.cm.DVA_write(self.brake_quant, 0) | |
if 'steer_sign' in messages: | |
print("Steering message received..") | |
print("steering value " + str(messages['steer_sign'].data)) | |
self.cm.DVA_write(self.steer_quant, messages['steer_sign'].data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment