Ejemplo n.º 1
0
        /// <summary>
        /// Send bytes to IR serial port to prevent issues with encoding of non ascii strings
        /// </summary>
        /// <param name="port">IROutputPort to extend</param>
        /// <param name="bytes">Byte array to send</param>
        /// <param name="count">Count ot bytes from array</param>
        public static void SendSerialData(this IROutputPort port, byte[] bytes, int count)
        {
            var str = string.Empty;

            for (var i = 0; i < count; i++)
            {
                str = str + (char)bytes[i];
            }
            port.SendSerialData(str);
        }
Ejemplo n.º 2
0
        void Buttons(int button, bool push)
        {
            if (push)
            {
                switch (button)
                {
                case 1:
                {
                    IR1.GetStandardCmdFromIRCmd("On");

                    IR1.SendSerialData("1");

                    break;
                }
                }
            }
        }
 private static void SendIRSerial(string message)
 {
     _IROutputPort.SendSerialData("Hello");
 }