2022-02-25 20:03:36 +00:00
|
|
|
"""
|
2022-12-05 17:58:23 +00:00
|
|
|
Module for central PiSCSI control board configuration parameters
|
2022-02-25 20:03:36 +00:00
|
|
|
"""
|
|
|
|
from ctrlboard_hw.ctrlboard_hw_constants import CtrlBoardHardwareConstants
|
|
|
|
|
|
|
|
|
|
|
|
# pylint: disable=too-few-public-methods
|
|
|
|
class CtrlboardConfig:
|
2022-12-05 17:58:23 +00:00
|
|
|
"""Class for central PiSCSI control board configuration parameters"""
|
2022-11-30 05:19:17 +00:00
|
|
|
|
2022-02-25 20:03:36 +00:00
|
|
|
ROTATION = 0
|
|
|
|
WIDTH = 128
|
|
|
|
HEIGHT = 64
|
|
|
|
LINES = 8
|
|
|
|
TOKEN = ""
|
|
|
|
BORDER = 5
|
|
|
|
TRANSITIONS = 1
|
|
|
|
DISPLAY_I2C_ADDRESS = CtrlBoardHardwareConstants.DISPLAY_I2C_ADDRESS
|
|
|
|
PCA9554_I2C_ADDRESS = CtrlBoardHardwareConstants.PCA9554_I2C_ADDRESS
|
|
|
|
MENU_REFRESH_INTERVAL = 6
|
|
|
|
LOG_LEVEL = 30 # Warning
|
|
|
|
|
2022-12-05 17:58:23 +00:00
|
|
|
PISCSI_HOST = "localhost"
|
|
|
|
PISCSI_PORT = "6868"
|
2022-02-25 20:03:36 +00:00
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
result = "rotation: " + str(self.ROTATION) + "\n"
|
|
|
|
result += "width: " + str(self.WIDTH) + "\n"
|
|
|
|
result += "height: " + str(self.HEIGHT) + "\n"
|
|
|
|
result += "lines: " + str(self.LINES) + "\n"
|
|
|
|
result += "border: " + str(self.BORDER) + "\n"
|
2022-12-05 17:58:23 +00:00
|
|
|
result += "piscsi host: " + str(self.PISCSI_HOST) + "\n"
|
|
|
|
result += "piscsi port: " + str(self.PISCSI_PORT) + "\n"
|
2022-02-25 20:03:36 +00:00
|
|
|
result += "transitions: " + str(self.TRANSITIONS) + "\n"
|
|
|
|
|
|
|
|
return result
|