From a1f19eb472ee7e37b0e44f231fd1f7cd4fc00b6f Mon Sep 17 00:00:00 2001 From: Teuniz Date: Tue, 2 Jun 2015 16:20:56 +0200 Subject: [PATCH] Work in progress. --- dsremote.pro | 4 ++-- kernel/README | 7 +++---- mainwindow.cpp | 7 ++++--- mainwindow.h | 5 +++-- notes.txt | 7 ++++++- select_device_dialog.cpp => settings_dialog.cpp | 4 ++-- select_device_dialog.h => settings_dialog.h | 0 7 files changed, 20 insertions(+), 14 deletions(-) rename select_device_dialog.cpp => settings_dialog.cpp (97%) rename select_device_dialog.h => settings_dialog.h (100%) diff --git a/dsremote.pro b/dsremote.pro index 2f19a50..2bf8c39 100644 --- a/dsremote.pro +++ b/dsremote.pro @@ -25,7 +25,7 @@ HEADERS += tmc_dev.h HEADERS += tled.h HEADERS += edflib.h HEADERS += signalcurve.h -HEADERS += select_device_dialog.h +HEADERS += settings_dialog.h SOURCES += main.cpp SOURCES += mainwindow.cpp @@ -38,7 +38,7 @@ SOURCES += tmc_dev.c SOURCES += tled.cpp SOURCES += edflib.c SOURCES += signalcurve.cpp -SOURCES += select_device_dialog.cpp +SOURCES += settings_dialog.cpp RESOURCES = images.qrc diff --git a/kernel/README b/kernel/README index 45a2d85..f3fb66d 100644 --- a/kernel/README +++ b/kernel/README @@ -26,13 +26,12 @@ Compiling: Install: kernel-desktop-devel kernel-source -In the following commands, replace the part "linux-3.16.7-21" with your actual kernel version. +In the following commands, replace the part "3.16.7-21-desktop" with your actual kernel version. The easiest way to get this version is to use the command uname -r. -cp /usr/src/linux-3.16.7-21/include/uapi/linux/usb/tmc.h . - -cp /usr/src/linux-3.16.7-21/drivers/usb/class/usbtmc.c . +cp /lib/modules/3.16.7-21-desktop/source/include/uapi/linux/usb/tmc.h . +cp /lib/modules/3.16.7-21-desktop/source/drivers/usb/class/usbtmc.c . Somewhere around line 110 of the file usbtmc.c you will find the following code: diff --git a/mainwindow.cpp b/mainwindow.cpp index b617da4..44b1698 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -74,13 +74,14 @@ UI_Mainwindow::UI_Mainwindow() devicemenu->setTitle("Device"); devicemenu->addAction("Connect", this, SLOT(open_connection())); devicemenu->addAction("Disconnect", this, SLOT(close_connection())); - devicemenu->addAction("Select", this, SLOT(select_device())); devicemenu->addAction("Exit", this, SLOT(close()), QKeySequence::Quit); menubar->addMenu(devicemenu); + menubar->addAction("Settings", this, SLOT(open_settings_dialog())); + helpmenu = new QMenu; helpmenu->setTitle("Help"); - helpmenu->addAction("About", this, SLOT(show_about_dialog())); + helpmenu->addAction("About", this, SLOT(show_about_dialog())); menubar->addMenu(helpmenu); statusLabel = new QLabel; @@ -399,7 +400,7 @@ UI_Mainwindow::~UI_Mainwindow() } -void UI_Mainwindow::select_device() +void UI_Mainwindow::open_settings_dialog() { UI_select_device_window sel_device; } diff --git a/mainwindow.h b/mainwindow.h index 0b771bd..2d4c673 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -60,6 +60,7 @@ #include #include #include +#include #include #include @@ -76,7 +77,7 @@ #include "tled.h" #include "edflib.h" #include "signalcurve.h" -#include "select_device_dialog.h" +#include "settings_dialog.h" @@ -204,7 +205,7 @@ private slots: void show_about_dialog(); void open_connection(); void close_connection(); - void select_device(); + void open_settings_dialog(); int get_device_settings(); void save_waveform(); void save_screenshot(); diff --git a/notes.txt b/notes.txt index 2af8d57..87e2fe9 100644 --- a/notes.txt +++ b/notes.txt @@ -7,6 +7,12 @@ It does not lock the device, so it's still possible to change settings on the de This will cause a mismatch between the programs settings and the device settings. This can be solved by letting the program re-read the settings of the device. At this moment, the only way to do that is to disconnect and connect again. +Some settings are checked regularly and will always be synchronized: +- trigger status +- trigger sweep +- samplerate +- memory depth + Number of screen updates is approx. 20 waveforms per second. @@ -17,7 +23,6 @@ In addition of using the dials to change the scale and offset of the traces and you can use the mouse to drag the yellow and orange arrows aside of the plot. - What's implemented so far: -------------------------- diff --git a/select_device_dialog.cpp b/settings_dialog.cpp similarity index 97% rename from select_device_dialog.cpp rename to settings_dialog.cpp index df8d448..5e63b29 100644 --- a/select_device_dialog.cpp +++ b/settings_dialog.cpp @@ -28,7 +28,7 @@ -#include "select_device_dialog.h" +#include "settings_dialog.h" @@ -42,7 +42,7 @@ UI_select_device_window::UI_select_device_window(QDialog *parnt) setMinimumSize(QSize(400, 200)); setMaximumSize(QSize(400, 200)); - setWindowTitle("Device settings"); + setWindowTitle("Settings"); setModal(true); comboBox1 = new QComboBox(this); diff --git a/select_device_dialog.h b/settings_dialog.h similarity index 100% rename from select_device_dialog.h rename to settings_dialog.h