summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework/session_instance.js
diff options
context:
space:
mode:
authorJoren Van Onder <jov@odoo.com>2016-03-02 09:31:57 +0100
committerJoren Van Onder <jov@odoo.com>2016-03-02 13:51:40 +0100
commitacf027ac98cd775e533cc0a0eb208754ba900576 (patch)
tree4b5ea77a5bf9c43579bc0218e1726619e83d1b9d /addons/web/static/src/js/framework/session_instance.js
parentb3a3454a2ffab9042c021204d284ac25c5f56aef (diff)
[IMP] hw_scale: allow third party USB to serial interfaces
We support the Mettler Toledo scales which have their own built-in USB to serial interface. Due to continuing issues with that built-in interface we will also support the scale configured in raw RS-232 mode which seems to be more reliable. This means that in order to connect the scale you'll need a third party USB to serial interface (unless you have built-in serial interfaces, but the POSBox doesn't). The main difficulty this poses is that using this approach we cannot use the name of the interface to find the device. When using the built-in interface of the scale the interface would identify with an ID containing 'mettler' and 'toledo'. When using a third party interface the ID will instead contain information about the third party interface. To fix this we use a probe-based approach, probing every available serial interface until we find one that returns a response to our probe. This approach will work with both third party interfaces and the built-in interface of the scale. Contrary to probe-based approach used in hw_blackbox_be this one is slightly more complicated because hw_scale is written in such a way that it is 'plug and play', which means that as long as the module is running it will continually try to find a scale. This is fine, but we don't want to keep sending probes to eg. Fiscal Data Modules, which could lead to issues. Therefore we will only probe every device once. When we lose an existing, confirmed connection to a scale we will however keep retrying to connect to that particular device.
Diffstat (limited to 'addons/web/static/src/js/framework/session_instance.js')
0 files changed, 0 insertions, 0 deletions