Propagate the send_line change down
This commit is contained in:
@@ -65,3 +65,6 @@ def set_left(speed):
|
|||||||
|
|
||||||
def set_right(speed):
|
def set_right(speed):
|
||||||
set_speed(right_motor, speed)
|
set_speed(right_motor, speed)
|
||||||
|
|
||||||
|
def send_line(message):
|
||||||
|
uart.write(f"{message}\n".encode())
|
||||||
|
|||||||
@@ -67,7 +67,10 @@ def set_left(speed):
|
|||||||
def set_right(speed):
|
def set_right(speed):
|
||||||
set_speed(right_motor, speed)
|
set_speed(right_motor, speed)
|
||||||
|
|
||||||
|
def send_line(message):
|
||||||
|
uart.write(f"{message}\n".encode())
|
||||||
|
|
||||||
def check_imu_status():
|
def check_imu_status():
|
||||||
sys_status, gyro, accel, mag = imu.calibration_status
|
sys_status, gyro, accel, mag = imu.calibration_status
|
||||||
uart.write(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}\n".encode())
|
send_line(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}")
|
||||||
return sys_status == 3
|
return sys_status == 3
|
||||||
|
|||||||
@@ -67,7 +67,10 @@ def set_left(speed):
|
|||||||
def set_right(speed):
|
def set_right(speed):
|
||||||
set_speed(right_motor, speed)
|
set_speed(right_motor, speed)
|
||||||
|
|
||||||
|
def send_line(message):
|
||||||
|
uart.write(f"{message}\n".encode())
|
||||||
|
|
||||||
def check_imu_status():
|
def check_imu_status():
|
||||||
sys_status, gyro, accel, mag = imu.calibration_status
|
sys_status, gyro, accel, mag = imu.calibration_status
|
||||||
uart.write(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}\n".encode())
|
send_line(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}")
|
||||||
return sys_status == 3
|
return sys_status == 3
|
||||||
|
|||||||
@@ -67,7 +67,10 @@ def set_left(speed):
|
|||||||
def set_right(speed):
|
def set_right(speed):
|
||||||
set_speed(right_motor, speed)
|
set_speed(right_motor, speed)
|
||||||
|
|
||||||
|
def send_line(message):
|
||||||
|
uart.write(f"{message}\n".encode())
|
||||||
|
|
||||||
def check_imu_status():
|
def check_imu_status():
|
||||||
sys_status, gyro, accel, mag = imu.calibration_status
|
sys_status, gyro, accel, mag = imu.calibration_status
|
||||||
uart.write(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}\n".encode())
|
send_line(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}")
|
||||||
return sys_status == 3
|
return sys_status == 3
|
||||||
|
|||||||
@@ -67,7 +67,10 @@ def set_left(speed):
|
|||||||
def set_right(speed):
|
def set_right(speed):
|
||||||
set_speed(right_motor, speed)
|
set_speed(right_motor, speed)
|
||||||
|
|
||||||
|
def send_line(message):
|
||||||
|
uart.write(f"{message}\n".encode())
|
||||||
|
|
||||||
def check_imu_status():
|
def check_imu_status():
|
||||||
sys_status, gyro, accel, mag = imu.calibration_status
|
sys_status, gyro, accel, mag = imu.calibration_status
|
||||||
uart.write(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}\n".encode())
|
send_line(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}")
|
||||||
return sys_status == 3
|
return sys_status == 3
|
||||||
|
|||||||
@@ -67,7 +67,10 @@ def set_left(speed):
|
|||||||
def set_right(speed):
|
def set_right(speed):
|
||||||
set_speed(right_motor, speed)
|
set_speed(right_motor, speed)
|
||||||
|
|
||||||
|
def send_line(message):
|
||||||
|
uart.write(f"{message}\n".encode())
|
||||||
|
|
||||||
def check_imu_status():
|
def check_imu_status():
|
||||||
sys_status, gyro, accel, mag = imu.calibration_status
|
sys_status, gyro, accel, mag = imu.calibration_status
|
||||||
uart.write(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}\n".encode())
|
send_line(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}")
|
||||||
return sys_status == 3
|
return sys_status == 3
|
||||||
|
|||||||
@@ -69,7 +69,10 @@ def set_left(speed):
|
|||||||
def set_right(speed):
|
def set_right(speed):
|
||||||
set_speed(right_motor, speed)
|
set_speed(right_motor, speed)
|
||||||
|
|
||||||
|
def send_line(message):
|
||||||
|
uart.write(f"{message}\n".encode())
|
||||||
|
|
||||||
def check_imu_status():
|
def check_imu_status():
|
||||||
sys_status, gyro, accel, mag = imu.calibration_status
|
sys_status, gyro, accel, mag = imu.calibration_status
|
||||||
uart.write(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}\n".encode())
|
send_line(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}")
|
||||||
return sys_status == 3
|
return sys_status == 3
|
||||||
|
|||||||
@@ -69,7 +69,10 @@ def set_left(speed):
|
|||||||
def set_right(speed):
|
def set_right(speed):
|
||||||
set_speed(right_motor, speed)
|
set_speed(right_motor, speed)
|
||||||
|
|
||||||
|
def send_line(message):
|
||||||
|
uart.write(f"{message}\n".encode())
|
||||||
|
|
||||||
def check_imu_status():
|
def check_imu_status():
|
||||||
sys_status, gyro, accel, mag = imu.calibration_status
|
sys_status, gyro, accel, mag = imu.calibration_status
|
||||||
uart.write(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}\n".encode())
|
send_line(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}")
|
||||||
return sys_status == 3
|
return sys_status == 3
|
||||||
|
|||||||
@@ -69,7 +69,10 @@ def set_left(speed):
|
|||||||
def set_right(speed):
|
def set_right(speed):
|
||||||
set_speed(right_motor, speed)
|
set_speed(right_motor, speed)
|
||||||
|
|
||||||
|
def send_line(message):
|
||||||
|
uart.write(f"{message}\n".encode())
|
||||||
|
|
||||||
def check_imu_status():
|
def check_imu_status():
|
||||||
sys_status, gyro, accel, mag = imu.calibration_status
|
sys_status, gyro, accel, mag = imu.calibration_status
|
||||||
uart.write(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}\n".encode())
|
send_line(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}")
|
||||||
return sys_status == 3
|
return sys_status == 3
|
||||||
|
|||||||
@@ -71,7 +71,10 @@ def set_left(speed):
|
|||||||
def set_right(speed):
|
def set_right(speed):
|
||||||
set_speed(right_motor, speed)
|
set_speed(right_motor, speed)
|
||||||
|
|
||||||
|
def send_line(message):
|
||||||
|
uart.write(f"{message}\n".encode())
|
||||||
|
|
||||||
def check_imu_status():
|
def check_imu_status():
|
||||||
sys_status, gyro, accel, mag = imu.calibration_status
|
sys_status, gyro, accel, mag = imu.calibration_status
|
||||||
uart.write(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}\n".encode())
|
send_line(f"Sys: {sys_status}, Gyro: {gyro}, Accel: {accel}, Mag: {mag}")
|
||||||
return sys_status == 3
|
return sys_status == 3
|
||||||
|
|||||||
Reference in New Issue
Block a user