Skip to content

Commit

Permalink
added new "dashboard" dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
GrandpaBond committed Aug 10, 2024
1 parent c71ff94 commit 26cc958
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 28 deletions.
8 changes: 4 additions & 4 deletions pxt-heading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,19 +457,20 @@ namespace heading {
if (dw > 0) { // just surfacing above our plane so add-in current vector coordinates
this.uHi += u
this.vHi += v
if (this.newTurn) { // clock this major-axis crossing
if (this.newTurn) { // clock a rotation each time we cross this end
if (this.start == 0) {
this.start = scanTimes[i] // start measuring turns
}
this.finish = scanTimes[i]
this.turns++
this.newTurn = false // prevent future clocking of another major-axis crossing...
//... until after the next minor axis crossing
// ignore "bounces" at this end; wait until the other end has been crossed
this.newTurn = false
}
} else { // just dipping below our plane so subtract current vector coordinates
// (as it's the other end of the major-axis)
this.uHi -= u
this.vHi -= v
this.newTurn = true // permit clocking for the next rotation
}
this.nHi++
}
Expand All @@ -486,7 +487,6 @@ namespace heading {
this.vLo -= v
}
this.nLo++
this.newTurn = true // permit future clocking of a major-axis crossing
}


Expand Down
2 changes: 1 addition & 1 deletion pxt.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test.ts"
],
"targetVersions": {
"target": "7.0.16",
"target": "7.0.17",
"targetId": "microbit"
},
"supportedTargets": [
Expand Down
Loading

0 comments on commit 26cc958

Please sign in to comment.