Merge pull request #5 from SHC-ASTRA/core-direction

feat: unflip left_stick for core control
This commit is contained in:
Tristan McGinnis
2025-05-10 10:31:47 -05:00
committed by GitHub

View File

@@ -166,8 +166,7 @@ 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
left_stick_neg = msg.left_stick * -1 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'
command = "can_relay_tovic,core,19," + self.scale_duty(left_stick_neg, msg.max_speed) + ',' + self.scale_duty(msg.right_stick, msg.max_speed) + '\n'
#print(f"[Sys] {command}", end="") #print(f"[Sys] {command}", end="")
#self.ser.write(bytes(command, "utf8"))# Send command to MCU #self.ser.write(bytes(command, "utf8"))# Send command to MCU