You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
685 B
Python

"""
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'