Fix ESLint errors, bugs, and add gravity export
- Fix missing return in childRegistrationUtils.registerChild() - Fix assertionUtils: assertNoNaN uses this.assertNoNaN - Fix logger: nameModule uses this.nameModule - Fix assetUtils: convert ESM to CommonJS - Fix childRegistrationUtils_DEPRECATED: desc -> softwareType - Add gravity export to index.js for rotatingMachine - Fix ESLint errors across 18 files (no-undef, no-case-declarations, no-mixed-spaces-and-tabs, parsing errors) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -95,7 +95,7 @@ class MeasurementContainer {
|
||||
}
|
||||
|
||||
|
||||
this._currentPosition = positionValue.toString().toLowerCase();;
|
||||
this._currentPosition = positionValue.toString().toLowerCase();
|
||||
|
||||
return this;
|
||||
}
|
||||
@@ -328,7 +328,7 @@ class MeasurementContainer {
|
||||
getLaggedSample(lag = 1,requestedUnit = null ){
|
||||
const measurement = this.get();
|
||||
if (!measurement) return null;
|
||||
|
||||
|
||||
let sample = measurement.getLaggedSample(lag);
|
||||
if (sample === null) return null;
|
||||
|
||||
@@ -340,7 +340,7 @@ class MeasurementContainer {
|
||||
// Convert if needed
|
||||
if (measurement.unit && requestedUnit !== measurement.unit) {
|
||||
try {
|
||||
const convertedValue = convertModule(value).from(measurement.unit).to(requestedUnit);
|
||||
const convertedValue = convertModule(sample.value).from(measurement.unit).to(requestedUnit);
|
||||
//replace old value in sample and return obj
|
||||
sample.value = convertedValue ;
|
||||
sample.unit = requestedUnit;
|
||||
|
||||
Reference in New Issue
Block a user