Commit Graph

13 Commits

Author SHA1 Message Date
Olivier Dony f579acf02f
[FIX] hw_scale: update driver for rs232_devices map and support AdamAZExtra scale
This commit fixes the driver to respect the new device
registration mechanism via hw_proxy.rs232_devices.

It also refactors the code to more easily support multiple
scale protocols, and introduces support for the ADAM Equipment
AZExtra scale protocol. (Might be compatible with other ADAM
Equipment scales)

Support for th AZExtra scale is experimental at the moment,
especially given two annoying problems with this model:
 -  they do not support proper probing (stays mute until a
    non-zero weight is measured), so they have to be probed
    last and *assumed* to work
 -  the scale beeps when a read attempt is made and the
    weight is not stable yet, or the weight has been already
    read previously. This constant beeping during operation
    is mitigated by extra delays between readings, but might
    still prove to be a major issue for supporting this scale.
2016-11-14 17:11:57 +01:00
Joren Van Onder c23eb23267 [FIX] hw_scale: use a larger timeout during initial probe
I'm not sure why the serial timeout is so aggressive, but I assume there
is a reason for it. During probing however, we shouldn't use such an
aggressive timeout because if we miss the device during initial startup
we'll never find it since we only probe devices once.
2016-03-02 16:48:41 +01:00
Joren Van Onder 290eb4ea2e [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.
2016-03-02 13:51:40 +01:00
Joren Van Onder acf027ac98 [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.
2016-03-02 13:51:40 +01:00
Joren Van Onder 59b5f136bf [IMP] point_of_sale: add patches from `posbox` branch
This commit contains the patches from the now obsolete 'posbox'
branch. These patches were written by Martin Donies (@mdo-odoo) and
Frédéric Van der Essen (@fvdsn).
2015-08-11 15:13:17 +02:00
Olivier Dony 5b19ae8a59 [FIX] hw_*: enforce Python dependencies + disable if missing dependency
Prevents installing the hw_* modules at all when the python
dependencies are missing. If they were already installed
do not start the hardware threads to avoid wasting resources
and logging errors
2015-05-08 12:49:19 +02:00
Fabien Pinckaers 8aca457e34 [IMP] Updated website urls on modules and info page 2014-08-26 21:40:18 +02:00
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +02:00
Frédéric van der Essen a57f44393d [FIX] hw_scale: don't crash if the serial connection gets broken
bzr revid: fva@openerp.com-20140428095246-w6pyo8y7rrhsvsjl
2014-04-28 11:52:46 +02:00
Frédéric van der Essen c0d62797c9 [FIX] hw_scale: remove useless driver test script
bzr revid: fva@openerp.com-20140425124005-pugnyq6gsl0gw8yx
2014-04-25 14:40:05 +02:00
Frédéric van der Essen 24852d7ec9 [FIX] hw_scale: remove useless python module
bzr revid: fva@openerp.com-20140425123246-lexb4viqi6k7zwgq
2014-04-25 14:32:46 +02:00
Frédéric van der Essen 3f0a8e8931 [IMP] point_of_sale, hw_scale: various small fixes and improvements for the scale module
bzr revid: fva@openerp.com-20140425122220-q7rw1dve8bgs25as
2014-04-25 14:22:20 +02:00
Frédéric van der Essen f3da22c067 [IMP] point_of_sale, hw_scale: first commit for the hw_scale module, which handles scale connections for the POS
bzr revid: fva@openerp.com-20140424171259-hi9ma6w0fkdfrqnv
2014-04-24 19:12:59 +02:00