"""
Configuration for COM Port Test Writer
"""
import os
from dotenv import load_dotenv

load_dotenv()

# COM Port Settings
COM_PORT = os.getenv('COM_PORT', 'COM4')
BAUD_RATE = int(os.getenv('BAUD_RATE', 9600))
TIMEOUT = int(os.getenv('TIMEOUT', 1))

# Test Data Settings
WRITE_INTERVAL = float(os.getenv('WRITE_INTERVAL', 1.0))  # seconds between writes
TEST_DATA_TYPE = os.getenv('TEST_DATA_TYPE', 'scales')  # 'scales', 'counter', 'random'

# Scales data
SCALES_MIN = int(os.getenv('SCALES_MIN', 5000))
SCALES_MAX = int(os.getenv('SCALES_MAX', 20000))
SCALES_INCREMENT = float(os.getenv('SCALES_INCREMENT', 5.0))

# Application Settings
DEBUG = os.getenv('DEBUG', 'True') == 'True'
