focusb

Show or modify the blue camera focus

usage: focusb: [-h, --help] target [-nomove] [-quiet]

-h , --help

show this help message and exit

target

Blue camera focus in mm

-nomove

If set, do not execute the move, only set targets

-quiet

If set, disable progress bar

#! @KPYTHON@

from KCWI import Blue
from KCWI.Helper import say
import argparse
import sys

# Parsing arguments
description = "Show or modify the blue camera focus"
parser = argparse.ArgumentParser(description=description)
parser.add_argument('target',nargs="?",default=None, help='Blue camera focus in mm')
parser.add_argument('-nomove',required=False, default=False,action='store_true', help='If set, do not execute the move, only set targets')
parser.add_argument('-quiet',required=False, default=False,action='store_true', help='If set, disable progress bar')


if __name__ == '__main__':

   args = parser.parse_args()

   if args.nomove == True:
      move = False
   else:
      move = True

   focus = Blue.focusb(target=args.target,move=move,quiet=args.quiet)
   say("Blue camera focus (mm): %s" % (focus))