correct mismatch of arguments in init_signals in main function of battery service

This commit is contained in:
Yinyin Liu 2024-07-04 09:32:02 +02:00
parent 35943d2e0c
commit fac256bca9
1 changed files with 2 additions and 3 deletions

View File

@ -1117,9 +1117,8 @@ def main(argv):
logging.info('found ' + str(n) + (' battery' if n == 1 else ' batteries')) logging.info('found ' + str(n) + (' battery' if n == 1 else ' batteries'))
if n <= 0: if n <= 0:
sys.exit(2) sys.exit(2)
bat = c.first(batteries) # report hw and fw version of first battery found signals = init_signals(n)
signals = init_signals(bat.hardware_version, bat.firmware_version, n) csv_signals = create_csv_signals()
csv_signals = create_csv_signals(bat.firmware_version)
main_loop = init_main_loop() # must run before init_dbus because gobject does some global magic main_loop = init_main_loop() # must run before init_dbus because gobject does some global magic
dbus = init_dbus(tty, signals) dbus = init_dbus(tty, signals)
update_task = create_update_task(modbus, dbus, batteries, signals, csv_signals, main_loop) update_task = create_update_task(modbus, dbus, batteries, signals, csv_signals, main_loop)