mirror of
https://github.com/fishyboteso/fishyboteso.git
synced 2024-08-30 18:32:13 +00:00
fixed divide by zero error
This commit is contained in:
parent
bfb498d1c9
commit
aa207dae02
@ -89,7 +89,7 @@ class FullAuto(IEngine):
|
|||||||
if self.window.crop is None:
|
if self.window.crop is None:
|
||||||
log_raise("FishyQR not found")
|
log_raise("FishyQR not found")
|
||||||
|
|
||||||
if not self.calibrator.all_callibrated():
|
if not self.calibrator.all_calibrated():
|
||||||
log_raise("you need to calibrate first")
|
log_raise("you need to calibrate first")
|
||||||
|
|
||||||
self.fisher.toggle_start()
|
self.fisher.toggle_start()
|
||||||
@ -131,8 +131,8 @@ class FullAuto(IEngine):
|
|||||||
logging.error("set target first")
|
logging.error("set target first")
|
||||||
return
|
return
|
||||||
|
|
||||||
if not self.calibrator.all_callibrated():
|
if not self.calibrator.all_calibrated():
|
||||||
logging.error("you need to callibrate first")
|
logging.error("you need to calibrate first")
|
||||||
return
|
return
|
||||||
|
|
||||||
current = self.get_coods()
|
current = self.get_coods()
|
||||||
|
@ -62,8 +62,11 @@ class Calibrator(IMode):
|
|||||||
|
|
||||||
# endregion
|
# endregion
|
||||||
|
|
||||||
def all_callibrated(self):
|
def all_calibrated(self):
|
||||||
return self.move_factor is not None and self.rot_factor is not None
|
return self.move_factor is not None and \
|
||||||
|
self.rot_factor is not None and \
|
||||||
|
self.move_factor != 0 and \
|
||||||
|
self.rot_factor != 0
|
||||||
|
|
||||||
def toggle_show(self):
|
def toggle_show(self):
|
||||||
self.engine.show_crop = not self.engine.show_crop
|
self.engine.show_crop = not self.engine.show_crop
|
||||||
|
Loading…
Reference in New Issue
Block a user