|
|
@ -59,8 +59,8 @@ const char html_begin[] PROGMEM = R"( |
|
|
|
var context = c.getContext("2d"); |
|
|
|
var maxX = 400, maxY = 200; |
|
|
|
var biasX = 20, biasY = 20; |
|
|
|
var curVoltage = 20; |
|
|
|
var freq = 16; |
|
|
|
var maxVoltage = 20; |
|
|
|
var freq = 4/4; |
|
|
|
function iY(y) { |
|
|
|
return maxY + biasY - y; |
|
|
|
} |
|
|
@ -71,7 +71,7 @@ const char html_begin[] PROGMEM = R"( |
|
|
|
context.lineTo(20, iY(i)); |
|
|
|
context.lineTo(15, iY(i)); |
|
|
|
context.moveTo(20, iY(i)); |
|
|
|
textY = i/200*curVoltage; |
|
|
|
textY = i/200*maxVoltage; |
|
|
|
context.fillText(textY.toFixed(1), 0, iY(i-2.5)); |
|
|
|
} |
|
|
|
context.moveTo(20, iY(0)); |
|
|
@ -100,8 +100,6 @@ const char html_begin[] PROGMEM = R"( |
|
|
|
for (i = 1; i < 200; i++) { |
|
|
|
context.lineTo(i*2 + biasX, data.data[i] + biasY); |
|
|
|
} |
|
|
|
voltage = data.data[199]*(-0.1)+20; |
|
|
|
context.fillText(voltage + " V", 200,20); |
|
|
|
context.stroke(); |
|
|
|
}; |
|
|
|
function calibrateDevice() { |
|
|
|