|
@@ -15,8 +15,7 @@ from databases import insert_photo_records
|
|
|
from .McuDeviationSet import McuDeviationSet
|
|
from .McuDeviationSet import McuDeviationSet
|
|
|
from .OtherSet import OtherSet
|
|
from .OtherSet import OtherSet
|
|
|
from .DebugUart import DebugUart
|
|
from .DebugUart import DebugUart
|
|
|
-import win32api, win32gui, win32con
|
|
|
|
|
-from win32gui import EnumWindows, GetWindowText
|
|
|
|
|
|
|
+
|
|
|
# mcu命令
|
|
# mcu命令
|
|
|
class DeviceControl(BaseClass, metaclass=SingletonType):
|
|
class DeviceControl(BaseClass, metaclass=SingletonType):
|
|
|
lock = threading.Lock()
|
|
lock = threading.Lock()
|
|
@@ -133,17 +132,7 @@ class DeviceControl(BaseClass, metaclass=SingletonType):
|
|
|
)
|
|
)
|
|
|
self.msg_type = "mcu"
|
|
self.msg_type = "mcu"
|
|
|
|
|
|
|
|
- def close_other_window(self):
|
|
|
|
|
- hwnd_list = []
|
|
|
|
|
- def callback(hwnd, _):
|
|
|
|
|
- title = GetWindowText(hwnd)
|
|
|
|
|
- if title == "digiCamControl by Duka Istvan":
|
|
|
|
|
- hwnd_list.append(hwnd)
|
|
|
|
|
- EnumWindows(callback, None)
|
|
|
|
|
- if hwnd_list:
|
|
|
|
|
- hwnd = hwnd_list[0]
|
|
|
|
|
- win32gui.PostMessage(hwnd, win32con.WM_CLOSE, 0, 0)
|
|
|
|
|
- return True
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
def setOtherMaxMinValue(self,item, value):
|
|
def setOtherMaxMinValue(self,item, value):
|
|
|
value = int(value)
|
|
value = int(value)
|
|
@@ -193,7 +182,7 @@ class DeviceControl(BaseClass, metaclass=SingletonType):
|
|
|
self.send_cmd()
|
|
self.send_cmd()
|
|
|
# time.sleep(0.01)
|
|
# time.sleep(0.01)
|
|
|
self.get_basic_info_mcu()
|
|
self.get_basic_info_mcu()
|
|
|
- self.close_other_window()
|
|
|
|
|
|
|
+ # self.close_other_window()
|
|
|
except BaseException as e:
|
|
except BaseException as e:
|
|
|
print("121231298908", e)
|
|
print("121231298908", e)
|
|
|
break
|
|
break
|