[FIX] hw_blackbox_be, hw_scale: don't rely on serial ID to be unique

After plugging in multiple identical serial to USB interfaces, only the
last one will be available under /dev/serial/by-id/ because they'll have
identical IDs. Instead use /dev/serial/by-path/ which does not have this
issue.
This commit is contained in:
Joren Van Onder 2016-03-02 09:51:04 +01:00
parent acf027ac98
commit 290eb4ea2e
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ class Blackbox(Thread):
# request. The first device to give an answer that makes sense
# wins.
def _find_device_path_by_probing(self):
path = "/dev/serial/by-id/"
path = "/dev/serial/by-path/"
probe_message = self._wrap_low_level_message_around("S000")
try:

View File

@ -29,7 +29,7 @@ class Scale(Thread):
self.lock = Lock()
self.scalelock = Lock()
self.status = {'status':'connecting', 'messages':[]}
self.input_dir = '/dev/serial/by-id/'
self.input_dir = '/dev/serial/by-path/'
self.weight = 0
self.weight_info = 'ok'
self.device = None