Ejemplo n.º 1
0
        //trying to make this method multi-threaded, will return to this later.
        public void flashLED(ControllerLEDEnum LightId, int numberOfTimes)
        {
            FlashLEDParams inputParams  = new FlashLEDParams(LightId, numberOfTimes);
            Thread         workerThread = new Thread(this.flashLED_worker);

            //workerThread.Start(inputParams);
            flashLED_helper(LightId, numberOfTimes);
        }
Ejemplo n.º 2
0
        //used when creating thread
        private void flashLED_worker(object input)
        {
            FlashLEDParams    parameters    = (FlashLEDParams)input;
            int               numberOfTimes = parameters.numberOfTimes;
            ControllerLEDEnum LightId       = parameters.LightId;

            flashLED_helper(LightId, numberOfTimes);
        }