Esempio n. 1
0
 def send(self, ser: BluetoothSerial) -> None:
     dlen = len(self._data)
     ser.write_command(SET_EXG_REGS_COMMAND, 'BBB', self._chip,
                       self._offset, dlen)
     ser.write(self._data)
Esempio n. 2
0
 def send(self, ser: BluetoothSerial) -> None:
     ser.write_command(self._req_code)
Esempio n. 3
0
 def send(self, ser: BluetoothSerial) -> None:
     ser.write_command(INQUIRY_COMMAND)
Esempio n. 4
0
 def send(self, ser: BluetoothSerial) -> None:
     ser.write_command(GET_EXG_REGS_COMMAND, 'BBB', self._chip,
                       self._offset, self._rlen)
Esempio n. 5
0
 def send(self, ser: BluetoothSerial) -> None:
     ser.write_command(GET_STATUS_COMMAND)
Esempio n. 6
0
 def send(self, ser: BluetoothSerial) -> None:
     ser.write_command(GET_FW_VERSION_COMMAND)
Esempio n. 7
0
 def send(self, ser: BluetoothSerial) -> None:
     t_ticks = sec2ticks(self._time)
     ser.write_command(SET_RWC_COMMAND, '<Q', t_ticks)
Esempio n. 8
0
    def send(self, ser: BluetoothSerial) -> None:
        time_str = '{:d}'.format(int(self._time))
        time_bin = time_str.encode('ascii')

        ser.write_command(SET_CONFIGTIME_COMMAND, "varlen", time_bin)
Esempio n. 9
0
 def send(self, ser: BluetoothSerial) -> None:
     ser.write_command(GET_CONFIGTIME_COMMAND)
Esempio n. 10
0
 def send(self, ser: BluetoothSerial) -> None:
     ser.write_command(GET_SAMPLING_RATE_COMMAND)
Esempio n. 11
0
 def send(self, ser: BluetoothSerial) -> None:
     str_bin = self._str_data.encode(self._encoding)
     ser.write_command(self._req_code, 'varlen', str_bin)