mirror of
https://github.com/PotentiaRobotics/engine-software.git
synced 2025-04-09 23:00:21 -04:00
Changing threads and adding other parts
This commit is contained in:
parent
179f59255c
commit
7eb539b7cb
|
@ -20,6 +20,7 @@ class Receiver:
|
||||||
self.commands = []
|
self.commands = []
|
||||||
self.executions = []
|
self.executions = []
|
||||||
self.transmit = []
|
self.transmit = []
|
||||||
|
self.data = []
|
||||||
self.timer = 0
|
self.timer = 0
|
||||||
self.HOST = host
|
self.HOST = host
|
||||||
self.PORT = port
|
self.PORT = port
|
||||||
|
@ -93,11 +94,10 @@ class Receiver:
|
||||||
# print("Did not execute correctly ", command)
|
# print("Did not execute correctly ", command)
|
||||||
print("Inside execute",self.executions)
|
print("Inside execute",self.executions)
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
if "Balancing" not in self.executions:
|
|
||||||
heapq.heappush(self.executions, "Balancing")
|
|
||||||
|
|
||||||
def balance(self):
|
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):
|
def gaitGen(self):
|
||||||
print("Nothing")
|
print("Nothing")
|
||||||
|
@ -126,8 +126,8 @@ class Receiver:
|
||||||
|
|
||||||
# threading.Thread(target=self.sensorData).start()
|
# threading.Thread(target=self.sensorData).start()
|
||||||
|
|
||||||
# threading.Thread(target=self.balance).start()
|
threading.Thread(target=self.balance).start()
|
||||||
threading.Thread(target=self.gaitGen).start()
|
# threading.Thread(target=self.gaitGen).start()
|
||||||
# threading.Thread(target=self.comuterVision).start()
|
# threading.Thread(target=self.comuterVision).start()
|
||||||
|
|
||||||
def startBoot():
|
def startBoot():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user