@robotical/webapp-types 3.11.3 → 3.11.4

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.
@@ -8,7 +8,7 @@ interface CogState {
8
8
  movementType: "none" | "shake" | "move";
9
9
  rotation: "none" | "clockwise" | "counterClockwise";
10
10
  buttonClick: "none" | "click" | "release";
11
- objectSense: "none" | "left" | "right";
11
+ objectSense: "none" | "left" | "right" | "both";
12
12
  lightSense: "none" | "high" | "mid" | "low";
13
13
  }
14
14
  declare class PublishedDataAnalyser extends EventEmitter {
@@ -92,6 +92,7 @@ var PublishedDataAnalyser = /** @class */ (function (_super) {
92
92
  objectSense: {
93
93
  left: "objectSenseLeft",
94
94
  right: "objectSenseRight",
95
+ both: "objectSenseBoth",
95
96
  none: "noObjectSense"
96
97
  },
97
98
  lightSense: {
@@ -463,10 +464,15 @@ var ObjectSenseDetection = /** @class */ (function () {
463
464
  this.objectSensed2Threshold = 1500; // button
464
465
  }
465
466
  ObjectSenseDetection.prototype.detectObjectSense = function (objectSenseValue, analyser) {
466
- if (objectSenseValue[0] > this.objectSensed0Threshold) {
467
+ var left = objectSenseValue[0] > this.objectSensed0Threshold;
468
+ var right = objectSenseValue[1] > this.objectSensed1Threshold;
469
+ if (left && right) {
470
+ analyser.setObjectSense("both");
471
+ }
472
+ else if (left) {
467
473
  analyser.setObjectSense("left");
468
474
  }
469
- else if (objectSenseValue[1] > this.objectSensed1Threshold) {
475
+ else if (right) {
470
476
  analyser.setObjectSense("right");
471
477
  }
472
478
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robotical/webapp-types",
3
- "version": "3.11.3",
3
+ "version": "3.11.4",
4
4
  "description": "Type definitions for the Application Manager",
5
5
  "main": "dist/application-manager.d.ts",
6
6
  "types": "dist/application-manager.d.ts",