Пример #1
0
 private void device_Dio5Changed(object sender, SX1276.IoChangedEventArgs e)
 {
 }
Пример #2
0
 private void LoadTestPage(SX1276 device)
 {
     try
     {
         if (!File.Exists(Application.StartupPath + "\\SemtechLib.Devices.SX1276.Test.dll"))
             return;
         Type type = Assembly.LoadFile(Application.StartupPath + "\\SemtechLib.Devices.SX1276.Test.dll").GetType("SemtechLib.Devices.SX1276.Test.Controls.TestTabPage");
         object instance = Activator.CreateInstance(type);
         type.InvokeMember("SuspendLayout", BindingFlags.Instance | BindingFlags.Public | BindingFlags.InvokeMethod, (Binder)null, instance, (object[])null);
         this.SuspendLayout();
         type.GetProperty("Location").SetValue(instance, (object)new Point(4, 22), (object[])null);
         type.GetProperty("Name").SetValue(instance, (object)"tabTest", (object[])null);
         type.GetProperty("Size").SetValue(instance, (object)new Size(799, 493), (object[])null);
         type.GetProperty("TabIndex").SetValue(instance, (object)6, (object[])null);
         type.GetProperty("Text").SetValue(instance, (object)"R&D Tests", (object[])null);
         type.GetProperty("UseVisualStyleBackColor").SetValue(instance, (object)true, (object[])null);
         type.GetProperty("SX1276").SetValue(instance, (object)device, (object[])null);
         this.tabControl1.Controls.Add((Control)instance);
         type.InvokeMember("ResumeLayout", BindingFlags.Instance | BindingFlags.Public | BindingFlags.InvokeMethod, (Binder)null, instance, new object[1]
     {
       (object) false
     });
         this.ResumeLayout(false);
     }
     catch (Exception ex)
     {
         this.OnError((byte)1, ex.Message);
     }
 }
Пример #3
0
 private void device_Dio0Changed(object sender, SX1276.IoChangedEventArgs e)
 {
     lock (syncThread)
     {
         if (!isPacketHandlerStarted || !e.State && !firstTransmit)
             return;
         firstTransmit = false;
         if (Mode == OperatingModeEnum.Tx)
         {
             OnPacketHandlerTransmitted();
             PacketHandlerTransmit();
         }
         else
         {
             if (Mode != OperatingModeEnum.Rx)
                 return;
             PacketHandlerReceive();
         }
     }
 }