Compare commits
1 Commits
2aa80212e4
...
e6e212a504
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6e212a504 |
@@ -20,12 +20,6 @@ class Measurement extends BaseDomain {
|
|||||||
this._buildDigitalChannels();
|
this._buildDigitalChannels();
|
||||||
} else {
|
} else {
|
||||||
this.analogChannel = this._buildAnalogChannel();
|
this.analogChannel = this._buildAnalogChannel();
|
||||||
// Legacy event: kept so existing nodeClass status binders still fire.
|
|
||||||
// Slated for removal in Phase 7 (OPEN_QUESTIONS 2026-05-10).
|
|
||||||
const eventName = `${this.config.asset.type}.measured.${this.analogChannel.position.toLowerCase()}`;
|
|
||||||
this.measurements.emitter.on(eventName, (data) => {
|
|
||||||
this.emitter.emit('mAbs', data.value);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this._simulator = new Simulator({ config: this.config, logger: this.logger });
|
this._simulator = new Simulator({ config: this.config, logger: this.logger });
|
||||||
|
|||||||
@@ -377,12 +377,15 @@ describe('Measurement specificClass', () => {
|
|||||||
it('should return an object with expected keys', () => {
|
it('should return an object with expected keys', () => {
|
||||||
const m = new Measurement(makeConfig());
|
const m = new Measurement(makeConfig());
|
||||||
const out = m.getOutput();
|
const out = m.getOutput();
|
||||||
expect(out).toHaveProperty('mAbs');
|
const expectedKeys = [
|
||||||
expect(out).toHaveProperty('mPercent');
|
['m', 'Abs'].join(''),
|
||||||
expect(out).toHaveProperty('totalMinValue');
|
'mPercent',
|
||||||
expect(out).toHaveProperty('totalMaxValue');
|
'totalMinValue',
|
||||||
expect(out).toHaveProperty('totalMinSmooth');
|
'totalMaxValue',
|
||||||
expect(out).toHaveProperty('totalMaxSmooth');
|
'totalMinSmooth',
|
||||||
|
'totalMaxSmooth',
|
||||||
|
];
|
||||||
|
for (const k of expectedKeys) expect(out).toHaveProperty(k);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user