Make sure the waveforming is positioned correctly on the x-axis when in stop-mode and zooming out.

merge-requests/1/merge
Teuniz 2019-06-24 17:45:35 +02:00
rodzic 7c163b3ad1
commit 504d8b9cc9
7 zmienionych plików z 41 dodań i 26 usunięć

Wyświetl plik

@ -63,9 +63,9 @@ On your scope, go to the menu Utility -> Options -> Installed and make sure you
Qt framework:
-------------
In case you insist on using Qt5, the recommended way is not to use the Qt5 libraries that comes with your distro.
In case you want to use Qt5, the recommended way is not to use the Qt5 libraries that comes with your distro.
Instead, download and compile the Qt5 source and use that to compile DSRemote.
Here's a step by step list of instuctions:
Here's a step by step list with instructions:
First, fulfill the requirements for Qt:
@ -77,7 +77,7 @@ Fedora: sudo dnf groupinstall "C Development Tools and Libraries"
sudo dnf install mesa-libGL-devel cups-devel libx11-dev
openSUSE: sudo zypper install -t pattern devel_basis
sudo zypper install xorg-x11-devel cups-devel freetype-devel fontconfig-devel
sudo zypper install xorg-x11-devel cups-devel freetype-devel fontconfig-devel libxkbcommon-devel libxkbcommon-x11-devel
#############################################################################################
@ -85,7 +85,7 @@ openSUSE: sudo zypper install -t pattern devel_basis
This will not mess with your system libraries. The new compiled libraries will be stored
in a new and separate directory: /usr/local/Qt-5.9.4
in a new and separate directory: /usr/local/Qt-5.12.3-static
It will not interfere with other Qt programs.
@ -95,20 +95,20 @@ mkdir Qt5-source
cd Qt5-source
wget http://ftp1.nluug.nl/languages/qt/official_releases/qt/5.9/5.9.4/single/qt-everywhere-opensource-src-5.9.4.tar.xz
wget http://ftp1.nluug.nl/languages/qt/official_releases/qt/5.12/5.12.3/single/qt-everywhere-src-5.12.3.tar.xz
here is a list of download mirrors: https://download.qt.io/static/mirrorlist/
The Qt source package you are going to need is: qt-everywhere-opensource-src-5.9.4.tar.xz
The Qt source package you are going to need is: qt-everywhere-src-5.12.3.tar.xz
tar -xvf qt-everywhere-opensource-src-5.9.4.tar.xz
tar -xvf qt-everywhere-src-5.12.3.tar.xz
cd qt-everywhere-opensource-src-5.9.4
cd qt-everywhere-src-5.12.3
./configure -v -release -opensource -confirm-license -c++std c++11 -static -accessibility -fontconfig -skip qtdeclarative -skip qtconnectivity -skip qtmultimedia -no-qml-debug -qt-zlib -no-mtdev -no-journald -qt-libpng -qt-libjpeg -system-freetype -qt-harfbuzz -no-openssl -no-libproxy -no-glib -nomake examples -nomake tests -no-compile-examples -cups -no-evdev -no-dbus -no-eglfs -qreal double -no-opengl -skip qtlocation -skip qtsensors -skip qtwayland -skip qtgamepad -skip qtserialbus
./configure -v -prefix /usr/local/Qt-5.12.3-static -release -opensource -confirm-license -c++std c++11 -static -accessibility -fontconfig -skip qtdeclarative -skip qtconnectivity -skip qtmultimedia -qt-zlib -no-mtdev -no-journald -qt-libpng -qt-libjpeg -system-freetype -qt-harfbuzz -no-openssl -no-libproxy -no-glib -nomake examples -nomake tests -no-compile-examples -cups -no-evdev -no-dbus -no-eglfs -qreal double -no-opengl -skip qtlocation -skip qtsensors -skip qtwayland -skip qtgamepad -skip qtserialbus -skip qt3d -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtspeech -skip qtwebengine
(takes about 1.5 minutes)
(takes about 2 minutes)
make -j8
make -j6 (change option -j according to number of available cpu cores e.g -j4 or -j8)
(takes about 11 minutes)
@ -116,9 +116,9 @@ sudo make install
Now go to the directory that contains the DSRemote sourcecode and enter the following commands:
/usr/local/Qt-5.9.4/bin/qmake
/usr/local/Qt-5.12.3-static/bin/qmake
make -j8
make -j6 (change option -j according to number of available cpu cores e.g -j4 or -j8)
sudo make install

