def capture_and_file_serial_data(self, capture_file_name):
    a = 0
    with open(capture_file_name, 'wb+') as f:
        while (a <= 1000):
            self.controller_msg = self.aircon_comms.read(8)
            f.write(self.controller_msg)
            print((str(a) + str(self.controller_msg)))
            a = (a + 1)
def capture_and_file_serial_data(self, capture_file_name):
    a = 0
    with open(capture_file_name, 'wb+') as f:
        while (a <= 1000):
            self.controller_msg = self.aircon_comms.read(8)
            f.write(self.controller_msg)
            print((str(a) + str(self.controller_msg)))
            a = (a + 1)