Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some bug fixes #7

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pro.user
37 changes: 20 additions & 17 deletions gui/QML/SettingsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import "style"

Item {
id: settingsPage
property alias showChannelState : enableExpertMode.checked
property alias enableFullScreenState : enableFullScreen.checked
property alias enableExpertModeState : enableExpertMode.checked
property bool showChannelState : settings.enableExpertModeState
property bool enableFullScreenState : settings.enableFullScreenState
property bool enableExpertModeState : settings.enableExpertModeState

Settings {
property alias enableFullScreenState : settingsPage.enableFullScreenState
property alias enableExpertModeState : settingsPage.enableExpertModeState
id: settings
property alias enableFullScreenState : enableFullScreen.checked
property alias enableExpertModeState : enableExpertMode.checked
}

Connections{
Expand Down Expand Up @@ -120,52 +121,54 @@ Item {
}

SettingsFrame {
Layout.fillWidth: true
ColumnLayout{
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.fill: parent
spacing: Units.dp(20)

TouchSwitch {
id: enableAGC
name: "Enable AGC"
height: 24
Layout.fillHeight: true
objectName: "enableAGC"
checked: true
onChanged: cppGUI.inputEnableAGCChanged(valueChecked)
onChanged: cppGUI.inputEnableAGCChange(valueChecked)
}

TouchSlider {
id: gain
enabled: !enableAGC.checked
name: "Manual gain"
onValueChanged: cppGUI.inputGainChanged(valueGain)
Layout.fillHeight: true
onValueChanged: cppGUI.inputGainChange(valueGain)
}
}
}

SettingsFrame {
id: settingsFrame
Layout.fillWidth: true
ColumnLayout{
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.fill: parent
spacing: Units.dp(20)

TouchSwitch {
id: enableFullScreen
name: "Enable full screen mode"
height: 24
Layout.fillHeight: true
objectName: "enableFullScreen"
checked: false
}

TouchSwitch {
id: enableExpertMode
name: "Enable expert mode"
height: 24
Layout.fillHeight: true
objectName: "enableExpertMode"
checked: false
onChanged: {
if(valueChecked == false)
mainWindow.width = Units.dp(350) + radioInformationView.width
}
}
}
}
Expand Down
34 changes: 16 additions & 18 deletions gui/QML/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,22 @@ ApplicationWindow {
visible: true
width: Units.dp(700)
height: Units.dp(500)
visibility: settingsPageLoader.settingsPage.enableFullScreenState ? "FullScreen" : "Windowed"
visibility: settingsPage.enableFullScreenState ? "FullScreen" : "Windowed"

Settings {
property alias width : mainWindow.width
property alias height : mainWindow.height
}
Loader {
id: settingsPageLoader
anchors.topMargin: Units.dp(10)
readonly property SettingsPage settingsPage: item
source: Qt.resolvedUrl("SettingsPage.qml")
SettingsPage{
id:settingsPage
onEnableExpertModeStateChanged: {
if(enableExpertModeState == false)
mainWindow.width = Units.dp(350) + radioInformationView.width
}
}

Loader {
id: infoPageLoader
InfoPage{
id: infoPage
anchors.topMargin: Units.dp(10)
readonly property InfoPage infoPage: item
source: Qt.resolvedUrl("InfoPage.qml")
}

Rectangle {
Expand Down Expand Up @@ -117,7 +115,7 @@ ApplicationWindow {
}
else
{
stackView.push(settingsPageLoader);
stackView.push(settingsPage);
}
}
}
Expand Down Expand Up @@ -162,7 +160,7 @@ ApplicationWindow {
if(stackView.depth > 2)
stackView.pop();
else
stackView.push(infoPageLoader);
stackView.push(infoPage);
}
}
}
Expand All @@ -176,7 +174,7 @@ ApplicationWindow {
clip: true
Layout.alignment: Qt.AlignLeft
Layout.minimumWidth: Units.dp(350)
Layout.fillWidth: settingsPageLoader.settingsPage.enableExpertModeState ? false : true
Layout.fillWidth: settingsPage.enableExpertModeState ? false : true

// Implements back key navigation
focus: true
Expand All @@ -189,7 +187,7 @@ ApplicationWindow {
width: parent.width
height: parent.height
ListView {
property bool showChannelState: settingsPageLoader.settingsPage.showChannelState
property alias showChannelState: settingsPage.showChannelState
anchors.rightMargin: 0
anchors.bottomMargin: 0
anchors.leftMargin: 0
Expand All @@ -213,7 +211,7 @@ ApplicationWindow {
Layout.minimumWidth: Units.dp(320)

// Disable this view if expert view is enabled and no more space is available
visible: (mainWindow.width < Units.dp(850) && settingsPageLoader.settingsPage.enableExpertModeState) ? false : true
visible: (mainWindow.width < Units.dp(850) && settingsPage.enableExpertModeState) ? false : true

// Radio
RadioView {}
Expand All @@ -232,8 +230,8 @@ ApplicationWindow {

ExpertView{
id: expertView
Layout.fillWidth: settingsPageLoader.settingsPage.enableExpertModeState ? true : false
visible: settingsPageLoader.settingsPage.enableExpertModeState ? true : false
Layout.fillWidth: settingsPage.enableExpertModeState ? true : false
visible: settingsPage.enableExpertModeState ? true : false
}
}

Expand Down
2 changes: 1 addition & 1 deletion gui/QML/style/ErrorMessagePopup.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Popup {
width: textView.width + Units.dp(65)
height: Units.dp(50)
x: mainWindow.width/2 - width/2
y: mainWindow.height - toolBar.height - height
y: mainWindow.height - toolBar_.height - height
//modal: true
//focus: true
closePolicy: Popup.NoAutoClose
Expand Down
3 changes: 1 addition & 2 deletions gui/QML/style/TouchSwitch.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import QtQuick.Layouts 1.1
// Import custom styles
import "."

RowLayout {
Item {
id: masterLayout
signal changed(bool valueChecked)

Expand All @@ -15,7 +15,6 @@ RowLayout {
property alias checked: switchView.checked

Layout.preferredWidth: parent.width
spacing: Units.dp(20)

Text {
id: nameView
Expand Down
5 changes: 1 addition & 4 deletions includes/backend/audio/mp4processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@
#include <QObject>
#include "pad-handler.h"

#ifdef GUI_3
#include "pad_decoder_adapter.h"
#endif

class RadioInterface;

Expand Down Expand Up @@ -90,9 +88,8 @@ Q_OBJECT
int16_t aacErrors;
int16_t aacFrames;
int16_t charSet;
#ifdef GUI_3
PADDecoderAdapter *padDecoderAdapter;
#endif

signals:
void show_frameErrors (int);
void show_rsErrors (int);
Expand Down
2 changes: 0 additions & 2 deletions includes/backend/fib-processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ Q_OBJECT
void addtoEnsemble (const QString &);
void nameofEnsemble (int, const QString &);
void changeinConfiguration (void);
#ifdef GUI_3
void newDateTime (int *);
#endif

};

Expand Down
8 changes: 4 additions & 4 deletions includes/ofdm/ofdm-processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "dab-constants.h"
#include <QThread>
#include <QObject>
#include <thread>
#include "stdint.h"
#include "phasereference.h"
#include "ofdm-decoder.h"
Expand Down Expand Up @@ -61,10 +62,11 @@ Q_OBJECT
void setOffset (int32_t);
void coarseCorrectorOn (void);
void coarseCorrectorOff (void);
#ifdef GUI_3
void set_scanMode (bool, QString);
#endif
void start (void);
private:
std::thread threadHandle;
int32_t syncBufferIndex;
virtualInput *theRig;
DabParams *params;
RadioInterface *myRadioInterface;
Expand Down Expand Up @@ -101,10 +103,8 @@ Q_OBJECT
int32_t inputPointer;
DSPCOMPLEX getSample (int32_t);
void getSamples (DSPCOMPLEX *, int16_t, int32_t);
#ifdef GUI_3
bool scanMode;
int32_t NoReadCounter;
#endif
virtual void run (void);
int32_t bufferContent;
bool isReset;
Expand Down
Loading