Skip to content

Commit

Permalink
better naming
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Jul 14, 2024
1 parent 65cfc72 commit 1574894
Show file tree
Hide file tree
Showing 10 changed files with 216 additions and 231 deletions.
8 changes: 4 additions & 4 deletions app/telemetry/settings/mavlinksettingsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void MavlinkSettingsModel::try_refetch_all_parameters_async(bool log_result)
set_has_params_fetched(true);
}else{
if(log_result){
QOpenHD::instance().show_toast("Fetch all parameters failed, is your uplink working ? Use the status view for more info..",true);
QOpenHD::instance().show_toast("Fetch all parameters failed",true);
}
}
m_is_currently_busy=false;
Expand Down Expand Up @@ -240,7 +240,7 @@ QString MavlinkSettingsModel::try_update_parameter_int(const QString param_id,in
return ss.str().c_str();
}
if(result==SetParamResult::NO_CONNECTION){
return "Update failed,please try again";
return "Update failed,try again";
}
return "Update failed, unknown error";
}
Expand All @@ -261,7 +261,7 @@ QString MavlinkSettingsModel::try_update_parameter_string(const QString param_id
return ss.str().c_str();
}
if(result==SetParamResult::NO_CONNECTION){
return "Update failed,please try again";
return "Update failed,try again";
}
return "Update failed, unknown error";
}
Expand Down Expand Up @@ -551,7 +551,7 @@ MavlinkSettingsModel::ParamStringEnum MavlinkSettingsModel::string_param_get_enu
QString MavlinkSettingsModel::get_warning_before_safe(const QString param_id)
{
if(param_id=="V_OS_CAM_CONFIG"){
return "WARNING: Changing this parameter will perform some special operations and then automatically reboot the air pi after a 3second delay";
return "WARNING: Changing this parameter will reboot the Air Unit";
}
return "";
}
Expand Down
2 changes: 1 addition & 1 deletion app/util/qopenhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class QOpenHD : public QObject
// Tries to mimic android toast as much as possible
//
Q_INVOKABLE void show_toast(QString message,bool long_toast=false);
L_RO_PROP(QString,version_string,set_version_string,"2.6.0-evo");
L_RO_PROP(QString,version_string,set_version_string,"2.6.1-evo");
//
// Shows a message popup to the user that needs to be clicked away - use sparingly
//
Expand Down
2 changes: 1 addition & 1 deletion package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ elif [[ "${PACKAGE_ARCH}" = "arm64" ]]; then
cp rock_qt_eglfs_kms_config.json /tmp/qopenhd/usr/local/share/qopenhd/ || exit 1
fi

VERSION="2.6.0-$(date -d '+1 hour' +'%m-%d-%Y--%H-%M-%S')-${VER2}"
VERSION="2.6.1-$(date -d '+1 hour' +'%m-%d-%Y--%H-%M-%S')-${VER2}"

