diff --git a/ch32v/lib/calculator.css b/ch32v/lib/calculator.css
index c0f1c86..6a937b8 100644
--- a/ch32v/lib/calculator.css
+++ b/ch32v/lib/calculator.css
@@ -173,7 +173,6 @@ input[type=number] {
}
}
-
textarea,input:not([type='number']) {
background: var(--bg-0);
border: 0;
diff --git a/ch32v/lib/calculator.html b/ch32v/lib/calculator.html
index c9d5df6..002106c 100644
--- a/ch32v/lib/calculator.html
+++ b/ch32v/lib/calculator.html
@@ -366,7 +366,7 @@ function computeTable()
contents += "
" + h + " | ";
}
- for( let n = 0|28; n <= 96; n+=2 )
+ for( let n = 0|42; n <= 96; n+=2 )
{
let freq = ( xtal / n );
let goertzelpoint = 0;
diff --git a/ch32v/lib/webhidcontrol.js b/ch32v/lib/webhidcontrol.js
index 360d3a8..59c9d43 100644
--- a/ch32v/lib/webhidcontrol.js
+++ b/ch32v/lib/webhidcontrol.js
@@ -11,7 +11,7 @@ var lastIntensity = 1.0;
var lastNumQ = 0;
var lastTotalTime = 1;
var lastTimeUsed = 1;
-
+var didSetupGeneralData = false;
var graphIsClicked = false;
function graphClick( e )
@@ -337,6 +337,11 @@ function ComputeRemoteClock( remote_time_ticks, now_ms )
remote_clock_last_timems = now_ms;
}
+function updateCrystalWithMHz()
+{
+ document.getElementById('crystalmhz').value = remote_clock_mhz/1000000.0;
+}
+
async function sendLoop()
{
const sleep = ms => new Promise(r => setTimeout(r, ms));
@@ -369,13 +374,28 @@ async function sendLoop()
document.getElementById( "StatusPerf" ).innerHTML =
(kBsecAvg).toFixed(2) + " kB/s
" +
(xActionSecAvg).toFixed(2) + "x/s
";
- document.getElementById( "GeneralData" ).innerHTML =
- "";
+
+ if( !didSetupGeneralData )
+ {
+ document.getElementById( "GeneralData" ).innerHTML =
+ "";
+ didSetupGeneralData = true;
+ }
+ else
+ {
+
+ document.getElementById( "gdCount" ).innerHTML = "Count: " + goodCount + " / " + badCount;
+ document.getElementById( "gdInten" ).innerHTML = "Inten: " + ((Math.log( lastIntensity * lastIntensity )/Math.log(10)) * 10-120).toFixed(2) + "db (" + lastIntensity + ")";
+ document.getElementById( "gdADCs" ).innerHTML = "ADC:" + (lastadc>>16).toFixed(0) + " / " + (lastadc&0xffff).toFixed(0);
+ document.getElementById( "gdButton" ).value = "" + (remote_clock_mhz/1000000.0).toFixed(6);
+ document.getElementById( "gdPPM" ).innerHTML = "" + ((remote_clock_mhz-288000000)/288).toFixed(3) + " PPM";
+ didSetupGeneralData = true;
+ }
lastTime = thisTime;
}