"""
Feature flags to enable or disable features which should not be accessible via config
"""

import os

TRUTHY = {"1", "true"}

ENABLE_SYSTEM_WATCHDOG = True
ENABLE_PARALLEL_IMD_TEST = True
ENABLE_UVLOOP_EVENT_LOOP = True
"""Use uvloop instead of the built-in asyncio event loop"""

ENABLE_STATEMACHINE_LOGGERS = False
ENABLE_DCMS_DEBUG_LOGGERS = False

# If any program allocates memory this may cause delays.
# Clear cache is no nice solution but can be used for first tests.
ENABLE_CCS_TEST = False
ENABLE_CCS_PUTEST_MODE = False
ENABLE_CCS_RESTART_TEST = False
ENABLE_CCS_EXTERNAL_PAYMENT = True
"""Allow EIM payments, e.g. RFID (in combination with PnC)"""
ENABLE_CCS_SERIESMODE_WITH_PLUG_MAX_VOLTAGE = False
"""Use plug max voltage for series mode in CCS with low voltage EVs"""

ENABLE_CHADEMO_TEST = False
ENABLE_CHADEMO_V2X_EV_FAKE = False
ENABLE_CHADEMO_V2X_DUMMY = False
ENABLE_CHADEMO_V2X_TESLA = False
ENABLE_PU_ALWAYS_ON = False
ENABLE_PU_TEST_PROGRAM = False
ENABLE_WIDE_CABLE_CHECK_TOLERANCE = False  # Used for PRE V2G module in cold condition (Workaround only)
ENABLE_CC6_MANUAL_FAN_TEST = False
ENABLE_LEM_AUTO_NTP_SYNC = True  # Means the LEM meter does automatically update against our local NtpServer.

DOCKER = "DOCKER" in os.environ
""" Check whether execution is taking place in a Docker container """

VIRTUAL_PLC = os.environ.get("VIRTUAL_PLC", "").strip().lower() in TRUTHY
""" Enable CCS communication over ethernet """

# To be removed flags
ENABLE_DCC_HEURISTIC_DURATION_CHECK = False
