Skip to content

Commit

Permalink
Added build section to matrix and telemetry info
Browse files Browse the repository at this point in the history
  • Loading branch information
foorschtbar committed Oct 13, 2023
1 parent f4a7df0 commit 92f8002
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 26 deletions.
7 changes: 5 additions & 2 deletions public/demoData/demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,12 @@
"uuid": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"version": "1.3.3.7",
"type": "esp8266",
"buildsection": "ESP8266_generic",
"matrix": {
"type": 4,
"name": "Demo Matrix"
"type": 1,
"name": "Colum major",
"width": 32,
"height": 8
},
"sensors": [
"LDR"
Expand Down
43 changes: 25 additions & 18 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,28 +525,32 @@ function addToLogData(obj, state) {

function addToSensorData(obj, state) {
for (const key in obj) {
const oldEntry = state.sensorData.find((x) => x.name == getDisplayName(key));
if (oldEntry) {
oldEntry.value = getDisplayValue(key, obj[key]);
} else {
state.sensorData.push({
name: getDisplayName(key),
value: getDisplayValue(key, obj[key]),
});
if (key != 'hostname') {
const oldEntry = state.sensorData.find((x) => x.name == getDisplayName(key));
if (oldEntry) {
oldEntry.value = getDisplayValue(key, obj[key]);
} else {
state.sensorData.push({
name: getDisplayName(key),
value: getDisplayValue(key, obj[key]),
});
}
}
}
}

function addToButtonData(obj, state) {
for (const key in obj) {
const oldEntry = state.buttonData.find((x) => x.name == getDisplayName(key));
if (oldEntry) {
oldEntry.value = getDisplayValue(key, obj[key]);
} else {
state.buttonData.push({
name: getDisplayName(key),
value: getDisplayValue(key, obj[key]),
});
if (key != 'hostname') {
const oldEntry = state.buttonData.find((x) => x.name == getDisplayName(key));
if (oldEntry) {
oldEntry.value = getDisplayValue(key, obj[key]);
} else {
state.buttonData.push({
name: getDisplayName(key),
value: getDisplayValue(key, obj[key]),
});
}
}
}
}
Expand Down Expand Up @@ -604,7 +608,7 @@ function getDisplayName(key) {
key = 'Pressure';
break;
case 'pixelitVersion':
key = 'PixelIt version';
key = 'PixelIt Version';
break;
case 'hostname':
key = 'Hostname';
Expand All @@ -616,7 +620,7 @@ function getDisplayName(key) {
key = 'Sketch size';
break;
case 'freeSketchSpace':
key = 'Free sketch space';
key = 'Free Sketch Space';
break;
case 'wifiRSSI':
key = 'Wifi RSSI';
Expand Down Expand Up @@ -669,6 +673,9 @@ function getDisplayName(key) {
case 'battery':
key = 'Battery';
break;
case 'buildSection':
key = 'Build Section';
break;
}
return key;
}
Expand Down
22 changes: 16 additions & 6 deletions src/views/Options.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,17 @@
<v-card-text>
<h3>Why?</h3>
<br />
Why we want to collect telemetry data and what data:<br /><br />
The telemetry data helps us to understand which hardware is used for the PixelIt and also which software versions of the PixelIt are on the road.<br />
Also it is a motivator for us developers to see the spread so that we can continue to have fun developing :)<br /><br />
The data is sent anonymously and includes the following data:<br />
<li>UUID is a generated hash from the ESP hardware</li>
<li>Version from the PixelIt</li>
<li>Matrix type</li>
<li>Sensors used</li>
<li>Country (via GeoIP service)</li>
<ul>
<li>UUID is a generated hash from the ESP hardware</li>
<li>Version from the PixelIt</li>
<li>Build section name</li>
<li>Matrix type and size</li>
<li>Sensors used (types)</li>
<li>Country (via GeoIP service, but <u>NO</u> IP address)</li>
</ul>
<br />
That was it :)
</v-card-text>
Expand Down Expand Up @@ -242,3 +244,11 @@ export default {
},
};
</script>
<style>
ul {
margin-top: 10px;
}
li {
margin-left: 20px;
}
</style>

0 comments on commit 92f8002

Please sign in to comment.