Skip to content
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 @@ -70,6 +70,7 @@ class TrikBrick final : public trikControl::BrickInterface
public slots:
void configure(const QString &, const QString &) override {}
void playSound(const QString &) override {}
void playTone(int, int msDuration) override;
void say(const QString &msg) override;
void stop() override;
trikControl::MotorInterface *motor(const QString &port) override;
Expand All @@ -95,7 +96,6 @@ public slots:
trikControl::FifoInterface *fifo(const QString &) override {return nullptr;}
trikControl::I2cDeviceInterface *i2c(int, int) override {return nullptr;}

void playTone(int, int) override {}
QVector<uint8_t> getStillImage() override;
trikControl::EventDeviceInterface *eventDevice(const QString &) override {return nullptr;}
void stopEventDevice(const QString &) override {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ void TrikBrick::say(const QString &msg) {
QMetaObject::invokeMethod(sh, [sh, msg](){sh->say(msg);});
}

void TrikBrick::playTone(int, int msDuration) {
auto* robot = mTwoDRobotModel.data();
QMetaObject::invokeMethod(robot, [robot, msDuration](){robot->engine()->playSound(msDuration);});
}

void TrikBrick::stop() {
/// @todo: properly implement this?
mTwoDRobotModel->stopRobot();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
</message>
<message>
<location line="-30"/>
<location line="+262"/>
<location line="+267"/>
<source>Trying to read from file %1 failed</source>
<translation type="unfinished"></translation>
</message>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
</message>
<message>
<location line="-30"/>
<location line="+262"/>
<location line="+267"/>
<source>Trying to read from file %1 failed</source>
<translation>Не удалось открыть файл %1</translation>
</message>
Expand Down