kopia lustrzana https://gitlab.com/Teuniz/DSRemote
Merge branch 'master' into 'master'
Add cmake support and make ready for Qt6 See merge request Teuniz/DSRemote!4merge-requests/4/merge
commit
a8c620673f
|
@ -0,0 +1,4 @@
|
|||
CMakeLists.txt.user
|
||||
build
|
||||
.flatpak-builder
|
||||
dsremoteRepo
|
|
@ -0,0 +1,109 @@
|
|||
# FILE_SET needs at least 3.23
|
||||
cmake_minimum_required(VERSION 3.23)
|
||||
|
||||
project(DSRemote)
|
||||
set(ID "net.teuniz.dsremote")
|
||||
|
||||
find_package(QT NAMES Qt4 Qt5 Qt6 REQUIRED)
|
||||
set(QT Qt${QT_VERSION_MAJOR})
|
||||
|
||||
if (QT_VERSION_MAJOR EQUAL 4)
|
||||
if (QT_MINOR_VERSION LESS 7 OR (QT_MINOR_VERSION EQUAL 7 AND QT_PATCH_VERSION LESS 1))
|
||||
message(FATAL_ERROR "This project needs at least Qt4.7.1")
|
||||
endif()
|
||||
elseif( QT_VERSION_MAJOR EQUAL 5)
|
||||
if (QT_MINOR_VERSION LESS 9 OR (QT_MINOR_VERSION EQUAL 9 AND QT_PATCH_VERSION LESS 1))
|
||||
message(FATAL_ERROR "This project needs at least Qt5.9.1")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(${QT} REQUIRED COMPONENTS Widgets Network)
|
||||
|
||||
set(COMPILE_FLAGS "-Wextra -Wshadow -Wformat-nonliteral -Wformat -Wformat-security -Wtype-limits -Wfatal-errors")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_FLAGS}")
|
||||
|
||||
add_compile_definitions(_LARGEFILE64_SOURCE _LARGEFILE_SOURCE) # needed in edflib
|
||||
|
||||
add_subdirectory(third_party)
|
||||
|
||||
set(HEADERS global.h
|
||||
mainwindow.h
|
||||
about_dialog.h
|
||||
utils.h
|
||||
connection.h
|
||||
tmc_dev.h
|
||||
tmc_lan.h
|
||||
tled.h
|
||||
edflib.h
|
||||
signalcurve.h
|
||||
settings_dialog.h
|
||||
screen_thread.h
|
||||
lan_connect_thread.h
|
||||
read_settings_thread.h
|
||||
save_data_thread.h
|
||||
decode_dialog.h
|
||||
tdial.h
|
||||
wave_dialog.h
|
||||
wave_view.h
|
||||
playback_dialog.h)
|
||||
|
||||
set(SOURCES main.cpp
|
||||
mainwindow.cpp
|
||||
mainwindow_constr.cpp
|
||||
timer_handlers.cpp
|
||||
save_data.cpp
|
||||
interface.cpp
|
||||
serial_decoder.cpp
|
||||
about_dialog.cpp
|
||||
utils.c
|
||||
connection.cpp
|
||||
tmc_dev.c
|
||||
tmc_lan.c
|
||||
tled.cpp
|
||||
edflib.c
|
||||
signalcurve.cpp
|
||||
settings_dialog.cpp
|
||||
screen_thread.cpp
|
||||
lan_connect_thread.cpp
|
||||
read_settings_thread.cpp
|
||||
save_data_thread.cpp
|
||||
decode_dialog.cpp
|
||||
tdial.cpp
|
||||
wave_dialog.cpp
|
||||
wave_view.cpp
|
||||
playback_dialog.cpp)
|
||||
|
||||
set(RESOURCES images.qrc)
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SOURCES} ${RESOURCES})
|
||||
target_link_libraries(${PROJECT_NAME} ${QT}::Widgets ${QT}::Network kiss_fft)
|
||||
set_property(TARGET ${PROJECT_NAME} PROPERTY AUTOMOC ON)
|
||||
set_property(TARGET ${PROJECT_NAME} PROPERTY AUTORCC ON)
|
||||
target_sources(${PROJECT_NAME} PRIVATE
|
||||
FILE_SET HEADERS TYPE HEADERS BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} FILES ${HEADERS})
|
||||
|
||||
install(TARGETS ${PROJECT_NAME})
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
foreach(icon 32 64 128 256 512)
|
||||
install(
|
||||
FILES images/r_dsremote_${icon}x${icon}.png
|
||||
DESTINATION share/icons/hicolor/${icon}x${icon}/apps
|
||||
COMPONENT ${PROJECT_NAME}
|
||||
RENAME ${ID}.png)
|
||||
endforeach()
|
||||
|
||||
install(
|
||||
FILES install/${ID}.appdata.xml
|
||||
DESTINATION share/metainfo
|
||||
COMPONENT ${PROJECT_NAME}
|
||||
)
|
||||
|
||||
install(
|
||||
FILES install/${ID}.desktop
|
||||
DESTINATION share/applications
|
||||
COMPONENT ${PROJECT_NAME}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
BIN
images/r.xcf
BIN
images/r.xcf
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 2.4 KiB |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 3.8 KiB |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 1.1 KiB |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 5.1 KiB |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 1.6 KiB |
|
@ -0,0 +1 @@
|
|||
flatpak-builder --force-clean --repo=dsremoteRepo build net.teuniz.dsremote.yml
|
|
@ -0,0 +1,3 @@
|
|||
flatpak remove net.teuniz.dsremote
|
||||
flatpak remote-add dsremoteRepo dsremoteRepo --no-gpg-verify
|
||||
flatpak install dsremoteRepo net.teuniz.dsremote
|
|
@ -0,0 +1,25 @@
|
|||
app-id: net.teuniz.dsremote
|
||||
runtime: org.kde.Platform
|
||||
runtime-version: 6.4
|
||||
sdk: org.kde.Sdk
|
||||
command: DSRemote
|
||||
desktop-file-name-suffix: '' # used to create development version
|
||||
finish-args:
|
||||
- --socket=wayland
|
||||
- --socket=fallback-x11
|
||||
- --filesystem=home # to save images
|
||||
- --share=network # for the LAN connection needed
|
||||
- --device=all # to access usb devices
|
||||
|
||||
modules:
|
||||
- name: DSRemote
|
||||
buildsystem: cmake
|
||||
builddir: true
|
||||
sources:
|
||||
- type: dir
|
||||
path: ../..
|
||||
build-options:
|
||||
cflags: -Wp,-U_FORTIFY_SOURCE # Remove _FORTIFY_SOURCE
|
||||
cxxflags: -Wp,-U_FORTIFY_SOURCE
|
||||
env:
|
||||
CPPFLAGS: -Wp,-U_FORTIFY_SOURCE
|
|
@ -0,0 +1,77 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>net.teuniz.dsremote</id>
|
||||
<launchable type="desktop-id">net.teuniz.dsremote.desktop</launchable>
|
||||
<name>DSRemote</name>
|
||||
<metadata_license>FSFAP</metadata_license>
|
||||
<project_license>GPL-3.0+</project_license>
|
||||
<summary>DSRemote is a program to control and visualize your Rigol® oscillosopes</summary>
|
||||
<description>
|
||||
|
||||
<p>DSRemote is a program to control and visualize your Rigol® DS6000 or DS1000Z series oscilloscope from
|
||||
your Linux desktop via USB or LAN. It will probably work as well with the other series like DS2000A and DS4000 series but
|
||||
I have no access to all those oscilloscopes so I can not test it</p>
|
||||
|
||||
<p>Features:</p>
|
||||
<ul>
|
||||
<li>LAN or USB connection</li>
|
||||
<li>Saving screenshots</li>
|
||||
<li>Saving data to file</li>
|
||||
</ul>
|
||||
|
||||
</description>
|
||||
<developer_name>Teunis van Beelen</developer_name>
|
||||
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image>https://www.teuniz.net/DSRemote/oscilloscope_decode.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>https://www.teuniz.net/DSRemote/oscilloscope_with_fft.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
|
||||
<url type="homepage">https://www.teuniz.net/DSRemote</url>
|
||||
<url type="bugtracker">https://gitlab.com/Teuniz/DSRemote/-/issues</url>
|
||||
<url type="help">https://gitlab.com/Teuniz/DSRemote/-/issues</url>
|
||||
|
||||
<releases>
|
||||
<release version='0.42_2408061715' date='2021-05-30'>
|
||||
<description>
|
||||
Release
|
||||
</description>
|
||||
</release>
|
||||
|
||||
</releases>
|
||||
|
||||
<content_rating type="oars-1.1">
|
||||
<content_attribute id="violence-cartoon">none</content_attribute>
|
||||
<content_attribute id="violence-fantasy">none</content_attribute>
|
||||
<content_attribute id="violence-realistic">none</content_attribute>
|
||||
<content_attribute id="violence-bloodshed">none</content_attribute>
|
||||
<content_attribute id="violence-sexual">none</content_attribute>
|
||||
<content_attribute id="violence-desecration">none</content_attribute>
|
||||
<content_attribute id="violence-slavery">none</content_attribute>
|
||||
<content_attribute id="violence-worship">none</content_attribute>
|
||||
<content_attribute id="drugs-alcohol">none</content_attribute>
|
||||
<content_attribute id="drugs-narcotics">none</content_attribute>
|
||||
<content_attribute id="drugs-tobacco">none</content_attribute>
|
||||
<content_attribute id="sex-nudity">none</content_attribute>
|
||||
<content_attribute id="sex-themes">none</content_attribute>
|
||||
<content_attribute id="sex-homosexuality">none</content_attribute>
|
||||
<content_attribute id="sex-prostitution">none</content_attribute>
|
||||
<content_attribute id="sex-adultery">none</content_attribute>
|
||||
<content_attribute id="sex-appearance">none</content_attribute>
|
||||
<content_attribute id="language-profanity">none</content_attribute>
|
||||
<content_attribute id="language-humor">none</content_attribute>
|
||||
<content_attribute id="language-discrimination">none</content_attribute>
|
||||
<content_attribute id="social-chat">none</content_attribute>
|
||||
<content_attribute id="social-info">none</content_attribute>
|
||||
<content_attribute id="social-audio">none</content_attribute>
|
||||
<content_attribute id="social-location">none</content_attribute>
|
||||
<content_attribute id="social-contacts">none</content_attribute>
|
||||
<content_attribute id="money-purchasing">none</content_attribute>
|
||||
<content_attribute id="money-gambling">none</content_attribute>
|
||||
</content_rating>
|
||||
|
||||
</component>
|
|
@ -0,0 +1,11 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=DSRemote
|
||||
Comment=Operate your Rigol oscilloscope from your Linux desktop.
|
||||
Exec=DSRemote
|
||||
StartupWMClass=net.teuniz.dsremote
|
||||
Icon=net.teuniz.dsremote
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Science;Application;Development;
|
||||
X-Desktop-File-Install-Version=0.1
|
|
@ -25,8 +25,7 @@
|
|||
***************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
void UI_Mainwindow::navDialChanged(int npos)
|
||||
{
|
||||
|
|
|
@ -27,13 +27,6 @@
|
|||
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "mainwindow_constr.cpp"
|
||||
#include "timer_handlers.cpp"
|
||||
#include "save_data.cpp"
|
||||
#include "interface.cpp"
|
||||
#include "serial_decoder.cpp"
|
||||
|
||||
|
||||
|
||||
void UI_Mainwindow::open_settings_dialog()
|
||||
{
|
||||
|
@ -91,7 +84,8 @@ void UI_Mainwindow::open_connection()
|
|||
device = tmc_open_usb(dev_str);
|
||||
if(device == NULL)
|
||||
{
|
||||
snprintf(str, 4096, "Can not open device %s", dev_str);
|
||||
char* msg = strerror(errno);
|
||||
snprintf(str, 4096, "Can not open device %s: %s", dev_str, msg);
|
||||
goto OC_OUT_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
***************************************************************************
|
||||
*/
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
#define SAV_MEM_BSZ (250000)
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
***************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
|
||||
void UI_Mainwindow::serial_decoder(struct device_settings *d_parms)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
add_subdirectory(kiss_fft)
|
|
@ -0,0 +1,5 @@
|
|||
add_library(kiss_fft kiss_fft.c kiss_fftr.c)
|
||||
target_sources(kiss_fft INTERFACE
|
||||
FILE_SET HEADERS TYPE HEADERS BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} FILES kiss_fft.h kiss_fftr.h)
|
||||
target_sources(kiss_fft PRIVATE
|
||||
FILE_SET private_headers TYPE HEADERS BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} FILES _kiss_fft_guts.h)
|
|
@ -25,7 +25,7 @@
|
|||
***************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
|
||||
void UI_Mainwindow::test_timer_handler()
|
||||
|
|
|
@ -209,6 +209,8 @@ struct tmcdev * tmclan_open(const char *host_or_ip)
|
|||
|
||||
if(connect(sockfd, (struct sockaddr *) &inet_address, sizeof(struct sockaddr)) < 0)
|
||||
{
|
||||
char* err = strerror(errno);
|
||||
printf("Unable to connect to device %s: %s", ip_address, err);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue