-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommunication.py
42 lines (35 loc) · 982 Bytes
/
communication.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
33
34
35
36
37
38
39
40
41
42
"""Shared communication object between flight and vision code"""
class Communication:
"""
Object to communicate between flight and vision
Methods
-------
__init__() -> None
Initializes current state
"""
def __init__(self) -> None:
"""
Initializer for communication object
"""
self.__state: str = "Start State"
@property
def current_state(self):
"""
Getter to return string of current state
Returns
-------
str
Name of current state
"""
return self.__state
# Set member variable state to new state
@current_state.setter
def current_state(self, new_state: str):
"""
Sets the string name for the current state
Parameters
----------
new_state: str
Name of new state to update communication object
"""
self.__state: str = new_state