public string CheckForErrors() { string goodOutput = ""; string badOutput = ""; for (int i = 1; i <= Sensor.Count; i++) { Sensor.Information info = Sensor.Get((Sensor.Type)i); if (info == null) { continue; } goodOutput += info.active && info.available ? "\n\t" + info.description : ""; badOutput += info.active && !info.available ? "\n\t" + info.description : ""; } return("From the sensors needed for this scene, your device: \n" + "supports: " + goodOutput + "\n"); // + // "not supports: " + badOutput; }
protected override void AwakeDevice() { // get all sensor informations (including whether they are available) for (var i = 1; i < 12; i++) { // fill the sensor information array Type sensorType = (Type)i; Sensors[i] = new Sensor.Information( IsSensorAvailable(sensorType), GetMaximumRange(sensorType), GetMinDelay(sensorType), GetName(sensorType), GetPower(sensorType), GetResolution(sensorType), GetVendor(sensorType), GetVersion(sensorType), Description[i]); Sensors [i].gotFirstValue = true; } base.AwakeDevice(); }
protected override void AwakeDevice() { // get all sensor informations (including whether they are available) for (var i = 1; i <= Sensor.Count; i++) { // fill the sensor information array Type sensorType = (Type) i; Sensors[i] = new Sensor.Information( IsSensorAvailable(sensorType), GetMaximumRange(sensorType), GetMinDelay(sensorType), GetName(sensorType), GetPower(sensorType), GetResolution(sensorType), GetVendor(sensorType), GetVersion(sensorType), Description[i]); Sensors [i].gotFirstValue = true; } base.AwakeDevice(); }