From 7eb539b7cba79cfe0c4e2644ba704ee2e196eac5 Mon Sep 17 00:00:00 2001 From: ramnreddy15 <> Date: Sat, 28 May 2022 19:05:11 +0000 Subject: [PATCH] Changing threads and adding other parts --- .replit | 2 ++ control_systems/Control System/bootup.py | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 .replit diff --git a/.replit b/.replit new file mode 100644 index 0000000..01e26ff --- /dev/null +++ b/.replit @@ -0,0 +1,2 @@ +language = "bash" +run = """" \ No newline at end of file diff --git a/control_systems/Control System/bootup.py b/control_systems/Control System/bootup.py index 7095d70..f96f3dd 100644 --- a/control_systems/Control System/bootup.py +++ b/control_systems/Control System/bootup.py @@ -20,6 +20,7 @@ class Receiver: self.commands = [] self.executions = [] self.transmit = [] + self.data = [] self.timer = 0 self.HOST = host self.PORT = port @@ -93,11 +94,10 @@ class Receiver: # print("Did not execute correctly ", command) print("Inside execute",self.executions) time.sleep(5) - if "Balancing" not in self.executions: - heapq.heappush(self.executions, "Balancing") def balance(self): - print("Nothing") + if self.data[0] > 100 and "Balancing" not in self.executions: + heapq.heappush(self.executions, "0_Balancing") def gaitGen(self): print("Nothing") @@ -126,8 +126,8 @@ class Receiver: # threading.Thread(target=self.sensorData).start() - # threading.Thread(target=self.balance).start() - threading.Thread(target=self.gaitGen).start() + threading.Thread(target=self.balance).start() + # threading.Thread(target=self.gaitGen).start() # threading.Thread(target=self.comuterVision).start() def startBoot():