示例#1
0
 public UIState()
 {
     FactorySettings = new KomahubFactorySettings();
     Status          = new KomahubStatus();
     Outputs         = new KomahubOutput[6];
     for (int i = 0; i < 6; i++)
     {
         Outputs[i]      = new KomahubOutput();
         Outputs[i].type = KomahubOutput.OutputType.OFF;
     }
 }
示例#2
0
        public KomahubFactorySettings readFactorySettings()
        {
            byte[] report = new byte[64];
            byte[] result = new byte[64];
            report[0] = KOMAHUB_MAGIC;
            report[1] = Commands.GetFactorySettings;
            lock (hubLock)
            {
                send(report);
                recv(result);
            }
            KomahubFactorySettings factorySettings = new KomahubFactorySettings();

            factorySettings.FirmwareVersion = (result[1] << 8) + result[0];
            factorySettings.SerialNumber    = (result[3] << 8) + result[2];
            return(factorySettings);
        }