Updated submodules, implemented timer functionality, fixed configuration issue

This commit is contained in:
2024-11-15 23:13:03 +01:00
parent eb31a92cea
commit 78ced9e7ea
3 changed files with 51 additions and 8 deletions

View File

@@ -39,7 +39,10 @@ class Config:
"LCD_I2C_ADDR", # the i2c adress of the display
"LCD_I2C_NUM_ROWS", # how many rows for character display has the display?
"LCD_I2C_NUM_COLS", # and how many characters can it display per row?
"LCD"] # the actual lcd object (of the PCF8574T I2C_LCD class, see libraries)
"LCD", # the actual lcd object (of the PCF8574T I2C_LCD class, see libraries)
"TIMER_1_DURATION", # the duration of the first timer in seconds
"TIMER_2_DURATION", # the duration of the second first timer in seconds
"TIMER_3_DURATION"] # the duration of the third timer in seconds
self._config_file = config_file
self.load_config()
@@ -129,5 +132,4 @@ def log(log_level: int, message: str):
print(f"[LOGGER] Got a message of unknown log level ({log_level}). Original message is printed below.")
print(f"{message}")
elif cfg.LOG_LEVEL >= log_level: # if log level is valid
print(f"[{log_mapping[log_level]}] {message}")
print(f"[{log_mapping[log_level]}] {message}")