busroot-sdk 0.0.8-dev.2787657302 → 0.0.8-dev.2790907087

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.
Files changed (2) hide show
  1. package/build/index.js +7 -2
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -9387,6 +9387,7 @@ var require_station_windows = __commonJS({
9387
9387
  var configVars_1 = require_configVars();
9388
9388
  var oee_1 = require_oee2();
9389
9389
  var WINDOW_DURATION = 6e4;
9390
+ var IDEAL_COUNT_EMIT_PRECISION = 6;
9390
9391
  var MAX_WINDOWS_PER_DOWNTIME = 1440;
9391
9392
  function generateMockStationWindows(offset, extraFields) {
9392
9393
  const startMoment = (0, moment_timezone_1.default)("2020-01-01T00:00:00.000Z");
@@ -9642,8 +9643,12 @@ var require_station_windows = __commonJS({
9642
9643
  lostProductionCostSpeed: window2.lostProductionCostSpeed,
9643
9644
  lostProductionCostQuality: window2.lostProductionCostQuality,
9644
9645
  lostProductionCostTotal: window2.lostProductionCostTotal,
9645
- productionIdealCount: (0, _1.roundTo)(window2.productionIdealCount, 2),
9646
- productionTargetCount: (0, _1.roundTo)(window2.productionTargetCount, 2),
9646
+ // Emitted at IDEAL_COUNT_EMIT_PRECISION rather than 2dp: a 1-minute request reaches here as a batch of
9647
+ // one, so rounding here truncates the stored per-minute value itself. The error does not cancel across
9648
+ // minutes (the cycle time is constant), so summing the emitted values drifted from the analytic total by
9649
+ // ~1.8 units per station per 8h shift at a 3.7s cycle time. Round for display in the UI/CSV layer instead.
9650
+ productionIdealCount: (0, _1.roundTo)(window2.productionIdealCount, IDEAL_COUNT_EMIT_PRECISION),
9651
+ productionTargetCount: (0, _1.roundTo)(window2.productionTargetCount, IDEAL_COUNT_EMIT_PRECISION),
9647
9652
  performanceModeFrom: window2.performanceModeFrom,
9648
9653
  performanceModeType: window2.performanceModeType,
9649
9654
  operatorInitials: window2.operatorInitials
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "busroot-sdk",
3
- "version": "0.0.8-dev.2787657302",
3
+ "version": "0.0.8-dev.2790907087",
4
4
  "description": "An SDK for accessing Busroot from output.industries",
5
5
  "homepage": "https://www.output.industries",
6
6
  "main": "./build/index.js",