Update sensorsUtil.js

Json NaN values replace to zero
This commit is contained in:
Edgar Lopez
2025-06-25 08:17:05 -07:00
committed by GitHub
parent f7116b70ba
commit 29af05eb53

View File

@@ -24,6 +24,7 @@ export default class SensorsUtil extends CommandLineUtil {
let lineRemoved = this._output.filter(l => l.trim() !== ',').join('\n');
let errorRemoved = lineRemoved.replace(/ERROR.*Can't read/, "");
errorRemoved = errorRemoved.replace(/ERROR.*I\/O error/, "");
errorRemoved = errorRemoved.replace(/NaN/, "0");
data = JSON.parse(errorRemoved);
} catch (e) {
logError(e);