Beispiel #1
0
        public CurtainDevice(DeviceCreationInfo creationInfo)
            : base(new CurtainState(), creationInfo)
        {
            mService = (CurtainService)creationInfo.ServiceManager.GetService(typeof(CurtainService));

            CurtainState state = (CurtainState)mState;
            state.Channel = int.Parse(creationInfo.Configuration.channel);

            mVoiceName = creationInfo.Configuration.voiceName;

            /*
            // TOTO - Look into this in detail.
            // Somehow we're getting garbage in the first submission with MS serial implementation.
            // No issues in the previous python implementation, but required beefing up error handling on the arduino side as well
            // as adding an extra flush from the c# side.
            byte[] dummy = new byte[] { (byte)'\n' };
            mService.SendData(dummy);
             */
        }
Beispiel #2
0
        public CurtainDevice(DeviceCreationInfo creationInfo)
            : base(new CurtainState(), creationInfo)
        {
            mService = (CurtainService)creationInfo.ServiceManager.GetService(typeof(CurtainService));

            CurtainState state = (CurtainState)mState;

            state.Channel = int.Parse(creationInfo.Configuration.channel);

            mVoiceName = creationInfo.Configuration.voiceName;

/*
 *          // TOTO - Look into this in detail.
 *          // Somehow we're getting garbage in the first submission with MS serial implementation.
 *          // No issues in the previous python implementation, but required beefing up error handling on the arduino side as well
 *          // as adding an extra flush from the c# side.
 *          byte[] dummy = new byte[] { (byte)'\n' };
 *          mService.SendData(dummy);
 */
        }