incyclist-devices 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,6 +25,7 @@ const DAUM_PREMIUM_DEFAULT_PORT = 51955;
25
25
  const START_RETRY_TIMEOUT = 1500;
26
26
  const DEFAULT_GEAR = 10;
27
27
  const getBikeProps = (props) => {
28
+ console.log('~~~getBikeProps', props);
28
29
  const { host, port = DAUM_PREMIUM_DEFAULT_PORT, interface: ifaceName } = props;
29
30
  let serial;
30
31
  if (ifaceName && typeof ifaceName === 'string') {
@@ -46,6 +47,7 @@ const getBikeProps = (props) => {
46
47
  };
47
48
  class DaumPremiumAdapter extends DaumAdapter_1.default {
48
49
  constructor(settings, props) {
50
+ console.log('~~~ new premium adapter');
49
51
  const logger = new gd_eventlog_1.EventLogger('DaumPremium');
50
52
  const commProps = Object.assign(Object.assign({}, getBikeProps(settings)), { logger });
51
53
  const bike = new comms_1.default(commProps);
@@ -85,11 +85,13 @@ exports.SinglePathScanner = SinglePathScanner;
85
85
  class SerialInterface extends events_1.default {
86
86
  static getInstance(props) {
87
87
  const { ifaceName, binding, logger } = props;
88
+ console.log('~~~ new instance #1', ifaceName, serialport_1.default.getInstance().getBinding(ifaceName));
88
89
  let instance = SerialInterface._instances.find(i => i.ifaceName === ifaceName);
89
90
  if (!instance) {
90
91
  if (binding)
91
92
  instance = new SerialInterface(props);
92
93
  else {
94
+ console.log('~~~ new instance', ifaceName, serialport_1.default.getInstance().getBinding(ifaceName));
93
95
  instance = new SerialInterface({ ifaceName, binding: serialport_1.default.getInstance().getBinding(ifaceName), logger });
94
96
  if (instance)
95
97
  SerialInterface._instances.push(instance);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "incyclist-devices",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "dependencies": {
5
5
  "@serialport/bindings-interface": "^1.2.2",
6
6
  "@serialport/parser-byte-length": "^9.0.1",