change Salidomo siganl name to match with Salimax for Cerbo

This commit is contained in:
Yinyin Liu 2024-06-19 13:33:24 +02:00
parent 50e501c37b
commit 919cc67ae3
1 changed files with 2 additions and 2 deletions

View File

@ -845,7 +845,7 @@ def read_warning_and_alarm_flags():
CsvSignal('/Battery/Devices/AlarmFlags/LMPA', c.read_bool(register=1005, bit=45)), CsvSignal('/Battery/Devices/AlarmFlags/LMPA', c.read_bool(register=1005, bit=45)),
CsvSignal('/Battery/Devices/AlarmFlags/HEBT', c.read_bool(register=1005, bit=46)), CsvSignal('/Battery/Devices/AlarmFlags/HEBT', c.read_bool(register=1005, bit=46)),
CsvSignal('/Battery/Devices/AlarmFlags/CURM', c.read_bool(register=1005, bit=48)), CsvSignal('/Battery/Devices/AlarmFlags/CURM', c.read_bool(register=1005, bit=48)),
CsvSignal('/Battery/Devices/AlarmFlags/NeedToReplaceBattery',c.read_limb_string(1059)), CsvSignal('/Battery/Devices/AlarmFlags/2 or more string are disabled',c.read_limb_string(1059)),
] ]
def update(modbus, batteries, dbus, signals, csv_signals): def update(modbus, batteries, dbus, signals, csv_signals):
@ -942,7 +942,7 @@ def get_installation_name(file_path):
return file.read().strip() return file.read().strip()
def manage_csv_files(directory_path, max_files=20): def manage_csv_files(directory_path, max_files=20):
csv_files = [f for f in os.listdir(directory_path)] csv_files = [f for f in os.listdir(directory_path) if os.path.isfile(os.path.join(directory_path, f))]
csv_files.sort(key=lambda x: os.path.getctime(os.path.join(directory_path, x))) csv_files.sort(key=lambda x: os.path.getctime(os.path.join(directory_path, x)))
# Remove oldest files if exceeds maximum # Remove oldest files if exceeds maximum
while len(csv_files) > max_files: while len(csv_files) > max_files: