Exemplo n.º 1
0
 private void ParamsChangeEvent(int RigNumber, int Params)
 {
     if (RigNumber != 1 && RigNumber != 2)
     {
         return;
     }
     Console.WriteLine(String.Format("Param: {0}", Params));
     RigState rigState = GetRigState(RigNumber);
     var      json     = JsonConvert.SerializeObject(rigState);
 }
Exemplo n.º 2
0
        public void SetRigState(int rigNum, RigState state)
        {
            var rigs = Rigs.Instance;

            RigX[rigNum].Freq  = state.Freq;
            RigX[rigNum].FreqA = state.FreqA;
            RigX[rigNum].FreqB = (int)state.FreqB;

            if (state.Mode != null)
            {
                RigX[rigNum].Mode = (RigParamX)OmniMapping.StringToParam(state.Mode);
            }


            RigX[rigNum].Pitch = state.Pitch;

            if (state.Rit != null)
            {
                RigX[rigNum].Rit = (RigParamX)OmniMapping.StringToParam(state.Rit);
            }

            RigX[rigNum].RitOffset = state.RitOffset;

            if (state.Split != null)
            {
                RigX[rigNum].Split = (RigParamX)OmniMapping.StringToParam(state.Split);
            }

            if (state.Vfo != null)
            {
                RigX[rigNum].Vfo = (RigParamX)OmniMapping.StringToParam(state.Vfo);
            }

            if (state.Xit != null)
            {
                RigX[rigNum].Xit = (RigParamX)OmniMapping.StringToParam(state.Xit);
            }
        }