From 0039954bd8f94d370636844425a46466ac139efe Mon Sep 17 00:00:00 2001 From: Klagarge Date: Tue, 16 Jan 2024 19:20:04 +0100 Subject: [PATCH] fix size of screen --- src/app/oscilloscopecontroller.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/oscilloscopecontroller.cpp b/src/app/oscilloscopecontroller.cpp index 9b37745..d59af45 100644 --- a/src/app/oscilloscopecontroller.cpp +++ b/src/app/oscilloscopecontroller.cpp @@ -111,15 +111,15 @@ void Controller::onCheckBoxTriggerCheckState(bool checked) void Controller::doShowAnalogSignal() { /* - * 640px for 8 div + * 460px for 8 div * fs = 100kHz => 100 samples/ms - * 500 us/div => 400 samples => scale = 400/640 = 0,625 - * 1 ms/div => 800 samples => scale = 800/640 = 1,25 - * 2 ms/div => 1600 samples => scale = 1600/640 = 2,5 - * 5 ms/div => 4000 samples => scale = 4000/640 = 6,25 - * 10 ms/div => 8000 samples => scale = 8000/640 = 12,5 + * 500 us/div => 400 samples => scale = 400/460 = 0,870 + * 1 ms/div => 800 samples => scale = 800/460 = 1,739 + * 2 ms/div => 1600 samples => scale = 1600/460 = 3,478 + * 5 ms/div => 4000 samples => scale = 4000/460 = 8,696 + * 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]; gui().drawGraphPoints(_adcValuesBuffer, _adcValuesBufferSize, scale); }