mirror of
https://github.com/fishyboteso/fishyboteso.git
synced 2024-08-30 18:32:13 +00:00
0.5.4 hotfix
fixed get_coords() tupple overflow issue, improved hole check in full auto fishing, improved message when FishyQR is not found, keeping chalutier in migration
This commit is contained in:
parent
d09dd42666
commit
814ca1e0d5
@ -8,4 +8,4 @@ lam2 = ("LibAddonMenu-2.0", "https://www.esoui.com/downloads/dl7/LibAddonMenu-2.
|
|||||||
fishyqr = ("FishyQR", "https://github.com/fishyboteso/FishyQR/files/7575974/FishyQR.zip", 101)
|
fishyqr = ("FishyQR", "https://github.com/fishyboteso/FishyQR/files/7575974/FishyQR.zip", 101)
|
||||||
libgps = ("LibGPS", "https://cdn.esoui.com/downloads/file601/LibGPS_3_0_3.zip", 30)
|
libgps = ("LibGPS", "https://cdn.esoui.com/downloads/file601/LibGPS_3_0_3.zip", 30)
|
||||||
|
|
||||||
version = "0.5.3"
|
version = "0.5.4"
|
||||||
|
@ -52,7 +52,7 @@ def get_values_from_image(img):
|
|||||||
vals = qr.data.decode('utf-8').split(",")
|
vals = qr.data.decode('utf-8').split(",")
|
||||||
return tuple(float(v) for v in vals)
|
return tuple(float(v) for v in vals)
|
||||||
|
|
||||||
logging.error("FishyQR not found")
|
logging.error("FishyQR not found, try to drag it around and try again")
|
||||||
return None
|
return None
|
||||||
except Exception:
|
except Exception:
|
||||||
logging.error("Couldn't read coods, make sure 'crop' calibration is correct")
|
logging.error("Couldn't read coods, make sure 'crop' calibration is correct")
|
||||||
|
@ -71,7 +71,7 @@ class FullAuto(IEngine):
|
|||||||
|
|
||||||
self.window.crop = get_qr_location(self.window.get_capture())
|
self.window.crop = get_qr_location(self.window.get_capture())
|
||||||
if self.window.crop is None:
|
if self.window.crop is None:
|
||||||
log_raise("FishyQR not found")
|
log_raise("FishyQR not found, try to drag it around and try again")
|
||||||
|
|
||||||
if not (type(self.mode) is Calibrator) and not self.calibrator.all_calibrated():
|
if not (type(self.mode) is Calibrator) and not self.calibrator.all_calibrated():
|
||||||
log_raise("you need to calibrate first")
|
log_raise("you need to calibrate first")
|
||||||
@ -116,7 +116,7 @@ class FullAuto(IEngine):
|
|||||||
todo its waiting for qr which doesn't block the engine when commanded to close
|
todo its waiting for qr which doesn't block the engine when commanded to close
|
||||||
"""
|
"""
|
||||||
img = self.window.processed_image(func=image_pre_process)
|
img = self.window.processed_image(func=image_pre_process)
|
||||||
return get_values_from_image(img)
|
return get_values_from_image(img)[:3]
|
||||||
|
|
||||||
def move_to(self, target) -> bool:
|
def move_to(self, target) -> bool:
|
||||||
current = self.get_coords()
|
current = self.get_coords()
|
||||||
@ -177,27 +177,17 @@ class FullAuto(IEngine):
|
|||||||
def look_for_hole(self) -> bool:
|
def look_for_hole(self) -> bool:
|
||||||
self._hole_found_flag = False
|
self._hole_found_flag = False
|
||||||
|
|
||||||
if FishingMode.CurrentMode == fishing_mode.State.LOOKING:
|
valid_states = [fishing_mode.State.LOOKING, fishing_mode.State.FISHING]
|
||||||
return True
|
|
||||||
|
|
||||||
def found_hole(e):
|
|
||||||
if e == fishing_mode.State.LOOKING:
|
|
||||||
self._hole_found_flag = True
|
|
||||||
|
|
||||||
fishing_mode.subscribers.append(found_hole)
|
|
||||||
|
|
||||||
t = 0
|
t = 0
|
||||||
while not self._hole_found_flag and t <= 1.25:
|
while not self._hole_found_flag and t <= 2.5:
|
||||||
mse.move(0, FullAuto.rotate_by)
|
direction = -1 if t > 1.25 else 1
|
||||||
|
mse.move(0, FullAuto.rotate_by*direction)
|
||||||
time.sleep(0.05)
|
time.sleep(0.05)
|
||||||
t += 0.05
|
t += 0.05
|
||||||
while not self._hole_found_flag and t > 0:
|
self._hole_found_flag = FishingMode.CurrentMode in valid_states
|
||||||
mse.move(0, -FullAuto.rotate_by)
|
|
||||||
time.sleep(0.05)
|
|
||||||
t -= 0.05
|
|
||||||
|
|
||||||
self._curr_rotate_y = t
|
self._curr_rotate_y = t
|
||||||
fishing_mode.subscribers.remove(found_hole)
|
|
||||||
return self._hole_found_flag
|
return self._hole_found_flag
|
||||||
|
|
||||||
def rotate_back(self):
|
def rotate_back(self):
|
||||||
|
@ -44,7 +44,7 @@ class SemiFisherEngine(IEngine):
|
|||||||
|
|
||||||
self.window.crop = get_qr_location(self.window.get_capture())
|
self.window.crop = get_qr_location(self.window.get_capture())
|
||||||
if self.window.crop is None:
|
if self.window.crop is None:
|
||||||
log_raise("FishyQR not found")
|
log_raise("FishyQR not found, try to drag it around and try again")
|
||||||
|
|
||||||
while self.start and WindowClient.running():
|
while self.start and WindowClient.running():
|
||||||
capture = self.window.processed_image(func=image_pre_process)
|
capture = self.window.processed_image(func=image_pre_process)
|
||||||
|
@ -10,7 +10,6 @@ from .config import config
|
|||||||
class Migration:
|
class Migration:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def up_to_0_5_3():
|
def up_to_0_5_3():
|
||||||
helper.remove_addon(*chalutier)
|
|
||||||
config.delete("addoninstalled")
|
config.delete("addoninstalled")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user