kopia lustrzana https://gitlab.com/Teuniz/DSRemote
Work in progress.
rodzic
d1940c3ab2
commit
0f54ae93e4
|
@ -68,6 +68,7 @@ SOURCES += mainwindow_constr.cpp
|
||||||
SOURCES += timer_handlers.cpp
|
SOURCES += timer_handlers.cpp
|
||||||
SOURCES += save_data.cpp
|
SOURCES += save_data.cpp
|
||||||
SOURCES += interface.cpp
|
SOURCES += interface.cpp
|
||||||
|
SOURCES += serial_decoder.cpp
|
||||||
SOURCES += about_dialog.cpp
|
SOURCES += about_dialog.cpp
|
||||||
SOURCES += utils.c
|
SOURCES += utils.c
|
||||||
SOURCES += connection.cpp
|
SOURCES += connection.cpp
|
||||||
|
@ -93,19 +94,19 @@ target.files = dsremote
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
|
|
||||||
icon_a.path = /usr/share/icons
|
icon_a.path = /usr/share/icons
|
||||||
icon_a.files = images/r.png
|
icon_a.files = images/r_dsremote.png
|
||||||
INSTALLS += icon_a
|
INSTALLS += icon_a
|
||||||
|
|
||||||
icon_b.path += /usr/share/pixmaps
|
icon_b.path += /usr/share/pixmaps
|
||||||
icon_b.files = images/r.png
|
icon_b.files = images/r_dsremote.png
|
||||||
INSTALLS += icon_b
|
INSTALLS += icon_b
|
||||||
|
|
||||||
icon_c.path += /usr/share/icons/hicolor/48x48/apps
|
icon_c.path += /usr/share/icons/hicolor/48x48/apps
|
||||||
icon_c.files = images/r.png
|
icon_c.files = images/r_dsremote.png
|
||||||
INSTALLS += icon_c
|
INSTALLS += icon_c
|
||||||
|
|
||||||
icon_d.path += /usr/share/icons/hicolor/48x48/mimetypes
|
icon_d.path += /usr/share/icons/hicolor/48x48/mimetypes
|
||||||
icon_d.files = images/r.png
|
icon_d.files = images/r_dsremote.png
|
||||||
INSTALLS += icon_d
|
INSTALLS += icon_d
|
||||||
|
|
||||||
desktop_link.path += /usr/share/applications
|
desktop_link.path += /usr/share/applications
|
||||||
|
|
7
global.h
7
global.h
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
|
|
||||||
#define PROGRAM_NAME "DSRemote"
|
#define PROGRAM_NAME "DSRemote"
|
||||||
#define PROGRAM_VERSION "0.33_1611131103"
|
#define PROGRAM_VERSION "0.33_1611222104"
|
||||||
|
|
||||||
#define MAX_PATHLEN 4096
|
#define MAX_PATHLEN 4096
|
||||||
|
|
||||||
|
@ -87,6 +87,11 @@
|
||||||
#define DECODE_MODE_TAB_SPI 2
|
#define DECODE_MODE_TAB_SPI 2
|
||||||
#define DECODE_MODE_TAB_I2C 3
|
#define DECODE_MODE_TAB_I2C 3
|
||||||
|
|
||||||
|
#define DECODE_MODE_PAR 0
|
||||||
|
#define DECODE_MODE_UART 1
|
||||||
|
#define DECODE_MODE_SPI 2
|
||||||
|
#define DECODE_MODE_I2C 3
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!DOCTYPE RCC><RCC version="1.0">
|
<!DOCTYPE RCC><RCC version="1.0">
|
||||||
<qresource>
|
<qresource>
|
||||||
<file>images/r.png</file>
|
<file>images/r_dsremote.png</file>
|
||||||
<file>images/playpause.png</file>
|
<file>images/playpause.png</file>
|
||||||
<file>images/record.png</file>
|
<file>images/record.png</file>
|
||||||
<file>images/stop.png</file>
|
<file>images/stop.png</file>
|
||||||
|
|
Przed Szerokość: | Wysokość: | Rozmiar: 919 B Po Szerokość: | Wysokość: | Rozmiar: 919 B |
|
@ -5,7 +5,7 @@ Type=Application
|
||||||
Name=DSRemote
|
Name=DSRemote
|
||||||
GenericName=Oscilloscope
|
GenericName=Oscilloscope
|
||||||
Comment=Operate your Rigol oscilloscope from your Linux desktop.
|
Comment=Operate your Rigol oscilloscope from your Linux desktop.
|
||||||
Icon=r
|
Icon=r_dsremote
|
||||||
Exec=dsremote
|
Exec=dsremote
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Categories=Science;Application;
|
Categories=Science;Application;
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "timer_handlers.cpp"
|
#include "timer_handlers.cpp"
|
||||||
#include "save_data.cpp"
|
#include "save_data.cpp"
|
||||||
#include "interface.cpp"
|
#include "interface.cpp"
|
||||||
|
#include "serial_decoder.cpp"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2533,6 +2534,11 @@ void UI_Mainwindow::screenUpdate()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if(devparms.math_decode_display)
|
||||||
|
{
|
||||||
|
serial_decoder();
|
||||||
|
}
|
||||||
|
|
||||||
waveForm->update();
|
waveForm->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -234,6 +234,7 @@ private:
|
||||||
int get_metric_factor(double);
|
int get_metric_factor(double);
|
||||||
void get_device_model(const char *);
|
void get_device_model(const char *);
|
||||||
double get_stepsize_divide_by_1000(double);
|
double get_stepsize_divide_by_1000(double);
|
||||||
|
void serial_decoder(void);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ UI_Mainwindow::UI_Mainwindow()
|
||||||
|
|
||||||
setMinimumSize(1170, 630);
|
setMinimumSize(1170, 630);
|
||||||
setWindowTitle(PROGRAM_NAME " " PROGRAM_VERSION);
|
setWindowTitle(PROGRAM_NAME " " PROGRAM_VERSION);
|
||||||
setWindowIcon(QIcon(":/images/r.png"));
|
setWindowIcon(QIcon(":/images/r_dsremote.png"));
|
||||||
|
|
||||||
appfont = new QFont;
|
appfont = new QFont;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,94 @@
|
||||||
|
/*
|
||||||
|
***************************************************************************
|
||||||
|
*
|
||||||
|
* Author: Teunis van Beelen
|
||||||
|
*
|
||||||
|
* Copyright (C) 2016 Teunis van Beelen
|
||||||
|
*
|
||||||
|
* Email: teuniz@gmail.com
|
||||||
|
*
|
||||||
|
***************************************************************************
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
***************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void UI_Mainwindow::serial_decoder(void)
|
||||||
|
{
|
||||||
|
// int i, j,
|
||||||
|
// threshold[MAX_CHNS];
|
||||||
|
//
|
||||||
|
// short s_max, s_min;
|
||||||
|
//
|
||||||
|
// if(devparms.math_decode_threshold_auto)
|
||||||
|
// {
|
||||||
|
// for(j=0; j<MAX_CHNS; j++)
|
||||||
|
// {
|
||||||
|
// s_max = -32768;
|
||||||
|
// s_min = 32767;
|
||||||
|
//
|
||||||
|
// for(i=0; i<devparms.wavebufsz; i++)
|
||||||
|
// {
|
||||||
|
// if(devparms.wavebuf[j][i] > s_max) s_max = devparms.wavebuf[j][i];
|
||||||
|
// if(devparms.wavebuf[j][i] < s_min) s_min = devparms.wavebuf[j][i];
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// threshold[j] = (s_max + s_min) / 2;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// for(j=0; j<MAX_CHNS; j++)
|
||||||
|
// {
|
||||||
|
// if(devparms.modelserie == 6)
|
||||||
|
// {
|
||||||
|
// // FIXME
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// threshold[j] = devparms.math_decode_threshold[j];
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if(devparms.math_decode_mode == DECODE_MODE_UART)
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue