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:
|
||||
log_raise("FishyQR not found")
|
||||
|
||||
if not self.calibrator.all_callibrated():
|
||||
if not self.calibrator.all_calibrated():
|
||||
log_raise("you need to calibrate first")
|
||||
|
||||
self.fisher.toggle_start()
|
||||
@ -131,8 +131,8 @@ class FullAuto(IEngine):
|
||||
logging.error("set target first")
|
||||
return
|
||||
|
||||
if not self.calibrator.all_callibrated():
|
||||
logging.error("you need to callibrate first")
|
||||
if not self.calibrator.all_calibrated():
|
||||
logging.error("you need to calibrate first")
|
||||
return
|
||||
|
||||
current = self.get_coods()
|
||||
|
@ -62,8 +62,11 @@ class Calibrator(IMode):
|
||||
|
||||
# endregion
|
||||
|
||||
def all_callibrated(self):
|
||||
return self.move_factor is not None and self.rot_factor is not None
|
||||
def all_calibrated(self):
|
||||
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):
|
||||
self.engine.show_crop = not self.engine.show_crop
|
||||
|
Loading…
Reference in New Issue
Block a user