def update(self):
    try:
        battInfo = self.read_registers(5042, 7)
        self.amps = ((battInfo[0] / 100) if (battInfo[0] < 61440) else ((battInfo[0] - 65535) / 100))
        self.unitVolts = (battInfo[1] / 10)
        self.capacity = (((battInfo[2] << 15) | (battInfo[3] >> 1)) * 0.002)
        self.Maxcapacity = (((battInfo[4] << 15) | (battInfo[5] >> 1)) * 0.002)
        self.cycles = battInfo[6]
    except Exception as e:
        print(('Error getting Unit info' + e))
    try:
        heaterInfo = self.read_register(5013)
        self.heater = ((heaterInfo / 255) * 100)
    except Exception as e:
        print(('Error getting heater info' + e))
    try:
        self.cellTemp = self.read_registers(5018, self.numCells)
        self.cellVolts = self.read_registers(5001, self.numCells)
    except Exception as e:
        print('Error getting individual cell info')
def update(self):
    try:
        battInfo = self.read_registers(5042, 7)
        self.amps = ((battInfo[0] / 100) if (battInfo[0] < 61440) else ((battInfo[0] - 65535) / 100))
        self.unitVolts = (battInfo[1] / 10)
        self.capacity = (((battInfo[2] << 15) | (battInfo[3] >> 1)) * 0.002)
        self.Maxcapacity = (((battInfo[4] << 15) | (battInfo[5] >> 1)) * 0.002)
        self.cycles = battInfo[6]
    except Exception as e:
        print(('Error getting Unit info' + e))
    try:
        heaterInfo = self.read_register(5013)
        self.heater = ((heaterInfo / 255) * 100)
    except Exception as e:
        print(('Error getting heater info' + e))
    try:
        self.cellTemp = self.read_registers(5018, self.numCells)
        self.cellVolts = self.read_registers(5001, self.numCells)
    except Exception as e:
        print('Error getting individual cell info')