Improved the seeking in the grid calibration
- Make the seeking of the upper left corner more intelligent/responsive rather than hard coding "left 15 times up 15 times" - Commented out more experimentation code
This commit is contained in:
@@ -247,8 +247,22 @@ class DFWINDOW:
|
||||
time.sleep(self.sleep_after_mouse)
|
||||
self.focusWindow()
|
||||
time.sleep(self.sleep_after_focus)
|
||||
self.sendKeys("w", 30)
|
||||
self.sendKeys("a", 30)
|
||||
|
||||
# Improved seeking upper left
|
||||
self.sendKeys("w", 8)
|
||||
img = self.capContent()
|
||||
while not self.TOOLS.isTopBorder(img):
|
||||
self.sendKeys("w", 4)
|
||||
img = self.capContent()
|
||||
self.sendKeys("w", 4)
|
||||
|
||||
self.sendKeys("a", 8)
|
||||
img = self.capContent()
|
||||
while not self.TOOLS.isLeftBorder(img):
|
||||
self.sendKeys("a", 4)
|
||||
img = self.capContent()
|
||||
self.sendKeys("a", 4)
|
||||
|
||||
img = self.capWindow()
|
||||
self._content_left, self._content_top = self.TOOLS.find_content_origin(img)
|
||||
self._content_right = int(img.shape[1] - self._content_left)
|
||||
@@ -455,11 +469,6 @@ class DFWINDOW:
|
||||
self._map_width = calib_info["map_width"]
|
||||
|
||||
def getPanoramaMap(self):
|
||||
# self.test1()
|
||||
# return
|
||||
|
||||
self.calibrateGrid()
|
||||
# self.test_saveGrids()
|
||||
# self.test_loadCalib()
|
||||
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user