From 23717ec9b3b3e511a5ad7b89b2013cc7ccfe39db Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Wed, 15 May 2019 17:25:13 +0100 Subject: [PATCH] RMP: getBoolValue() doesn't need to have == 1 or != 1 --- Nasal/rmp.nas | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Nasal/rmp.nas b/Nasal/rmp.nas index 8cc18bd1..cb82cea1 100644 --- a/Nasal/rmp.nas +++ b/Nasal/rmp.nas @@ -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); } }