Skip to content

Commit

Permalink
Merge pull request #386 from NordicSemiconductor/fix/window-avg-uint-…
Browse files Browse the repository at this point in the history
…when-zoomed-out

Fix: avg unit when zoomed out
  • Loading branch information
kylebonnici authored Jan 5, 2024
2 parents 55f759a + 3e605ea commit baadcc9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 4.0.0-beta5 - 2024-01-05

## Fixed

- Window average was off by a factor of 1000 when zoomed out
- Duplicate Azure insights event

## 4.0.0-beta4 - 2024-01-04

## Fixed
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pc-nrfconnect-ppk",
"version": "4.0.0-beta4",
"version": "4.0.0-beta5",
"displayName": "Power Profiler",
"description": "App for use with Nordic Power Profiler Kits",
"homepage": "https://github.com/NordicSemiconductor/pc-nrfconnect-ppk",
Expand Down Expand Up @@ -47,7 +47,7 @@
"nordic-publish": "node ./dist/nordic-publish.js"
},
"devDependencies": {
"@nordicsemiconductor/pc-nrfconnect-shared": "^142.0.0",
"@nordicsemiconductor/pc-nrfconnect-shared": "^145.0.0",
"@types/redux-mock-store": "^1.0.3",
"bson": "4.6.5",
"chart.js": "^4.3.3",
Expand Down
5 changes: 3 additions & 2 deletions src/components/Chart/data/dataAccumulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ const accumulate = (
}

if (!Number.isNaN(v)) {
if (v * 1000 > max) max = v * 1000; // uA to nA
if (v * 1000 < min) min = v * 1000; // uA to nA
v *= 1000; // uA to nA
if (v > max) max = v;
if (v < min) min = v;

if (data.bits && index < data.bits.length) {
bitAccumulator?.processBits(data.bits[index]);
Expand Down

0 comments on commit baadcc9

Please sign in to comment.