update battery signal for Venus with s3
This commit is contained in:
parent
4d84a0534a
commit
9b4a0ab9a0
|
@ -139,82 +139,89 @@ def init_battery_signals():
|
||||||
return status.battery.ampere_hours / 2
|
return status.battery.ampere_hours / 2
|
||||||
|
|
||||||
return [
|
return [
|
||||||
BatterySignal('/TimeToTOCRequest', max, read_float(register=1052)),
|
|
||||||
BatterySignal('/IoStatus/EocReached', return_in_list, read_eoc_reached),
|
|
||||||
BatterySignal('/NumOfLimbStrings', return_in_list, limp_strings_value),
|
|
||||||
BatterySignal('/Dc/0/Voltage', mean, get_value=read_voltage(), unit='V'),
|
BatterySignal('/Dc/0/Voltage', mean, get_value=read_voltage(), unit='V'),
|
||||||
BatterySignal('/Dc/0/Current', sum, get_value=read_current(), unit='A'),
|
BatterySignal('/Dc/0/Current', sum, get_value=read_current(), unit='A'),
|
||||||
BatterySignal('/Dc/0/Power', sum, get_value=read_power, unit='W'),
|
BatterySignal('/Dc/0/Power', sum, get_value=read_power, unit='W'),
|
||||||
|
|
||||||
BatterySignal('/BussVoltage', mean, read_float(register=1001, scale_factor=0.01, offset=0), unit='V'),
|
BatterySignal('/BussVoltage', mean, read_float(register=1001, scale_factor=0.01, offset=0), unit='V'),
|
||||||
BatterySignal('/Soc', mean, read_soc, unit='%'),
|
BatterySignal('/Soc', mean, read_soc, unit='%'),
|
||||||
BatterySignal('/LowestSoc', min, read_float(register=1053, scale_factor=0.1, offset=0), unit='%'),
|
|
||||||
BatterySignal('/Dc/0/Temperature', mean, read_float(register=1003, scale_factor=0.1, offset=-400), unit='C'),
|
BatterySignal('/Dc/0/Temperature', mean, read_float(register=1003, scale_factor=0.1, offset=-400), unit='C'),
|
||||||
BatterySignal('/Dc/0/LowestTemperature', min, read_float(register=1003, scale_factor=0.1, offset=-400), unit='C'),
|
|
||||||
BatterySignal('/WarningFlags/TaM1', return_in_list, read_bool(base_register=1005, bit=1)),
|
BatterySignal('/NumberOfWarningFlags', sum, count_bits(base_register=1005, nb_of_registers=4, nb_of_bits=50)),
|
||||||
BatterySignal('/WarningFlags/TbM1', return_in_list, read_bool(base_register=1005, bit=4)),
|
BatterySignal('/WarningFlags/TaM1', any, read_bool(base_register=1005, bit=1)),
|
||||||
BatterySignal('/WarningFlags/VBm1', return_in_list, read_bool(base_register=1005, bit=6)),
|
BatterySignal('/WarningFlags/TbM1', any, read_bool(base_register=1005, bit=4)),
|
||||||
BatterySignal('/WarningFlags/VBM1', return_in_list, read_bool(base_register=1005, bit=8)),
|
BatterySignal('/WarningFlags/VBm1', any, read_bool(base_register=1005, bit=6)),
|
||||||
BatterySignal('/WarningFlags/IDM1', return_in_list, read_bool(base_register=1005, bit=10)),
|
BatterySignal('/WarningFlags/VBM1', any, read_bool(base_register=1005, bit=8)),
|
||||||
BatterySignal('/WarningFlags/vsm1', return_in_list, read_bool(base_register=1005, bit=22)),
|
BatterySignal('/WarningFlags/IDM1', any, read_bool(base_register=1005, bit=10)),
|
||||||
BatterySignal('/WarningFlags/vsM1', return_in_list, read_bool(base_register=1005, bit=24)),
|
BatterySignal('/WarningFlags/vsm1', any, read_bool(base_register=1005, bit=22)),
|
||||||
BatterySignal('/WarningFlags/iCM1', return_in_list, read_bool(base_register=1005, bit=26)),
|
BatterySignal('/WarningFlags/vsM1', any, read_bool(base_register=1005, bit=24)),
|
||||||
BatterySignal('/WarningFlags/iDM1', return_in_list, read_bool(base_register=1005, bit=28)),
|
BatterySignal('/WarningFlags/iCM1', any, read_bool(base_register=1005, bit=26)),
|
||||||
BatterySignal('/WarningFlags/MID1', return_in_list, read_bool(base_register=1005, bit=30)),
|
BatterySignal('/WarningFlags/iDM1', any, read_bool(base_register=1005, bit=28)),
|
||||||
BatterySignal('/WarningFlags/BLPW', return_in_list, read_bool(base_register=1005, bit=32)),
|
BatterySignal('/WarningFlags/MID1', any, read_bool(base_register=1005, bit=30)),
|
||||||
BatterySignal('/WarningFlags/CCBF', return_in_list, read_bool(base_register=1005, bit=33)),
|
BatterySignal('/WarningFlags/BLPW', any, read_bool(base_register=1005, bit=32)),
|
||||||
BatterySignal('/WarningFlags/Ah_W', return_in_list, read_bool(base_register=1005, bit=35)),
|
BatterySignal('/WarningFlags/CCBF', any, read_bool(base_register=1005, bit=33)),
|
||||||
BatterySignal('/WarningFlags/MPMM', return_in_list, read_bool(base_register=1005, bit=38)),
|
BatterySignal('/WarningFlags/Ah_W', any, read_bool(base_register=1005, bit=35)),
|
||||||
BatterySignal('/WarningFlags/TCdi', return_in_list, read_bool(base_register=1005, bit=40)),
|
BatterySignal('/WarningFlags/MPMM', any, read_bool(base_register=1005, bit=38)),
|
||||||
BatterySignal('/WarningFlags/LMPW', return_in_list, read_bool(base_register=1005, bit=44)),
|
BatterySignal('/WarningFlags/TCdi', any, read_bool(base_register=1005, bit=40)),
|
||||||
BatterySignal('/WarningFlags/TOCW', return_in_list, read_bool(base_register=1005, bit=47)),
|
BatterySignal('/WarningFlags/LMPW', any, read_bool(base_register=1005, bit=44)),
|
||||||
BatterySignal('/WarningFlags/BUSL', return_in_list, read_bool(base_register=1005, bit=49)),
|
BatterySignal('/WarningFlags/TOCW', any, read_bool(base_register=1005, bit=47)),
|
||||||
BatterySignal('/AlarmFlags/Tam', return_in_list, read_bool(base_register=1005, bit=0)),
|
BatterySignal('/WarningFlags/BUSL', any, read_bool(base_register=1005, bit=49)),
|
||||||
BatterySignal('/AlarmFlags/TaM2', return_in_list, read_bool(base_register=1005, bit=2)),
|
|
||||||
BatterySignal('/AlarmFlags/Tbm', return_in_list, read_bool(base_register=1005, bit=3)),
|
BatterySignal('/NumberOfAlarmFlags', sum, count_bits(base_register=1009, nb_of_registers=4, nb_of_bits=50)),
|
||||||
BatterySignal('/AlarmFlags/TbM2', return_in_list, read_bool(base_register=1005, bit=5)),
|
BatterySignal('/AlarmFlags/Tam', any, read_bool(base_register=1005, bit=0)),
|
||||||
BatterySignal('/AlarmFlags/VBm2', return_in_list, read_bool(base_register=1005, bit=7)),
|
BatterySignal('/AlarmFlags/TaM2', any, read_bool(base_register=1005, bit=2)),
|
||||||
BatterySignal('/AlarmFlags/VBM2', return_in_list, read_bool(base_register=1005, bit=9)),
|
BatterySignal('/AlarmFlags/Tbm', any, read_bool(base_register=1005, bit=3)),
|
||||||
BatterySignal('/AlarmFlags/IDM2', return_in_list, read_bool(base_register=1005, bit=11)),
|
BatterySignal('/AlarmFlags/TbM2', any, read_bool(base_register=1005, bit=5)),
|
||||||
BatterySignal('/AlarmFlags/ISOB', return_in_list, read_bool(base_register=1005, bit=12)),
|
BatterySignal('/AlarmFlags/VBm2', any, read_bool(base_register=1005, bit=7)),
|
||||||
BatterySignal('/AlarmFlags/MSWE', return_in_list, read_bool(base_register=1005, bit=13)),
|
BatterySignal('/AlarmFlags/VBM2', any, read_bool(base_register=1005, bit=9)),
|
||||||
BatterySignal('/AlarmFlags/FUSE', return_in_list, read_bool(base_register=1005, bit=14)),
|
BatterySignal('/AlarmFlags/IDM2', any, read_bool(base_register=1005, bit=11)),
|
||||||
BatterySignal('/AlarmFlags/HTRE', return_in_list, read_bool(base_register=1005, bit=15)),
|
BatterySignal('/AlarmFlags/ISOB', any, read_bool(base_register=1005, bit=12)),
|
||||||
BatterySignal('/AlarmFlags/TCPE', return_in_list, read_bool(base_register=1005, bit=16)),
|
BatterySignal('/AlarmFlags/MSWE', any, read_bool(base_register=1005, bit=13)),
|
||||||
BatterySignal('/AlarmFlags/STRE', return_in_list, read_bool(base_register=1005, bit=17)),
|
BatterySignal('/AlarmFlags/FUSE', any, read_bool(base_register=1005, bit=14)),
|
||||||
BatterySignal('/AlarmFlags/CME', return_in_list, read_bool(base_register=1005, bit=18)),
|
BatterySignal('/AlarmFlags/HTRE', any, read_bool(base_register=1005, bit=15)),
|
||||||
BatterySignal('/AlarmFlags/HWFL', return_in_list, read_bool(base_register=1005, bit=19)),
|
BatterySignal('/AlarmFlags/TCPE', any, read_bool(base_register=1005, bit=16)),
|
||||||
BatterySignal('/AlarmFlags/HWEM', return_in_list, read_bool(base_register=1005, bit=20)),
|
BatterySignal('/AlarmFlags/STRE', any, read_bool(base_register=1005, bit=17)),
|
||||||
BatterySignal('/AlarmFlags/ThM', return_in_list, read_bool(base_register=1005, bit=21)),
|
BatterySignal('/AlarmFlags/CME', any, read_bool(base_register=1005, bit=18)),
|
||||||
BatterySignal('/AlarmFlags/vsm2', return_in_list, read_bool(base_register=1005, bit=23)),
|
BatterySignal('/AlarmFlags/HWFL', any, read_bool(base_register=1005, bit=19)),
|
||||||
BatterySignal('/AlarmFlags/vsM2', return_in_list, read_bool(base_register=1005, bit=25)),
|
BatterySignal('/AlarmFlags/HWEM', any, read_bool(base_register=1005, bit=20)),
|
||||||
BatterySignal('/AlarmFlags/iCM2', return_in_list, read_bool(base_register=1005, bit=27)),
|
BatterySignal('/AlarmFlags/ThM', any, read_bool(base_register=1005, bit=21)),
|
||||||
BatterySignal('/AlarmFlags/iDM2', return_in_list, read_bool(base_register=1005, bit=29)),
|
BatterySignal('/AlarmFlags/vsm2', any, read_bool(base_register=1005, bit=23)),
|
||||||
BatterySignal('/AlarmFlags/MID2', return_in_list, read_bool(base_register=1005, bit=31)),
|
BatterySignal('/AlarmFlags/vsM2', any, read_bool(base_register=1005, bit=25)),
|
||||||
BatterySignal('/AlarmFlags/HTFS', return_in_list, read_bool(base_register=1005, bit=42)),
|
BatterySignal('/AlarmFlags/iCM2', any, read_bool(base_register=1005, bit=27)),
|
||||||
BatterySignal('/AlarmFlags/DATA', return_in_list, read_bool(base_register=1005, bit=43)),
|
BatterySignal('/AlarmFlags/iDM2', any, read_bool(base_register=1005, bit=29)),
|
||||||
BatterySignal('/AlarmFlags/LMPA', return_in_list, read_bool(base_register=1005, bit=45)),
|
BatterySignal('/AlarmFlags/MID2', any, read_bool(base_register=1005, bit=31)),
|
||||||
BatterySignal('/AlarmFlags/HEBT', return_in_list, read_bool(base_register=1005, bit=46)),
|
BatterySignal('/AlarmFlags/HTFS', any, read_bool(base_register=1005, bit=42)),
|
||||||
BatterySignal('/AlarmFlags/CURM', return_in_list, read_bool(base_register=1005, bit=48)),
|
BatterySignal('/AlarmFlags/DATA', any, read_bool(base_register=1005, bit=43)),
|
||||||
BatterySignal('/Diagnostics/LedStatus/Red', first, read_led_state(register=1004, led=LedColor.red)),
|
BatterySignal('/AlarmFlags/LMPA', any, read_bool(base_register=1005, bit=45)),
|
||||||
BatterySignal('/Diagnostics/LedStatus/Blue', first, read_led_state(register=1004, led=LedColor.blue)),
|
BatterySignal('/AlarmFlags/HEBT', any, read_bool(base_register=1005, bit=46)),
|
||||||
BatterySignal('/Diagnostics/LedStatus/Green', first, read_led_state(register=1004, led=LedColor.green)),
|
BatterySignal('/AlarmFlags/CURM', any, read_bool(base_register=1005, bit=48)),
|
||||||
BatterySignal('/Diagnostics/LedStatus/Amber', first, read_led_state(register=1004, led=LedColor.amber)),
|
|
||||||
BatterySignal('/Diagnostics/IoStatus/MainSwitchClosed', return_in_list, read_switch_closed),
|
BatterySignal('/LedStatus/Red', max, read_led_state(register=1004, led=LedColor.red)),
|
||||||
BatterySignal('/Diagnostics/IoStatus/AlarmOutActive', return_in_list, read_alarm_out_active),
|
BatterySignal('/LedStatus/Blue', max, read_led_state(register=1004, led=LedColor.blue)),
|
||||||
BatterySignal('/Diagnostics/IoStatus/InternalFanActive', return_in_list, read_bool(base_register=1013, bit=2)),
|
BatterySignal('/LedStatus/Green', max, read_led_state(register=1004, led=LedColor.green)),
|
||||||
BatterySignal('/Diagnostics/IoStatus/VoltMeasurementAllowed', return_in_list, read_bool(base_register=1013, bit=3)),
|
BatterySignal('/LedStatus/Amber', max, read_led_state(register=1004, led=LedColor.amber)),
|
||||||
BatterySignal('/Diagnostics/IoStatus/AuxRelay', return_in_list, read_aux_relay),
|
|
||||||
BatterySignal('/Diagnostics/IoStatus/RemoteState', return_in_list, read_bool(base_register=1013, bit=5)),
|
BatterySignal('/IoStatus/MainSwitchClosed', any, read_switch_closed),
|
||||||
BatterySignal('/Diagnostics/IoStatus/RiscOn', return_in_list, read_bool(base_register=1013, bit=6)),
|
BatterySignal('/IoStatus/AlarmOutActive', any, read_alarm_out_active),
|
||||||
|
BatterySignal('/IoStatus/InternalFanActive', any, read_bool(base_register=1013, bit=2)),
|
||||||
|
BatterySignal('/IoStatus/VoltMeasurementAllowed', any, read_bool(base_register=1013, bit=3)),
|
||||||
|
BatterySignal('/IoStatus/AuxRelay', any, read_aux_relay),
|
||||||
|
BatterySignal('/IoStatus/RemoteState', any, read_bool(base_register=1013, bit=5)),
|
||||||
|
BatterySignal('/IoStatus/RiscOn', any, read_bool(base_register=1013, bit=6)),
|
||||||
BatterySignal('/IoStatus/BatteryCold', any, read_battery_cold),
|
BatterySignal('/IoStatus/BatteryCold', any, read_battery_cold),
|
||||||
|
BatterySignal('/IoStatus/EocReached', any, read_eoc_reached),
|
||||||
|
|
||||||
|
|
||||||
BatterySignal('/Info/MaxDischargeCurrent', sum, max_discharge_current, unit='A'),
|
BatterySignal('/Info/MaxDischargeCurrent', sum, max_discharge_current, unit='A'),
|
||||||
BatterySignal('/Info/MaxChargeCurrent', sum, max_charge_current, unit='A'),
|
BatterySignal('/Info/MaxChargeCurrent', sum, max_charge_current, unit='A'),
|
||||||
BatterySignal('/Info/MaxChargeVoltage', min, lambda bs: bs.battery.v_max, unit='V'),
|
BatterySignal('/Info/MaxChargeVoltage', min, lambda bs: bs.battery.v_max, unit='V'),
|
||||||
BatterySignal('/Info/MinDischargeVoltage', max, lambda bs: bs.battery.v_min, unit='V'),
|
BatterySignal('/Info/MinDischargeVoltage', max, lambda bs: bs.battery.v_min, unit='V'),
|
||||||
BatterySignal('/Info/BatteryLowVoltage', max, lambda bs: bs.battery.v_min - 2, unit='V'),
|
BatterySignal('/Info/BatteryLowVoltage', max, lambda bs: bs.battery.v_min - 2, unit='V'),
|
||||||
BatterySignal('/Info/NumberOfStrings', sum, number_of_active_strings),
|
BatterySignal('/Info/NumberOfStrings', sum, lambda bs: bs.battery.n_strings),
|
||||||
|
|
||||||
BatterySignal('/Info/MaxChargePower', sum, calc_max_charge_power),
|
BatterySignal('/Info/MaxChargePower', sum, calc_max_charge_power),
|
||||||
BatterySignal('/Info/MaxDischargePower', sum, calc_max_discharge_power),
|
BatterySignal('/Info/MaxDischargePower', sum, calc_max_discharge_power),
|
||||||
|
|
||||||
BatterySignal('/FirmwareVersion', comma_separated, lambda bs: bs.battery.firmware_version),
|
BatterySignal('/FirmwareVersion', comma_separated, lambda bs: bs.battery.firmware_version),
|
||||||
BatterySignal('/HardwareVersion', comma_separated, lambda bs: bs.battery.hardware_version),
|
BatterySignal('/HardwareVersion', comma_separated, lambda bs: bs.battery.hardware_version),
|
||||||
BatterySignal('/BmsVersion', comma_separated, lambda bs: bs.battery.bms_version)
|
BatterySignal('/BmsVersion', comma_separated, lambda bs: bs.battery.bms_version)
|
||||||
|
|
Loading…
Reference in New Issue