From bf8deb005f2202abb8cb1c7c1962966de7f00890 Mon Sep 17 00:00:00 2001 From: Ciaran Fisher Date: Mon, 21 Mar 2022 09:47:21 +0100 Subject: [PATCH] Formatting --- .../Scripts/DCS-SimpleRadioStandalone.lua | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Scripts/DCS-SRS/Scripts/DCS-SimpleRadioStandalone.lua b/Scripts/DCS-SRS/Scripts/DCS-SimpleRadioStandalone.lua index c9774769b..98805f9bf 100644 --- a/Scripts/DCS-SRS/Scripts/DCS-SimpleRadioStandalone.lua +++ b/Scripts/DCS-SRS/Scripts/DCS-SimpleRadioStandalone.lua @@ -1343,32 +1343,32 @@ function SR.exportRadioUH1H(_data) local _panel = GetDevice(0) - local switch = _panel:get_argument_value(30) + local switch = _panel:get_argument_value(30) - if SR.nearlyEqual(switch, 0.1, 0.03) then - _data.selected = 0 - elseif SR.nearlyEqual(switch, 0.2, 0.03) then - _data.selected = 1 - elseif SR.nearlyEqual(switch, 0.3, 0.03) then - _data.selected = 2 - elseif SR.nearlyEqual(switch, 0.4, 0.03) then - _data.selected = 3 - else - _data.selected = -1 - end - - local _pilotPTT = SR.getButtonPosition(194) - if _pilotPTT >= 0.1 then - - if _pilotPTT == 0.5 then - -- intercom + if SR.nearlyEqual(switch, 0.1, 0.03) then _data.selected = 0 + elseif SR.nearlyEqual(switch, 0.2, 0.03) then + _data.selected = 1 + elseif SR.nearlyEqual(switch, 0.3, 0.03) then + _data.selected = 2 + elseif SR.nearlyEqual(switch, 0.4, 0.03) then + _data.selected = 3 + else + _data.selected = -1 end - _data.ptt = true - end + local _pilotPTT = SR.getButtonPosition(194) + if _pilotPTT >= 0.1 then + + if _pilotPTT == 0.5 then + -- intercom + _data.selected = 0 + end + + _data.ptt = true + end - _data.control = 1; -- Full Radio + _data.control = 1; -- Full Radio _data.capabilities = { dcsPtt = true, dcsIFF = true, dcsRadioSwitch = true, intercomHotMic = true, desc = "Hot mic on INT switch" }