public async Task Initialize() { try { var i2Init = _i2CConnector.Initialize(); var spiInit = _spiConnector.Initialize(); await spiInit; await i2Init; var factory = new GeneralFactory(_i2CConnector, _spiConnector, _driverLogger); foreach (var foundGroupId in _spiConnector.GetFoundGroupIds()) { var board = factory.CreateNeuronBoard(foundGroupId); if (board == null) { continue; } _driverLogger.LogInformation(this, "Found Board " + board.BoardSystemInformation?.HardwareName + " on group " + foundGroupId); _boards.Add(board); } OnInitializationFinish?.Invoke(); } catch (Exception exception) { _driverLogger.LogException(this, exception); } }
public void InitializationFinish() { UiManager.StartNewGameSession(Environment.Session); OnInitializationFinish?.Invoke(Environment); SessionResume(); }