File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
plugins/robots/generators/generatorBase/src Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -425,8 +425,15 @@ QString GeneratorFactoryBase::isrHooksCode()
425425QMap<PortInfo, DeviceInfo> GeneratorFactoryBase::currentConfiguration () const
426426{
427427 auto worldModel = mRepo .metaInformation (" worldModel" ).toString ();
428- const auto id = mRobotModelManager .model ().robotId ();
429- auto robotConfig = RobotModelUtils::deserializeFromWorldModel (worldModel)[id];
428+ const auto curId = mRobotModelManager .model ().robotId ();
429+ auto robotsConfig = RobotModelUtils::deserializeFromWorldModel (worldModel);
430+ QMap<PortInfo, DeviceInfo> robotConfig;
431+ for (const auto &id : robotsConfig.keys ()) {
432+ if (id.startsWith (curId.left (3 ))) {
433+ robotConfig = robotsConfig[id];
434+ break ;
435+ }
436+ }
430437 // At the moment we have sensors configuration from widget-configurer. We must also add here non-configurable
431438 // by user devices (like encoders, displays and so on).
432439 for (const PortInfo &port : mRobotModelManager .model ().availablePorts ()) {
You can’t perform that action at this time.
0 commit comments