RMP: getBoolValue() doesn't need to have == 1 or != 1
This commit is contained in:
parent
453fa34d6e
commit
23717ec9b3
1 changed files with 9 additions and 9 deletions
|
@ -70,37 +70,37 @@ var rmpUpdate = func() {
|
|||
|
||||
# SEL lights
|
||||
if (chan_rmp1_v == "vhf2" or chan_rmp1_v == "vhf3" or chan_rmp1_v == "hf1" or chan_rmp1_v == "hf2" or chan_rmp2_v == "vhf1" or chan_rmp2_v == "vhf3" or chan_rmp2_v == "hf1" or chan_rmp2_v == "hf2" or chan_rmp3_v == "vhf1" or chan_rmp3_v == "vhf2") {
|
||||
if (sel_light_rmp1.getBoolValue() != 1) {
|
||||
if (!sel_light_rmp1.getBoolValue()) {
|
||||
sel_light_rmp1.setBoolValue(1);
|
||||
}
|
||||
if (sel_light_rmp2.getBoolValue() != 1) {
|
||||
if (!sel_light_rmp2.getBoolValue()) {
|
||||
sel_light_rmp2.setBoolValue(1);
|
||||
}
|
||||
if (sel_light_rmp3.getBoolValue() != 1) {
|
||||
if (!sel_light_rmp3.getBoolValue()) {
|
||||
sel_light_rmp3.setBoolValue(1);
|
||||
}
|
||||
} else {
|
||||
if (sel_light_rmp1.getBoolValue() != 0) {
|
||||
if (sel_light_rmp1.getBoolValue()) {
|
||||
sel_light_rmp1.setBoolValue(0);
|
||||
}
|
||||
if (sel_light_rmp2.getBoolValue() != 0) {
|
||||
if (sel_light_rmp2.getBoolValue()) {
|
||||
sel_light_rmp2.setBoolValue(0);
|
||||
}
|
||||
if (sel_light_rmp3.getBoolValue() != 0) {
|
||||
if (sel_light_rmp3.getBoolValue()) {
|
||||
sel_light_rmp3.setBoolValue(0);
|
||||
}
|
||||
}
|
||||
|
||||
# Disable AM mode if not in HF
|
||||
if (chan_rmp1_v != "hf1" and chan_rmp1_v != "hf2" and am_mode_rmp1.getBoolValue() == 1) {
|
||||
if (chan_rmp1_v != "hf1" and chan_rmp1_v != "hf2" and am_mode_rmp1.getBoolValue()) {
|
||||
am_mode_rmp1.setBoolValue(0);
|
||||
}
|
||||
|
||||
if (chan_rmp2_v != "hf1" and chan_rmp2_v != "hf2" and am_mode_rmp2.getBoolValue() == 1) {
|
||||
if (chan_rmp2_v != "hf1" and chan_rmp2_v != "hf2" and am_mode_rmp2.getBoolValue()) {
|
||||
am_mode_rmp2.setBoolValue(0);
|
||||
}
|
||||
|
||||
if (chan_rmp3_v != "hf1" and chan_rmp3_v != "hf2" and am_mode_rmp3.getBoolValue() == 1) {
|
||||
if (chan_rmp3_v != "hf1" and chan_rmp3_v != "hf2" and am_mode_rmp3.getBoolValue()) {
|
||||
am_mode_rmp3.setBoolValue(0);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue