Skip to content

Commit

Permalink
Demo: More precision for AGC cycle time display
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfranzl committed Sep 12, 2021
1 parent fe0497b commit 79dc8c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/demo.js
Expand Up @@ -142,9 +142,9 @@ export default class Demo {
this.#clockDivisorElement.addEventListener('change', () => {
const divisor = this.#getClockDivisor();
this.agc.oscillate(divisor);
const cycleTimeUs = 11.72;
const cycleTimeMs = 1 / (2048000 / 2 / 12); // 1.171875e-05 seconds
document.getElementById('clock_speed')
.innerHTML = `${(1 / cycleTimeUs * 1000000 / divisor).toFixed(1)} Hz`;
.innerHTML = `${(1 / cycleTimeMs / divisor).toFixed(2)} Hz`;
});
}

Expand Down

0 comments on commit 79dc8c8

Please sign in to comment.