Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F60743684
cellulorobotwrapper.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, May 2, 08:09
Size
714 B
Mime Type
text/x-c
Expires
Sat, May 4, 08:09 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17391995
Attached To
R9807 cellulo-lua
cellulorobotwrapper.cpp
View Options
#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
Log In to Comment