"""
Created on 27 Nov 2022

@author: Rogier van Staveren
"""

PROJECTOR_CONFIGS = {
    "all": {
        "commands": [
            "3d",
            "amxdd",
            "appmod",
            "asp",
            "audiosour",
            "autopower",
            "ballastfwversion",
            "baud",
            "bc",
            "bgain",
            "blank",
            "bri",
            "broadcasting",
            "color",
            "con",
            "ct",
            "directpower",
            "formatfwversion",
            "freeze",
            "gamma",
            "ggain",
            "hdrbri",
            "highaltitude",
            "ins",
            "lampcustom",
            "lampm",
            "lanfwversion",
            "lensload",
            "lensreset",
            "lenssave",
            "lpsaver",
            "ltim",
            "ltim2",
            "macaddr",
            "menu",
            "menuposition",
            "micvol",
            "modelname",
            "mcufwversion",
            "mute",
            "pow",
            "pp",
            "prjlogincode",
            "qas",
            "rgain",
            "rr",
            "scalerfwversion",
            "sharp",
            "sour",
            "standbymic",
            "standbymnt",
            "standbynet",
            "sysfwversion",
            "tint",
            "vkeystone",
            "vol",
        ],
        "sources": [
            "dp",
            "dvia",
            "dvid",
            "hdbaset",
            "hdmi",
            "hdmi2",
            "network",
            "rgb",
            "rgb2",
            "rgb3",
            "svid",
            "usbdisplay",
            "usbreader",
            "vid",
            "wireless",
            "ypbr",
            "ypbr2",
            "smartsystem",
        ],
        "audio_sources": [
            "off",
            "rgb",
            "rgb2",
            "vid",
            "ypbr",
            "hdmi",
            "hdmi2",
        ],
        "picture_modes": [
            "dynamic",
            "preset",
            "srgb",
            "bright",
            "livingroom",
            "game",
            "cine",
            "std",
            "football",
            "dicom",
            "user1",
            "user2",
            "user3",
            "isfday",
            "isfnight",
            "threed",
        ],
        "color_temperatures": [
            "warmer",
            "warm",
            "normal",
            "cool",
            "cooler",
            "native",
        ],
        "aspect_ratios": [
            "4:3",
            "16:6",
            "16:9",
            "16:10",
            "auto",
            "real",
            "lbox",
            "wide",
            "anam",
        ],
        "projector_positions": [
            "ft",
            "re",
            "rc",
            "fc",
        ],
        "lamp_modes": [
            "lnor",
            "eco",
            "seco",
            "seco2",
            "seco3",
            "dimming",
            "custom",
            "dualbr",
            "dualre",
            "single",
            "singleeco",
        ],
        "3d_modes": [
            "off",
            "auto",
            "tb",
            "fs",
            "fp",
            "sbs",
            "da",
            "iv",
            "2d3d",
            "nvidia",
        ],
        "poweron_time": 100,
        "poweroff_time": 100,
    },
    "w1110": {
        "commands": [
            "3d",
            "appmod",
            "asp",
            "baud",
            "bc",
            "blank",
            "bri",
            "color",
            "con",
            "ct",
            "directpower",
            "highaltitude",
            "lampm",
            "ltim",
            "modelname",
            "mute",
            "pow",
            "pp",
            "qas",
            "sharp",
            "sour",
            "vol",
        ],
        "sources": ["hdmi", "hdmi2", "rgb", "vid", "ypbr"],
        "audio_sources": [],
        "picture_modes": [
            "bright",
            "game",
            "cine",
            "user1",
            "user2",
            "isfday",
            "isfnight",
            "threed",
        ],
        "color_temperatures": ["warm", "normal", "cool", "native"],
        "aspect_ratios": ["4:3", "16:9", "auto", "lbox", "wide"],
        "projector_positions": ["ft", "re", "rc", "fc"],
        "lamp_modes": ["lnor", "eco", "seco"],
        "3d_modes": ["off", "auto", "tb", "fs", "fp", "sbs", "da", "iv"],
        "poweron_time": 100,
        "poweroff_time": 100,
    },
    "x3000i": {
        "commands": [
            "3d",
            "appmod",
            "asp",
            "baud",
            "blank",
            "bri",
            "con",
            "ct",
            "directpower",
            "highaltitude",
            "hkeystone",
            "lampm",
            "ltim",
            "mcufwversion" "modelname",
            "mute",
            "pow",
            "pp",
            "qas",
            "scalerfwversion",
            "sharp",
            "sour",
            "sysfwversion",
            "vkeystone",
            "vol",
        ],
        "sources": ["hdmi", "hdmi2", "smartsystem"],
        "audio_sources": [],
        "picture_modes": [
            "bright",
            "livingroom",
            "game",
            "cine",
            "sport",
            "user1",
            "threed",
        ],
        "color_temperatures": [
            "warm",
            "normal",
            "cool",
        ],  # manual says native is supported, but apparently not
        "aspect_ratios": ["4:3", "16:9", "2.4:1", "auto"],
        "projector_positions": ["ft", "re", "rc", "fc"],
        "menu_positions": ["center", "tl", "tr", "br", "bl"],
        "lamp_modes": ["lnor", "eco", "seco", "custom"],
        "3d_modes": [
            "off",
            "auto",
            "tb",
            "fs",
            "fp",
            "sbs",
            "da",
            "iv",
        ],  # sbs, tb, and fp were enabled with a firmware update but undocumented
        "poweron_time": 100,
        "poweroff_time": 100,
    },
}

BAUD_RATES = [2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200]

# POSITIONS = {
#     "ft": "front_table",
#     "re": "rear_table",
#     "rc": "rear_ceiling",
#     "fc": "front_ceiling",
# }
#
# LAMP_MODES = {
#     "lnor": "normal",
#     "seco": "smart_eco_image_care",
#     "seco2": "smart_eco_lamp_care",
#     "seco3": "smart_eco_lumen_care",
#     "dualbr": "dual_brightness",
#     "dualre": "dual_reliable",
#     "single": "single_alternative",
#     "singleeco": "single_alternative_eco",
# }
#
# PICTURE_MODES = {
#     "cine": "cinema",
#     "std": "standard",
#     "threed": "3d",
# }
