From 2ec2b1e49aec8b755bbf75df07b4a6bc6f301344 Mon Sep 17 00:00:00 2001 From: Zhiying Li <zhiyingli@g.ucla.edu> Date: Mon, 8 Nov 2021 11:49:43 -0800 Subject: [PATCH] move some variables from keyboard code --- Code/Control/Laptop_Code/main_keyboard.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Code/Control/Laptop_Code/main_keyboard.py b/Code/Control/Laptop_Code/main_keyboard.py index 70dc342..f94d9e9 100644 --- a/Code/Control/Laptop_Code/main_keyboard.py +++ b/Code/Control/Laptop_Code/main_keyboard.py @@ -8,10 +8,7 @@ from constants import * from ESP32_AT.imageTread_AT import get_AT_6DOF_info global ml,esp_cam_on,openmv_on -ml = 1 -esp_cam_on = 1 -openmv_on = 1 -seekVertDir = 1 + AT_detected_time = time.time() if ml == 1: import ball_detection.ball_detection as ball_detection @@ -473,8 +470,8 @@ def auto_control(serial_port,gbx, gby, gb_dist, tx, ty, tz, rx, ry, rz, LIDAR_di if esp_cam_on == 1: - url = 'http://10.0.0.3/cam-hi.jpg' - tid, tx, ty, tz, rx, ry, rz = get_AT_6DOF_info(url) + + tid, tx, ty, tz, rx, ry, rz = get_AT_6DOF_info(url_AT) #LIDAR_dist1 = 0 # LIDAR_dist2 = 0 debugM = "using two esp32 cam" @@ -673,7 +670,7 @@ def test_function1(): if __name__ == '__main__': # =========== SET UP ============ # Defining Variables for ESP 32 Serial I/O - PORT = "COM6" # for Alienware + PORT = "COM9" # for Alienware serial_port = serial.Serial(PORT, 115200) serial_port.close() serial_port.open() -- GitLab