-
Notifications
You must be signed in to change notification settings - Fork 1
/
station.py
32 lines (25 loc) · 961 Bytes
/
station.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import threading
from communications.Xbee.comunicacion import xbee
from mission_data import MissionStationData
from communications.Xbee.publisher import publisher
class StationXbThread(threading.Thread):
'''Class to access xbee data from station'''
def __init__(self, thread_id, name, station_xb):
threading.Thread.__init__(self)
self.thread_id = thread_id
self.name = name
self.station_xb = station_xb
def run(self):
publisher(self.station_xb)
def main_station():
main_data = MissionStationData(xbee())
# thread_drone = DroneThread(1, "DroneComm", main_data)
# thread_check = DroneCheker(2, "Drone Check", main_data.dock_num, main_data.map_data)
thread_station = StationXbThread(3, "Station", main_data.station_xb)
#thread_drone.start()
#thread_check.start()
thread_station.start()
#thread_drone.join()
#thread_check.join()
thread_station.join()
main_station()