Skip to content

Commit

Permalink
sidebar stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Nov 26, 2024
1 parent 4984cd3 commit 36037f1
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 33 deletions.
36 changes: 17 additions & 19 deletions qml/ui/sidebar/MavlinkChoiceElement.qml
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,21 @@ BaseJoyEditElement{
ListElement {value: 200; verbose:"200%"}
}
ListModel{
id: elements_model_saturation
ListElement {value: 50; verbose:"50%"}
ListElement {value: 75; verbose:"75%"}
ListElement {value: 90; verbose:"90%"}
ListElement {value: 100; verbose:"100%\n(Default)"}
ListElement {value: 110; verbose:"110%"}
ListElement {value: 125; verbose:"125%"}
ListElement {value: 150; verbose:"150%"}
id: elements_model_exposure
ListElement {value: -3; verbose:"-3"}
ListElement {value: -2; verbose:"-2"}
ListElement {value: -1; verbose:"-1"}
ListElement {value: 0; verbose:"0"}
ListElement {value: 1; verbose:"+1%"}
ListElement {value: 2; verbose:"+2"}
ListElement {value: 3; verbose:"+3"}
}
ListModel{
id: elements_model_contrast
ListElement {value: 50; verbose:"50%"}
ListElement {value: 75; verbose:"75%"}
ListElement {value: 90; verbose:"90%"}
ListElement {value: 100; verbose:"100%\n(Default)"}
ListElement {value: 125; verbose:"125%"}
ListElement {value: 150; verbose:"150%"}
id: elements_model_metering
ListElement {value: "centre"; verbose:"center"}
ListElement {value: "spot"; verbose:"spot"}
ListElement {value: "matrix"; verbose:"matrix"}

}
ListModel{
id: elements_model_sharpness
Expand Down Expand Up @@ -152,10 +150,10 @@ BaseJoyEditElement{
function get_model(){
if(m_param_id=="BRIGHTNESS"){
return elements_model_brightness;
}else if(m_param_id=="SATURATION"){
return elements_model_saturation;
}else if(m_param_id=="CONTRAST"){
return elements_model_contrast;
}else if(m_param_id=="EXPOSURE"){
return elements_model_exposure;
}else if(m_param_id=="METERING"){
return elements_model_metering;
}else if(m_param_id=="SHARPNESS"){
return elements_model_sharpness;
}else if(m_param_id=="ROTATION"){
Expand Down
9 changes: 5 additions & 4 deletions qml/ui/sidebar/MavlinkChoiceElement2.qml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ BaseJoyEditElement2{
}

function open_choices_menu(clickable){
if(!m_param_exists){
_qopenhd.show_toast("N/A");
return;
}
// if(!m_param_exists){
// _qopenhd.show_toast("N/A");
// return;
// }
if(m_settings_model.ui_is_busy){
_qopenhd.show_toast("Busy, please try again later");
return;
Expand Down Expand Up @@ -143,6 +143,7 @@ BaseJoyEditElement2{
}
if(m_param_id==mPARAM_ID_FREQUENCY_SCAN){
m_param_exists=true;
_wbLinkSettingsHelper.change_param_air_and_ground_frequency(value_new)
}
if(!m_param_exists){
console.log("Param "+m_param_id+" does not exist");
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/sidebar/Panel1Link.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SideBarBasePanel{


function takeover_control(){
edit_frequency_element.takeover_control();
scan_frequency_element.takeover_control();
}

Column {
Expand Down
18 changes: 9 additions & 9 deletions qml/ui/sidebar/Panel3Camera.qml
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,28 @@ SideBarBasePanel{
sidebar.regain_control_on_sidebar_stack()
}
onGoto_next: {
saturation.takeover_control();
exposure.takeover_control();
}
}
MavlinkChoiceElement2{
id: saturation
m_title: "Saturation"
m_param_id: "SATURATION"
id: exposure
m_title: "Exposure"
m_param_id: "EXPOSURE"
m_settings_model: _airCameraSettingsModel
onGoto_previous: {
brightness.takeover_control();
}
onGoto_next: {
contrast.takeover_control();
metering.takeover_control();
}
}
MavlinkChoiceElement2{
id: contrast
m_title: "Contrast"
m_param_id: "CONTRAST"
id: metering
m_title: "Metering"
m_param_id: "METERING"
m_settings_model: _airCameraSettingsModel
onGoto_previous: {
saturation.takeover_control();
exposure.takeover_control();
}
onGoto_next: {
sharpness.takeover_control();
Expand Down

0 comments on commit 36037f1

Please sign in to comment.