2610.1 - First commit
This commit is contained in:
1 parent
1a247323f1
commit
d8d131e1c1
69 files changed
+2073
-2
No files matched your search
@@ -0,0 +1,36 @@
|
||||
import queue
|
||||
import re
|
||||
|
||||
gun_list = {}
|
||||
|
||||
g_std_com_port = None
|
||||
|
||||
g_xbee_mode = ""
|
||||
|
||||
admin_mode = False
|
||||
count_interval = 10
|
||||
|
||||
message_queue = queue.Queue()
|
||||
message_dequeue = ""
|
||||
|
||||
|
||||
def only_hex_in_string(test):
|
||||
return re.fullmatch(r"\b[0-9a-fA-F]+\b", test) is not None
|
||||
|
||||
|
||||
def minutes_to_string(mins):
|
||||
r_str = ""
|
||||
if mins >= 525600:
|
||||
tmp = int(mins // 525600)
|
||||
r_str += "{}y ".format(tmp)
|
||||
mins -= tmp * 525600
|
||||
if mins >= 1440:
|
||||
tmp = int(mins // 1440)
|
||||
r_str += "{}d ".format(tmp)
|
||||
mins -= tmp * 1440
|
||||
if mins >= 60:
|
||||
tmp = int(mins // 60)
|
||||
r_str += "{}h ".format(tmp)
|
||||
mins -= tmp * 60
|
||||
r_str += "{}m".format(mins)
|
||||
return r_str
|
||||
Reference in new issue
Block a user