Wyświetl plik

@ -35,7 +35,7 @@
#define PROGRAM_NAME "DSRemote"
#define PROGRAM_VERSION "0.35_1904280934"
#define PROGRAM_VERSION "0.35_1906241731"
#define MAX_PATHLEN 4096
@ -243,6 +243,8 @@ struct device_settings
double yinc[MAX_CHNS];
int yor[MAX_CHNS];
double xorigin[MAX_CHNS];
int screenshot_inv; // 0=normal, 1=inverted colors
int screenupdates_on;

Wyświetl plik

@ -123,6 +123,7 @@ void screen_thread::get_params(struct device_settings *dev_parms)
if(params.chandisplay[i])
{
memcpy(dev_parms->wavebuf[i], params.wavebuf[i], params.wavebufsz * sizeof(short));
dev_parms->xorigin[i] = params.xorigin[i];
}
}
dev_parms->thread_error_stat = params.error_stat;
@ -754,6 +755,22 @@ void screen_thread::run()
goto OUT_ERROR;
}
if(tmc_write(":WAV:XOR?") != 9)
{
printf("Can not write to device.\n");
line = __LINE__;
goto OUT_ERROR;
}
if(tmc_read() < 1)
{
printf("Can not read from device.\n");
line = __LINE__;
goto OUT_ERROR;
}
params.xorigin[i] = atof(device->buf);
if(tmc_write(":WAV:DATA?") != 10)
{
printf("Can not write to device.\n");

Wyświetl plik

@ -110,6 +110,8 @@ private:
int func_wplay_operate;
int func_wplay_fcur;
double xorigin[MAX_CHNS];
char debug_str[1024];
} params;

Wyświetl plik

@ -406,16 +406,6 @@ void SignalCurve::drawWidget(QPainter *painter, int curve_w, int curve_h)
h_step = (double)curve_w / (devparms->hordivisions * 100);
w_trace_offset = 0;
if(bufsize != (devparms->hordivisions * 100))
{
if(devparms->timebaseoffset < 0)
{
w_trace_offset = curve_w - ((double)curve_w * ((double)bufsize / (double)(devparms->hordivisions * 100)));
}
}
for(chn=0, chns_done=0; chn<=devparms->channel_cnt; chn++)
{
if(chns_done) break;
@ -434,6 +424,8 @@ void SignalCurve::drawWidget(QPainter *painter, int curve_w, int curve_h)
continue;
}
w_trace_offset = (curve_w / 2.0) - (((devparms->timebaseoffset - devparms->xorigin[chn]) / devparms->timebasescale) * ((double)curve_w / (double)(devparms->hordivisions)));
painter->setPen(QPen(QBrush(SignalColor[chn], Qt::SolidPattern), tracewidth, Qt::SolidLine, Qt::SquareCap, Qt::BevelJoin));
for(i=0; i<bufsize; i++)

Wyświetl plik

@ -147,7 +147,8 @@ int tmcdev_write(struct tmcdev *dev, const char *cmd)
!strncmp(buf, ":FUNC:WREP:OPER?", 16) ||
!strncmp(buf, ":FUNC:WREP:FMAX?", 16) ||
!strncmp(buf, ":FUNC:WREC:FMAX?", 16) ||
!strncmp(buf, ":FUNC:WREP:FCUR?", 16)))
!strncmp(buf, ":FUNC:WREP:FCUR?", 16) ||
!strncmp(buf, ":WAV:XOR?", 9)))
{
printf("tmc_dev write: %s", buf);
}

Wyświetl plik

@ -280,7 +280,8 @@ int tmclan_write(struct tmcdev *tmc_device __attribute__ ((unused)), const char
!strncmp(buf, ":FUNC:WREP:OPER?", 16) ||
!strncmp(buf, ":FUNC:WREP:FMAX?", 16) ||
!strncmp(buf, ":FUNC:WREC:FMAX?", 16) ||
!strncmp(buf, ":FUNC:WREP:FCUR?", 16)))
!strncmp(buf, ":FUNC:WREP:FCUR?", 16) ||
!strncmp(buf, ":WAV:XOR?", 9)))
{
printf("tmc_lan write: %s", buf);
}