-
Notifications
You must be signed in to change notification settings - Fork 11
/
global_var.py
58 lines (48 loc) · 1.13 KB
/
global_var.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
from enum import IntEnum
from enum import Enum, unique
brightness = 0
contrast = 0
saturation = 0
backlight = 100
cell_count = 1
warning_cell_voltage = 28
osd = 0
nIndex = 0
PAGE_SIZE = 256
HEAD_SIZE = 4
class ch341_status(Enum):
IDLE = 0
VTX_DISCONNECTED = 1
VTX_CONNECTED = 2
VTX_UPDATE = 3
VTX_UPDATEDONE = 4
VTX_FW_ERROR = 5
VTX_RECONNECT = 6
VTX_RECONNECTDONE = 7
VTX_UPDATE_FAILED = 8
MONITOR_CHECK_ALIVE = 11
MONITOR_CONNECTED = 12
MONITOR_GET_FW = 13
MONITOR_UPDATE = 14
MONITOR_UPDATEDONE = 15
MONITOR_FW_ERROR = 16
EVENT_VRX_DISCONNECTED = 21
EVENT_VRX_CONNECTED = 22
EVENT_VRX_GET_FW = 23
EVENT_VRX_UPDATE = 24
EVENT_VRX_UPDATEDONE = 25
EVENT_VRX_FW_ERROR = 26
STATUS_EXIT = 255
class download_status(Enum):
FILE_PARSE = -1
IDLE = 0
DOWNLOAD_VTX_FW = 1
DOWNLOAD_VTX_FW_DONE = 2
DOWNLOAD_VTX_FW_FAILED = 3
DOWNLOAD_MONITOR_FW = 10
DOWNLOAD_MONITOR_FW_DONE = 11
DOWNLOAD_MONITOR_FW_FAILED = 12
DOWNLOAD_EVENT_VRX_FW = 20
DOWNLOAD_EVENT_VRX_FW_DONE = 21
DOWNLOAD_EVENT_VRX_FW_FAILED = 22
DOWNLOAD_EXIT = 255