fun configureManagers() { powerManager = NcePowerManager(this) InstanceManager.store(powerManager, PowerManager::class.java) turnoutManager = NceTurnoutManager(getNceTrafficController(), getSystemPrefix()) InstanceManager.setTurnoutManager(turnoutManager) lightManager = NceLightManager(getNceTrafficController(), getSystemPrefix()) InstanceManager.setLightManager(lightManager) sensorManager = NceSensorManager(getNceTrafficController(), getSystemPrefix()) InstanceManager.setSensorManager(sensorManager) throttleManager = NceThrottleManager(this) InstanceManager.setThrottleManager(throttleManager) if (getNceUsbSystem() !== NceTrafficController.USB_SYSTEM_NONE) { if (getNceUsbSystem() !== NceTrafficController.USB_SYSTEM_POWERHOUSE) { } } else { InstanceManager.setProgrammerManager(getProgrammerManager()) } clockManager = NceClockControl(getNceTrafficController(), getSystemPrefix()) InstanceManager.addClockControl(clockManager) consistManager = NceConsistManager(this) InstanceManager.setConsistManager(consistManager) }
Configure the common managers for NCE connections . This puts the common manager config in one place .