#!/usr/bin/env python

# Declare parameters that control opt nm3x camera

PACKAGE="opt_camera"
try:
    import imp
    imp.find_module(PACKAGE)
    from dynamic_reconfigure.parameter_generator_catkin import *
except:
    import roslib; roslib.load_manifest(PACKAGE)
    from dynamic_reconfigure.parameter_generator import *

from driver_base.msg import SensorLevels

gen = ParameterGenerator();

#
gen.add("autoexposure", bool_t, 0, "Auto Exposure", True);
gen.add("exposure",   int_t, 0, "Exposure",   500,  10, 5000);
gen.add("iris",       int_t, 0, "IRIS",       500,   1, 3200);

gen.add("mode",       int_t, 0, "Mode",            4,
        edit_method = gen.enum( [gen.const("ring",      int_t, 0, "Ring mode"),
                                 gen.const("zoom",      int_t, 1, "Zoom mode"),
                                 gen.const("panorama",  int_t, 2, "Panorama mode"),
                                 gen.const("orthogonal",int_t, 3, "Orthogonal mode"),
                                 gen.const("4view",     int_t, 4, "JSK Robot mode")],
                                "Enum to set the camera mode."))

#
gen.add("brightness",   int_t, 0, "Brightness",    220,  100, 1000);
gen.add("sharpness",    int_t, 0, "Sharpness",       4,    0,    8);
gen.add("whitebalance", int_t, 0, "WhiteBalance", 6500, 2800,10000);

gen.add("autowhitebalance", bool_t, 0, "Auto WhiteBalance", True);

gen.add("pan",          double_t, 0, "Pan",         0, -180,  180);
gen.add("tilt",         double_t, 0, "Tilt",        0,    0,  107);
gen.add("roll",         double_t, 0, "Roll",        0, -180,  180);
gen.add("zoom",         double_t, 0, "Zoom",      100,    1, 1500);

gen.add("firmwareversion", str_t, 0, "Firemware version", "");
gen.add("serialid",        str_t, 0, "Serial Number", "");
gen.add("flipscreen",      int_t, 0, "Flip screen",        0,   0,   3);
gen.add("smallhemisphere", int_t, 0, "Small Hemisphere",   1,   0,   9);
gen.add("medianfilter",   bool_t, 0, "Median Filter",      False);

gen.add("jpegquality",     int_t, 0, "Jpeg Quality",      75,   0,  99);
gen.add("infodisplay",    bool_t, 2, "Info Display",       False);
gen.add("capturefps",      int_t, 4, "Capture FPS",      150,   0, 300);
gen.add("actualfps",       int_t, 8, "Actual FPS",       150,   0, 300);
gen.add("lenstype",        int_t, 16, "Lens Type",          2,
        edit_method = gen.enum( [gen.const("sony",      int_t, 0, "Sony Lens"),
                                 gen.const("opt",       int_t, 1, "Opt Lens"),
                                 gen.const("fit",       int_t, 2, "Fit Lens"),
                                 gen.const("depression",int_t, 3, "Depression Lens")],
                                "Enum to set the lens mode."))

gen.add("camera1_pan",       int_t, 0, "Camera 1 Pan",         0, -180,  180);
gen.add("camera1_tilt",      int_t, 0, "Camera 1 Tilt",        0,    0,   90);
gen.add("camera1_roll",      int_t, 0, "Camera 1 Roll",        0, -180,  180);
gen.add("camera1_zoom",      int_t, 0, "Camera 1 Zoom",        0,    0, 1500);

gen.add("camera2_pan",       int_t, 0, "Camera 2 Pan",         0, -180,  180);
gen.add("camera2_tilt",      int_t, 0, "Camera 2 Tilt",        0,    0,   90);
gen.add("camera2_roll",      int_t, 0, "Camera 2 Roll",        0, -180,  180);
gen.add("camera2_zoom",      int_t, 0, "Camera 2 Zoom",       80,    0, 1500);

gen.add("camera3_pan",       int_t, 0, "Camera 3 Pan",         0, -180,  180);
gen.add("camera3_tilt",      int_t, 0, "Camera 3 Tilt",        0,    0,   90);
gen.add("camera3_roll",      int_t, 0, "Camera 3 Roll",        0, -180,  180);
gen.add("camera3_zoom",      int_t, 0, "Camera 3 Zoom",      120,    0, 1500);
#
exit(gen.generate(PACKAGE, "opt_camera", "OptNM33Camera"))

