void DevicesConfigurationWidget::selectRobotModel(RobotModelInterface &robotModel)
{
	if (mCurrentModelType == robotModel.name() && mCurrentModelId == robotModel.robotId()) {
		return;
	}

	mCurrentModelType = robotModel.name();
	mCurrentModelId = robotModel.robotId();
	takeWidget();
	if (mRobotModels.contains(mCurrentModelType)) {
		setWidget(mRobotModelConfigurers[mCurrentModelType]);
		refresh();
	}
}
Exemple #2
0
TwoDRobotModel::TwoDRobotModel(const RobotModelInterface &realModel)
	: CommonRobotModel(realModel.kitId(), realModel.robotId())
	, mRealModel(&realModel)
	, mEngine(nullptr)
{
	for (const PortInfo &port : realModel.availablePorts()) {
		if (!port.name().toLower().contains("gamepad")) {
			addAllowedConnection(port, realModel.allowedDevices(port));
		}
	}

	addAllowedConnection(PortInfo("MarkerPort", output), { markerInfo() });
}