Skip to content

Commit

Permalink
e0 export #458
Browse files Browse the repository at this point in the history
  • Loading branch information
io53 committed Dec 4, 2024
1 parent 0f0a5a8 commit 390400b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/utils/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ import { getTimestamp } from "../TimeHelper";

function processData(data, t) {
const sensorHeaders = ["temperature", "humidity", "pressure", "rssi", "accelerationX", "accelerationY", "accelerationZ", "battery", "movementCounter", "measurementSequenceNumber", "txPower"]
if (data.measurements.length > 0 && data.measurements[0].parsed !== null) {
if (data.measurements[0].parsed.dataFormat === "e0") {
sensorHeaders.push("co2", "voc", "nox", "pm1p0", "pm2p5", "pm4p0", "pm10p0", "illuminance", "soundLevelAvg", "soundLevelPeak")
}
}
var csvHeader = [t('date')];
let uHelp = {};
sensorHeaders.forEach(x => {
Expand Down

0 comments on commit 390400b

Please sign in to comment.