public ProgramService( ILogger <ProgramService> logger, IOptions <RotaryLcdConfig> config, RotaryEncoderService rotaryEncoder, RotaryDisplayService rotaryDisplay ) { this.Logger = logger; this.Config = config.Value; this.RotaryEncoder = rotaryEncoder; this.RotaryDisplay = rotaryDisplay; }
public RotaryDisplayService( ILogger <ProgramService> logger, IOptions <RotaryLcdConfig> config, RotaryEncoderService rotaryEncoder, LcdService lcdService ) { this.Logger = logger; this.Config = config.Value; this.RotaryEncoder = rotaryEncoder; this.Lcd = lcdService.Lcd; this.RotaryEncoder.RotaryChangedEvent += this.OnRotaryChanged; this.Write(); }