Ejemplo n.º 1
0
        void Start()
        {
            // Get instance of logger.
            logger = FindObjectOfType <LoggerObject>();
            // Setup Listener.
            MQTTChannel <MSG> channel = new MQTTChannel <MSG>(string.Format("{0}/Data", settings.deviceName));

            channel.Event.AddListener(OnMessage);
            // Start treadmill.
            statusChannel = new MQTTChannel <StatusMsg>(string.Format("{0}/Status", settings.deviceName), false);
            statusChannel.Send(new StatusMsg()
            {
                status = true
            });
            // Create smooth buffer
            smoothBuffer = new ValueBuffer(GetBufferSize(settings.inputSmooth), true);
            // Setup tracking of settings changes.
            logSettings = new KeySphericalSettings();
            LogSphericalSettings();
        }
Ejemplo n.º 2
0
 void OnEnable()
 {
     // Get instance of logger.
     logger = FindObjectOfType <LoggerObject>();
 }