Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problem with autoconfiguration #1540

Merged
merged 1 commit into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <kitBase/blocksBase/robotsBlock.h>
#include <kitBase/robotModel/robotModelInterface.h>
#include <kitBase/robotModel/robotParts/motor.h>

using namespace interpreterCore::interpreter::details;
using namespace qReal;
Expand Down Expand Up @@ -50,7 +51,7 @@ bool Autoconfigurer::configure(QList<qReal::Id> const &diagrams, const QString &
for (const PortInfo &port : usedDevices.keys()) {
const DeviceInfo device = usedDevices[port];
const DeviceInfo existingDevice = currentConfiguration(robotId, port);
if (existingDevice.isA(device)) {
if (device.isA<robotParts::Motor>() || existingDevice.isA(device)) {
// Do nothing
} else if (!mLogicalModelApi.mutableLogicalRepoApi()
.metaInformation("twoDModelSensorsReadOnly").toBool() && existingDevice.isNull()) {
Expand Down
2 changes: 1 addition & 1 deletion qrtranslations/fr/plugins/robots/interpreterCore_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@
<translation>temps</translation>
</message>
<message>
<location filename="../../../../plugins/robots/interpreters/interpreterCore/src/interpreter/details/autoconfigurer.cpp" line="+57"/>
<location filename="../../../../plugins/robots/interpreters/interpreterCore/src/interpreter/details/autoconfigurer.cpp" line="+58"/>
<source>%2 has been auto configured to port %1</source>
<translation type="unfinished"></translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion qrtranslations/ru/plugins/robots/interpreterCore_ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
<translation>Файл сохранения TRIK Studio (*.qrs)</translation>
</message>
<message>
<location filename="../../../../plugins/robots/interpreters/interpreterCore/src/interpreter/details/autoconfigurer.cpp" line="+57"/>
<location filename="../../../../plugins/robots/interpreters/interpreterCore/src/interpreter/details/autoconfigurer.cpp" line="+58"/>
<source>%2 has been auto configured to port %1</source>
<translation>%2 был автоматически сгонфигурирован на порту %1</translation>
</message>
Expand Down