feat: add auto turnto function (#9)

* Subup

* subup interface pkg again

* Add turnto check in core_node

* fix cpp syntax oops

---------

Co-authored-by: Tristan McGinnis <tristanmcginnis26@gmail.com>
This commit is contained in:
David Sharpe
2025-05-22 23:37:44 -05:00
committed by GitHub
parent 74d823cc23
commit 4a9a0bfb0d
2 changed files with 5 additions and 2 deletions

View File

@@ -171,7 +171,10 @@ class SerialRelay(Node):
def send_controls(self, msg): def send_controls(self, msg):
#can_relay_tovic,core,19, left_stick, right_stick #can_relay_tovic,core,19, left_stick, right_stick
command = "can_relay_tovic,core,19," + self.scale_duty(msg.left_stick, msg.max_speed) + ',' + self.scale_duty(msg.right_stick, msg.max_speed) + '\n' if(msg.turn_to_enable):
command = "can_relay_tovic,core,41," + msg.turn_to + ',' + msg.turn_to_timeout + '\n'
else:
command = "can_relay_tovic,core,19," + self.scale_duty(msg.left_stick, msg.max_speed) + ',' + self.scale_duty(msg.right_stick, msg.max_speed) + '\n'
self.send_cmd(command) self.send_cmd(command)