Page MenuHomec4science

cellulorobotwrapper.cpp
No OneTemporary

File Metadata

Created
Fri, Mar 29, 09:34

cellulorobotwrapper.cpp

#include "cellulorobotwrapper.h"
void CelluloRobotWrapper::deinit_() {
robot->deleteLater();
}
void CelluloRobotWrapper::init_() {
if(robot == nullptr)
robot = new Cellulo::CelluloBluetooth();
connect(robot, &Cellulo::CelluloBluetooth::kidnappedChanged, this, &CelluloRobotWrapper::kidnappedChanged);
qDebug() << "Object created";
}
CelluloRobotWrapper::CelluloRobotWrapper()
{
this->robot = nullptr;
}
CelluloRobotWrapper::CelluloRobotWrapper(Cellulo::CelluloBluetooth *robot)
{
this->robot = robot;
}
void CelluloRobotWrapper::kidnappedChanged()
{
qDebug() << "Kidnapped is now " << robot->getKidnapped();
if(kidnappedCallback) {
kidnappedCallback();
}
}

Event Timeline