Browse Source

Fixed string encoding used with send.

pyserial_fix
Scott Petersen 10 years ago
parent
commit
d8958eaad9
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      alarmdecoder/decoder.py

+ 2
- 2
alarmdecoder/decoder.py View File

@@ -213,13 +213,13 @@ class AlarmDecoder(object):
""" """


if self._device: if self._device:
self._device.write(data)
self._device.write(str.encode(data))


def get_config(self): def get_config(self):
""" """
Retrieves the configuration from the device. Called automatically by :py:meth:`_on_open`. Retrieves the configuration from the device. Called automatically by :py:meth:`_on_open`.
""" """
self.send(b"C\r")
self.send("C\r")


def save_config(self): def save_config(self):
""" """


Loading…
Cancel
Save