示例#1
0
        private static void Lirc2ProntoTest()
        {
            int[] raw = new int[]
            {
                //1000, 2400,  600,  600, 600, 1200,  600, 1200,  600, 1200,
                // 600,  600,  600, 1200, 600,  600,  600,  600,  600, 1200,
                // 600,  600,  600, 1200, 600, 1200,  600, 1200,  600,  600,
                // 600,  600,  600, 1200, 600,  600,  600,  600,  600, 1200,
                // 600,  600,  25350

                9024, 4512, 564, 564, 564, 564, 564, 564, 564, 564,
                564, 564, 564, 564, 564, 564, 564, 564, 564, 1692,
                564, 1692, 564, 1692, 564, 1692, 564, 1692, 564, 1692,
                564, 564, 564, 1692, 564, 564, 564, 1692, 564, 564,
                564, 564, 564, 564, 564, 564, 564, 564, 564, 564,
                564, 1692, 564, 564, 564, 1692, 564, 1692, 564, 1692,
                564, 1692, 564, 1692, 564, 1692, 564, 40884
            };
            double frequency = 38.3;

            var result = Signals.Lirc2Pronto(raw, frequency);

            var bStr = Signals.ProntoBytes2String(result);

            Debug.WriteLine(bStr);

            var res2    = Signals.Lirc2Broadlink(raw);
            var reverse = Signals.Broadlink2Lirc(res2);
            var res3    = Signals.Lirc2Broadlink(reverse);

            var a = 1;
        }
示例#2
0
        /// <summary>
        /// Send Data from Pronto bytes
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        public async Task <bool> SendPronto(byte[] data)
        {
            var raw   = Signals.Pronto2Lirc(data);
            var bytes = Signals.Lirc2Broadlink(raw);

            //Xb.Util.Out(BitConverter.ToString(broadlinkBytes));
            return(await this.SendData(bytes));
        }