end
self.MASCommTimer.EventHandler = function ()
if self.data == "" and not self.sock.IsConnected then
if self:ControlCheck(self.cur1,Controls.Inputs[1].Value) then
self.cur1 = Controls.Inputs[1].Value
data = string.format("SET Ch1MicGain %d\x0d",math.floor( self.cur1 * 72)-60)
self:send(data)
elseif self:ControlCheck(self.cur2,Controls.Inputs[2].Value) then
self.cur2 = Controls.Inputs[2].Value
if(self.cur2 > 0.5) then
data = "SET Ch1MicMute on\x0d"
else
data = "SET Ch1MicMute off\x0d"
end
self:send(data)
elseif self:ControlCheck(self.cur3,Controls.Inputs[3].Value) then
self.cur3 = Controls.Inputs[3].Value
if(self.cur3 > 0.5) then
data = "SET MicActive on\x0d"
self.cur1 = -999
self.cur2 = -999
else
data = "SET MicActive off\x0d"
end
self:send(data)
end
end
end
self.MASCommTimer:Start(0.25)
end
-----------------------------
MASNo1 = MASComm.new()
MASNo1.ipaddr = "192.168.2.17"
MASNo1:start()
123