Index: denali.pro
===================================================================
diff -u -rb5a7852d2637f7969680fbd3d2c821a6a74a8ccd -r96b249bba7de97afe17cfbdaf02250dbded38f4b
--- denali.pro (.../denali.pro) (revision b5a7852d2637f7969680fbd3d2c821a6a74a8ccd)
+++ denali.pro (.../denali.pro) (revision 96b249bba7de97afe17cfbdaf02250dbded38f4b)
@@ -138,7 +138,7 @@
sources/bluetooth/BLEScanner.h \
\ # Wifi
sources/wifi/WifiInterface.h \
- sources/wifi/Network.h \
+ sources/model/MWifiNetwork.h \
\ # Denali Message
sources/canbus/MessageGlobals.h \
sources/canbus/MessageAcknowModel.h \
Index: denali.qrc
===================================================================
diff -u -r632f698e13711e6544a28c7a72d276d2bf5f000e -r96b249bba7de97afe17cfbdaf02250dbded38f4b
--- denali.qrc (.../denali.qrc) (revision 632f698e13711e6544a28c7a72d276d2bf5f000e)
+++ denali.qrc (.../denali.qrc) (revision 96b249bba7de97afe17cfbdaf02250dbded38f4b)
@@ -4,6 +4,7 @@
sources/gui/qml/pages/SettingsStack.qml
sources/gui/qml/pages/SettingsHome.qml
sources/gui/qml/pages/ManagerHome.qml
+ sources/gui/qml/pages/SettingsDeviceInformation.qml
sources/gui/qml/pages/SettingsBluetooth.qml
sources/gui/qml/pages/SettingsWifi.qml
sources/gui/qml/pages/SettingsDateTimeSet.qml
@@ -15,7 +16,7 @@
sources/gui/qml/dialogs/AlarmListDialog.qml
sources/gui/qml/dialogs/Alert.qml
sources/gui/qml/dialogs/VitalsEntry.qml
- sources/gui/qml/dialogs/JoinNetwork.qml
+ sources/gui/qml/dialogs/WifiJoinDisconnect.qml
sources/gui/qml/dialogs/DisconnectNetwork.qml
Index: sources/gui/GuiGlobals.cpp
===================================================================
diff -u -rb5a7852d2637f7969680fbd3d2c821a6a74a8ccd -r96b249bba7de97afe17cfbdaf02250dbded38f4b
--- sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision b5a7852d2637f7969680fbd3d2c821a6a74a8ccd)
+++ sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 96b249bba7de97afe17cfbdaf02250dbded38f4b)
@@ -94,7 +94,6 @@
qRegisterMetaType ("GuiAlarmPriority");
qRegisterMetaType ("GuiRequestReasons");
- qRegisterMetaType ("Network");
// Note that this Models are not used in the QML
// but Qt needs them to be registered to be able to use them in between threads queue
Index: sources/gui/qml/components/TextEntry.qml
===================================================================
diff -u -r632f698e13711e6544a28c7a72d276d2bf5f000e -r96b249bba7de97afe17cfbdaf02250dbded38f4b
--- sources/gui/qml/components/TextEntry.qml (.../TextEntry.qml) (revision 632f698e13711e6544a28c7a72d276d2bf5f000e)
+++ sources/gui/qml/components/TextEntry.qml (.../TextEntry.qml) (revision 96b249bba7de97afe17cfbdaf02250dbded38f4b)
@@ -26,6 +26,9 @@
property alias label : _label
property alias labelText : _label.text
property alias validator : _input.validator
+ property bool enableInput : true
+ property color lineColor : Colors.textEntry
+ property bool lineVisible : true
property alias labelVisible : _label.visible
signal enterPressed()
@@ -45,7 +48,9 @@
anchors {
left: _label.right
}
-
+ enabled: _root.enableInput
+ autoScroll: false
+ clip: true
color: Colors.textMain
text: ""
font.pixelSize: Fonts.fontPixelTextRectExtra
@@ -69,7 +74,8 @@
}
Line { id: _line
- color: Colors.textEntry
+ color: _root.lineColor
+ visible: _root.lineVisible
width: Variables.textInputLineWidth
anchors {
top: _input.bottom
Index: sources/gui/qml/main.qml
===================================================================
diff -u -rb5a7852d2637f7969680fbd3d2c821a6a74a8ccd -r96b249bba7de97afe17cfbdaf02250dbded38f4b
--- sources/gui/qml/main.qml (.../main.qml) (revision b5a7852d2637f7969680fbd3d2c821a6a74a8ccd)
+++ sources/gui/qml/main.qml (.../main.qml) (revision 96b249bba7de97afe17cfbdaf02250dbded38f4b)
@@ -303,7 +303,7 @@
Alert { id: _alert }
VitalsEntry { id: _vitalsEntry }
- JoinNetwork { id: _joinNetwork }
+ WifiJoinDisconnect { id: _wifiJoinDisconnect }
Keyboard { id: _keyboard }
Connections { target: vPowerOff
Index: sources/gui/qml/pages/SettingsHome.qml
===================================================================
diff -u -rd1a6830c486a9ee9c388a80b570aa8141a8366c9 -r96b249bba7de97afe17cfbdaf02250dbded38f4b
--- sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision d1a6830c486a9ee9c388a80b570aa8141a8366c9)
+++ sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision 96b249bba7de97afe17cfbdaf02250dbded38f4b)
@@ -83,14 +83,29 @@
}
TitleText { id: _titleText
- anchors.horizontalCenter: parent.horizontalCenter;
- anchors.top: parent.top
- anchors.topMargin: 150
+ anchors {
+ horizontalCenter: parent.horizontalCenter;
+ top: parent.top
+ topMargin: 150
+ }
width: parent.width
text: qsTr("Device Settings")
}
+ TitleText {
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ top: _titleText.bottom
+ topMargin: 10
+ }
+ text: qsTr("Service Mode")
+ color: Colors.textMain
+ font.italic: true
+ font.pixelSize: Fonts.fontPixelDialogText
+ visible: true // TODO: set visible if in service mode
+ }
+
/*
Diagnostics {
id: _diagnostics
@@ -100,36 +115,54 @@
SettingsBluetooth {
id: _bluetooth
- onClickedBack: pop()
+ onClickedBack: _settingsStack.pop()
}
SettingsWifi {
id: _wifi
- onClickedBack: pop()
+ onClickedBack: _settingsStack.pop()
+
}
+ SettingsDeviceInformation {
+ id: _deviceInformation
+ onClickedBack: _settingsStack.pop()
+ }
+
SettingsDateTimeSet {
id: _dateTimeSet
- onClickedBack: pop()
+ onClickedBack: _settingsStack.pop()
}
Column {
- anchors.centerIn: parent;
+ anchors.centerIn: parent
+ SettingsItem { id: _item_
+ title : qsTr("Device Information")
+ onClicked: _settingsStack.push(_deviceInformation)
+ }
- // add each settings page here.
SettingsItem { id: _item_bluetooth
title : qsTr("Bluetooth")
- onClicked: push(_bluetooth);
+ onClicked: _settingsStack.push(_bluetooth);
}
SettingsItem { id: _item_wifi
title : qsTr("Wifi")
onClicked: {
- push(_wifi);
+ _settingsStack.push(_wifi);
vNetworkModel.doScan()
}
}
+ SettingsItem { id: _item_serviceMode
+ title : qsTr("Service Mode")
+ onClicked: {
+ // TODO: Ask for service password before setting service mode to true
+ // TODO: Hide main menu and enable shutdown button
+ console.debug("Clicked login to service mode");
+ }
+ visible: true // TODO: set to false if already in service mode
+ }
SettingsItem { id: _itemDateTimeSet
title : qsTr("Set Date and Time")
onClicked: {
Index: sources/model/MModel.h
===================================================================
diff -u -rb5a7852d2637f7969680fbd3d2c821a6a74a8ccd -r96b249bba7de97afe17cfbdaf02250dbded38f4b
--- sources/model/MModel.h (.../MModel.h) (revision b5a7852d2637f7969680fbd3d2c821a6a74a8ccd)
+++ sources/model/MModel.h (.../MModel.h) (revision 96b249bba7de97afe17cfbdaf02250dbded38f4b)
@@ -229,6 +229,7 @@
REGISTER_METATYPE( HDDebugTextData ) \
REGISTER_METATYPE( DGDebugTextData ) \
REGISTER_METATYPE( PrimingData ) \
+ REGISTER_METATYPE( WifiNetworkData ) \
\
/* Request */ \
REGISTER_METATYPE( TreatmentStartRequestData ) \
Index: sources/storage/StorageGlobals.cpp
===================================================================
diff -u -r079aae9751fe0d234adaa470bc7d23980d5e7692 -r96b249bba7de97afe17cfbdaf02250dbded38f4b
--- sources/storage/StorageGlobals.cpp (.../StorageGlobals.cpp) (revision 079aae9751fe0d234adaa470bc7d23980d5e7692)
+++ sources/storage/StorageGlobals.cpp (.../StorageGlobals.cpp) (revision 96b249bba7de97afe17cfbdaf02250dbded38f4b)
@@ -67,8 +67,27 @@
const char *Wifi_Set_Auto_Assigned_IP = "wifi_set_auto_assigned_ip.sh";
const char *Wifi_Set_DNS = "wifi_set_dns.sh";
const char *Wifi_Set_Static_IP = "wifi_set_static_ip.sh";
+ const char *Wifi_Set_Gateway = "wifi_set_gateway.sh";
+ const char *Wifi_Set_SubnetMask = "wifi_set_subnetmask.sh";
const char *Wifi_Start_WPA_Supplicant = "wifi_start_wpa_supplicant.sh";
+ // Wifi - Settings
+#ifdef BUILD_FOR_DESKTOP
+ QSettings WifiSettings("/home/denali/wifi.ini");
+#elif BUILD_FOR_TARGET
+ QSettings WifiSettings("/home/root/settings/wifi.ini", QSettings::IniFormat);
+#endif
+
+ const char *WifiSettings_SSID = "wifi/ssid";
+ const char *WifiSettings_MacAddress = "wifi/macAddress";
+ const char *WifiSettings_ConfPath = "wifi/confPath";
+ const char *WifiSettings_Security_Types = "wifi/security";
+ const char *WifiSettings_IPAddress = "wifi/ipAddress";
+ const char *WifiSettings_Gateway = "wifi/gateway";
+ const char *WifiSettings_SubnetMask = "wifi/subnetmask";
+ const char *WifiSettings_DNS = "wifi/dns";
+ const char *WifiSettings_UseDHCP = "wifi/useDHCP";
+
// Date and Time
const char *Date_Time_Set = "date_time_set.sh";
}
Index: sources/storage/StorageGlobals.h
===================================================================
diff -u -r079aae9751fe0d234adaa470bc7d23980d5e7692 -r96b249bba7de97afe17cfbdaf02250dbded38f4b
--- sources/storage/StorageGlobals.h (.../StorageGlobals.h) (revision 079aae9751fe0d234adaa470bc7d23980d5e7692)
+++ sources/storage/StorageGlobals.h (.../StorageGlobals.h) (revision 96b249bba7de97afe17cfbdaf02250dbded38f4b)
@@ -14,6 +14,8 @@
*/
#pragma once
+#include
+
/*!
* Contains the shared constants between storage classes.
*/
@@ -53,8 +55,22 @@
extern const char *Wifi_Set_Auto_Assigned_IP;
extern const char *Wifi_Set_DNS;
extern const char *Wifi_Set_Static_IP;
+ extern const char *Wifi_Set_Gateway;
+ extern const char *Wifi_Set_SubnetMask;
extern const char *Wifi_Start_WPA_Supplicant;
+ // Wifi - Settings
+ extern QSettings WifiSettings;
+ extern const char *WifiSettings_SSID;
+ extern const char *WifiSettings_MacAddress;
+ extern const char *WifiSettings_ConfPath;
+ extern const char *WifiSettings_Security_Types;
+ extern const char *WifiSettings_IPAddress;
+ extern const char *WifiSettings_Gateway;
+ extern const char *WifiSettings_SubnetMask;
+ extern const char *WifiSettings_DNS;
+ extern const char *WifiSettings_UseDHCP;
+
// Date and Time
extern const char *Date_Time_Set;
}