1
0

fix size of screen

This commit is contained in:
Rémi Heredero 2024-01-16 19:20:04 +01:00
parent 58e7081738
commit 0039954bd8

View File

@ -111,15 +111,15 @@ void Controller::onCheckBoxTriggerCheckState(bool checked)
void Controller::doShowAnalogSignal() { void Controller::doShowAnalogSignal() {
/* /*
* 640px for 8 div * 460px for 8 div
* fs = 100kHz => 100 samples/ms * fs = 100kHz => 100 samples/ms
* 500 us/div => 400 samples => scale = 400/640 = 0,625 * 500 us/div => 400 samples => scale = 400/460 = 0,870
* 1 ms/div => 800 samples => scale = 800/640 = 1,25 * 1 ms/div => 800 samples => scale = 800/460 = 1,739
* 2 ms/div => 1600 samples => scale = 1600/640 = 2,5 * 2 ms/div => 1600 samples => scale = 1600/460 = 3,478
* 5 ms/div => 4000 samples => scale = 4000/640 = 6,25 * 5 ms/div => 4000 samples => scale = 4000/460 = 8,696
* 10 ms/div => 8000 samples => scale = 8000/640 = 12,5 * 10 ms/div => 8000 samples => scale = 8000/460 = 17,391
*/ */
static float scales[7] = {0.625, 0.625, 1.25, 2.5, 6.25, 12.5, 12.5}; // tab for 100kHz static float scales[7] = {0.870, 0.870, 1.739, 3.478, 8.696, 17.391, 17.391}; // tab for 100kHz
float scale = scales[this->_tdivValue]; float scale = scales[this->_tdivValue];
gui().drawGraphPoints(_adcValuesBuffer, _adcValuesBufferSize, scale); gui().drawGraphPoints(_adcValuesBuffer, _adcValuesBufferSize, scale);
} }