private void DisplayField() { if (_index >= _fields.Length) { _index = 0; } if (_index < 0) { _index = _fields.Length - 1; } var stringLength = Math.Max(_fields[_index].Name.Length, _fields[_index].Value.Length); if (_colIndex > (stringLength - 16)) { _colIndex = 0; } Log.Debug("Writing Index={Index}, Name={Name}, Value={Value}", _index, _fields[_index].Name, _fields[_index].Value); _device.SetLcdContents(GetLineText(_fields[_index].Name), GetLineText(_fields[_index].Value)); }
public int Run(LcdDevice device, SetContentsOptions opts) { device.SetLcdContents(opts.One, opts.Two); return(0); }