<commit_before>import serial

kAcknowledge = 0
kError = 1
kFullStatus = 2
kTemperature = 3
kPumpStatus = 4
kHeaterStatus = 5
kDutyCycleStatus = 6
kPIDStatus = 7
kSetpointStatus = 8
kPValueStatus = 9
kIValueStatus = 10
kPID = 11
kDutyCycl = 12
kPump = 13
kSetpoint = 14
kPValue = 15
kIValue = 16


class UnoMashtun(object):
    '''
    Class representing mashtun run by Arduino Uno

    To be used together with the uno_mashtun.ino sketch
    '''

    baudrate = 115200

    def __init__(self, port):
        self.serial = self._open_port(port)

    @property
    def temperature(self):
        self._request_value(kTemperature)
        self._echo_readline()

    @property
    def pump(self):
        self._request_value(kPumpStatus)
        self._echo_readline()

    @pump.setter
    def pump(self, value):
        self._send_bool(kPump, value)

    @property
    def heater(self):
        self._request_value(kHeaterStatus)
        self._echo_readline()

    @property
    def dutycycle(self):
        self._request_value(kDutyCycleStatus)
        self._echo_readline()

    @dutycycle.setter
    def dutycycle(self, value):
        self._send_value(kSetpoint, value)

    @property
    def pid(self):
        self._request_value(kPIDStatus)
        self._echo_readline()

    @pid.setter
    def pid(self, value):
        self._send_bool(kPID, value)

    @property
    def setpoint(self):
        self._request_value(kSetpointStatus)
        self._echo_readline()

    @setpoint.setter
    def setpoint(self, value):
        self._send_value(kSetpoint, value)

    @property
    def p_value(self):<commit_msg>Fixed kDutyCycle handling<commit_after>import serial

kAcknowledge = 0
kError = 1
kFullStatus = 2
kTemperature = 3
kPumpStatus = 4
kHeaterStatus = 5
kDutyCycleStatus = 6
kPIDStatus = 7
kSetpointStatus = 8
kPValueStatus = 9
kIValueStatus = 10
kPID = 11
kDutyCycle = 12
kPump = 13
kSetpoint = 14
kPValue = 15
kIValue = 16


class UnoMashtun(object):
    '''
    Class representing mashtun run by Arduino Uno

    To be used together with the uno_mashtun.ino sketch
    '''

    baudrate = 115200

    def __init__(self, port):
        self.serial = self._open_port(port)

    @property
    def temperature(self):
        self._request_value(kTemperature)
        self._echo_readline()

    @property
    def pump(self):
        self._request_value(kPumpStatus)
        self._echo_readline()

    @pump.setter
    def pump(self, value):
        self._send_bool(kPump, value)

    @property
    def heater(self):
        self._request_value(kHeaterStatus)
        self._echo_readline()

    @property
    def dutycycle(self):
        self._request_value(kDutyCycleStatus)
        self._echo_readline()

    @dutycycle.setter
    def dutycycle(self, value):
        self._send_value(kDutyCycle, value)

    @property
    def pid(self):
        self._request_value(kPIDStatus)
        self._echo_readline()

    @pid.setter
    def pid(self, value):
        self._send_bool(kPID, value)

    @property
    def setpoint(self):
        self._request_value(kSetpointStatus)
        self._echo_readline()

    @setpoint.setter
    def setpoint(self, value):
        self._send_value(kSetpoint, value)

    @property
    def p_value(self):
{'fraction_non_alphanumeric': 0.08883405305367058, 'fraction_numerical': 0.01850709438618137, 'mean_word_length': 2.801875732708089, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1963233', 'n_tokens_mistral': 1187, 'n_tokens_neox': 1081, 'n_words': 235}