ls -a ${TMPDIR}/usr/local/bin
echo "going into packaging stage"
Expand Down
41 changes: 11 additions & 30 deletions qml/ui/configpopup/qopenhd_settings/AppDevSettingsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ ScrollView {
anchors.right: parent.right
//
SettingBaseElement{
m_short_description: "DEV_SHOW_WHITELISTED_PARAMS"
m_long_description: "Enabling this gives you full controll over the mavlink parameters set openhd exposes (both air and ground) BUT BE WARNED yu can easily break things!"
m_short_description: "Enable advanced settings"
Switch {
width: 32
height: elementHeight
Expand All @@ -39,26 +38,14 @@ ScrollView {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
checked: settings.dev_show_whitelisted_params
onCheckedChanged: settings.dev_show_whitelisted_params = checked
}
}
SettingBaseElement{
m_short_description:"DEV_SHOW_ADVANCED_BUTTON"
m_long_description: "Allows more customization of the mavlink parameters set than what openhd exposes, BE WARNED you can easily break things this way !"
Switch {
width: 32
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36

anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
checked: settings.dev_show_advanced_button
onCheckedChanged: settings.dev_show_advanced_button = checked
onCheckedChanged: {
settings.dev_show_whitelisted_params = checked
settings.dev_show_advanced_button = checked
}
}
}
SettingBaseElement{
m_short_description:"dev_allow_freq_change_when_armed"
m_long_description: "Allows changing the frequency and channel width while armed, THIS CAN BREAK YOUR LINK DURING FLIGHT !"
m_short_description:"Allow frequency change when armed"
Switch {
width: 32
height: elementHeight
Expand All @@ -71,8 +58,7 @@ ScrollView {
}
}
SettingBaseElement{
m_short_description:"dev_show_5180mhz_lowband"
m_long_description: "Shows the 5180Mhz, 5200Mhz and 5220Mhz channels by default (NOTE: These channels are rarely free)"
m_short_description:"Show all wifi channels"
Switch {
width: 32
height: elementHeight
Expand All @@ -85,8 +71,7 @@ ScrollView {
}
}
SettingBaseElement{
m_short_description:"dev_disable_autofetch_params"
m_long_description: "Disables automatic fetching of the air / ground openhd param set(s)"
m_short_description:"Disable auto fetch"
Switch {
width: 32
height: elementHeight
Expand Down Expand Up @@ -124,7 +109,7 @@ ScrollView {
}
SettingBaseElement{
m_short_description: "Load Settings from file"
m_long_description: "Load a previosuly backed up QOpenHD settings file (e.g. OSD layout,..) from your SD card. Only works from/to linux."
m_long_description: "Load a previosly backed up QOpenHD settings file (e.g. OSD layout,..) from your SD card. Only works from/to linux."

Button {
id:load
Expand All @@ -148,7 +133,6 @@ ScrollView {
}
SettingBaseElement{
m_short_description: "Reset all QOpenHD Settings"
m_long_description: "Reset all QOpenHD Settings (e.g. OSD layout,...). Does not reset your openhd settings on the air or ground unit. Only works from/to linux."

Button {
id:reset
Expand All @@ -167,7 +151,6 @@ ScrollView {
}
SettingBaseElement{
m_short_description: "Enable audio playback"
m_long_description: "Enable live audio playback in QOpenHD, NOTE: audio streaming is not supported in OpenHD yet. Requires restart of QOpenHD."

Switch {
width: 32
Expand All @@ -181,8 +164,7 @@ ScrollView {
}
}
SettingBaseElement{
m_short_description: "dirty_enable_inav_hacks"
m_long_description: "NEVER ENABLE UNLESS YOU HAVE TO. INAV mavlink support is quirky in some ways to say the least."
m_short_description: "Improve Inav support"

Switch {
width: 32
Expand All @@ -196,8 +178,7 @@ ScrollView {
}
}
SettingBaseElement{
m_short_description: "dev_wb_show_no_stbc_enabled_warning"
m_long_description: "Do not show the STBC recommended enabled message"
m_short_description: "Disable STBC warning"
Switch {
width: 32
height: elementHeight
Expand Down
38 changes: 6 additions & 32 deletions qml/ui/configpopup/qopenhd_settings/AppGeneralSettingsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ ScrollView {
anchors.right: parent.right

SettingBaseElement{
m_short_description: "Enable speech"
m_long_description: "Enable text to speech - events like flight mode change are given as audio messages"
m_short_description: "Enable text to speech"

Switch {
width: 32
Expand All @@ -44,7 +43,7 @@ ScrollView {
}

SettingBaseElement{
m_short_description: "Imperial units"
m_short_description: "Use Imperial units"

Switch {
width: 32
Expand All @@ -64,7 +63,7 @@ ScrollView {
color: (Positioner.index % 2 == 0) ? "#8cbfd7f3" : "#00000000"

Text {
text: qsTr("Animation Smoothing,0 to disable")
text: qsTr("Animation Smoothing")
font.weight: Font.Bold
font.pixelSize: 13
anchors.leftMargin: 8
Expand Down Expand Up @@ -129,7 +128,7 @@ ScrollView {
}

SettingBaseElement{
m_short_description: "Language / Locale"
m_short_description: "Language"

LanguageSelect {
id: languageSelectBox
Expand All @@ -143,31 +142,6 @@ ScrollView {
}

// exp
SettingBaseElement{
m_short_description: "N Cameras to controll"

SpinBox {
id: dev_qopenhd_n_cameras_spinbox
height: elementHeight
width: 210
font.pixelSize: 14
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
from: 1
to: 2
stepSize: 1
anchors.rightMargin: Qt.inputMethod.visible ? 78 : 18

value: settings.dev_qopenhd_n_cameras
onValueChanged: {
var actually_changed=settings.dev_qopenhd_n_cameras!=value
settings.dev_qopenhd_n_cameras = value
if(actually_changed){
_restartqopenhdmessagebox.show()
}
}
}
}
SettingBaseElement{
m_short_description: "Mavlink sys id"
m_long_description: "Mavlink sys id of QOpenHD (this Ground control station application). Leave default (255) ! . Change requires restart."
Expand Down Expand Up @@ -195,7 +169,7 @@ ScrollView {
}
}
SettingBaseElement{
m_short_description: "Hide identity offset lattitude"
m_short_description: "Latitude GPS offset"
m_long_description: "Set this to a random value only you know to hide lat identity"

/*SpinBox {
Expand Down Expand Up @@ -235,7 +209,7 @@ ScrollView {

}
SettingBaseElement{
m_short_description: "Hide identity offset longitude"
m_short_description: "Longitude GPS offset"
m_long_description: "Set this to a random value only you know to hide lon identity"

XDecimalSpinBox{
Expand Down
59 changes: 25 additions & 34 deletions qml/ui/configpopup/qopenhd_settings/AppScreenSettingsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ ScrollView {

SettingBaseElement{
m_short_description: "Screen Scale"
m_long_description: "Increase OSD elements and text size, requires restart of QOpenHD"
Text {
text: Number(settings.global_scale).toLocaleString(Qt.locale(), 'f', 1) + "x";
font.pixelSize: 16
Expand Down Expand Up @@ -67,8 +66,7 @@ ScrollView {
}
}
SettingBaseElement{
m_short_description: "Cursor AutoHide"
m_long_description: "Automatically hide cursor on inactivity"
m_short_description: "Auto hide cursor"

Switch {
width: 32
Expand All @@ -87,8 +85,7 @@ ScrollView {
}
}
SettingBaseElement{
m_short_description: "Custom cursor"
m_long_description: "Customize cursor for high visibility in the field"
m_short_description: "Set cursor Skin"
SpinBox {
width: 210
font.pixelSize: 14
Expand All @@ -108,8 +105,7 @@ ScrollView {
}
}
SettingBaseElement{
m_short_description: "Custom cursor scale"
m_long_description: "Scale of your custom cursor. NOTE: Only works if custom cursor is not 0 !"
m_short_description: "Cursor Scale"

SpinBox {
width: 210
Expand All @@ -130,12 +126,11 @@ ScrollView {
}
}
SettingsCategory{
m_description: "ADVANCED USERS ONLY"
m_description: "Advanced settings"
m_hide_elements: true

SettingBaseElement{
m_short_description: "Screen rotation"
m_long_description: "Rotate QOpenHD, can be usefull if your screen is installed the wrong way around. Might or might not work."
// anything other than 0 and 180 can breaks things
ComboBox {
height: elementHeight
Expand Down Expand Up @@ -166,8 +161,7 @@ ScrollView {
}
}
SettingBaseElement{
m_short_description: "Background transparent"
m_long_description: "Use a transparent surface, such that another application can play (hw composer accelerated) video behind the QOpenHD surface."
m_short_description: "Transparent Background"

Switch {
width: 32
Expand All @@ -181,8 +175,7 @@ ScrollView {
}
}
SettingBaseElement{
m_short_description: "Force full screen"
m_long_description: "Force Full screen if QOpenHD is not already full screen"
m_short_description: "Full screen"

Switch {
width: 32
Expand Down Expand Up @@ -211,30 +204,28 @@ ScrollView {
}
}

SettingBaseElement{
m_short_description: "Settings window size"
m_long_description: "Change the size of the settings window, such that you can view the live video while changing settings"
// SettingBaseElement{
// m_short_description: "Settings window scale"

SpinBox {
width: 210
font.pixelSize: 14
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
// SpinBox {
// width: 210
// font.pixelSize: 14
// height: elementHeight
// anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
// anchors.right: parent.right
// anchors.verticalCenter: parent.verticalCenter

from: 50
to: 100
stepSize: 1
value: settings.screen_settings_overlay_size_percent
onValueChanged: {
settings.screen_settings_overlay_size_percent = value
}
}
}
// from: 50
// to: 100
// stepSize: 1
// value: settings.screen_settings_overlay_size_percent
// onValueChanged: {
// settings.screen_settings_overlay_size_percent = value
// }
// }
// }
SettingBaseElement{
m_short_description: "Settings window transparency"
m_long_description: "make the openhd parameters window semi-transparent"
m_short_description: "Transparent settings"

Switch {
width: 32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ ScrollView {

SettingBaseElement{
m_short_description: "Show FC Messages in HUD"
m_long_description: "When enabled, FC log messages are shown in the HUD log messages element,e.g. they might apear before,during and after flight"
Switch {
width: 32
height: elementHeight
Expand Down
Loading

0 comments on commit 1574894

Please sign in to comment.