public void SetLeds(HandPositions hand, uint[] positions, ZF10LedColor color) { try { int leds = 0; foreach (uint position in positions) { leds += GetLed(hand, position); } leds += (int)color; base.setDeviceProperty(PropertyType.FG_LEDS, leds); } catch (Exception e) { Trace.TraceError(e.ToString()); } }
public void SetAllFingerLeds(ZF10LedColor color) { try { int leds = (int)ZF10MultiLed.LEFT_LITTLE; leds += (int)ZF10MultiLed.LEFT_RING; leds += (int)ZF10MultiLed.LEFT_MIDDLE; leds += (int)ZF10MultiLed.LEFT_INDEX; leds += (int)ZF10MultiLed.LEFT_THUMB; leds += (int)ZF10MultiLed.RIGHT_THUMB; leds += (int)ZF10MultiLed.RIGHT_INDEX; leds += (int)ZF10MultiLed.RIGHT_MIDDLE; leds += (int)ZF10MultiLed.RIGHT_RING; leds += (int)ZF10MultiLed.RIGHT_LITTLE; leds += (int)color; base.setDeviceProperty(PropertyType.FG_LEDS, leds); } catch (Exception e) { Trace.TraceError(e.ToString()); } }