mirror of
https://github.com/modelec/detection_adversaire.git
synced 2026-03-18 21:30:27 +01:00
re-clean
This commit is contained in:
@@ -14,7 +14,6 @@ void stop_loop(int) {
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace std::this_thread;
|
using namespace std::this_thread;
|
||||||
using namespace std::chrono_literals;
|
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
//TCP socket connection
|
//TCP socket connection
|
||||||
@@ -37,7 +36,6 @@ int main(int argc, char* argv[]) {
|
|||||||
op_result = drv->getHealth(healthinfo);
|
op_result = drv->getHealth(healthinfo);
|
||||||
if (SL_IS_OK(op_result)) {
|
if (SL_IS_OK(op_result)) {
|
||||||
localizer.setLidarHealth(true);
|
localizer.setLidarHealth(true);
|
||||||
localizer.sendMessage("strat", "ready", "1");
|
|
||||||
}
|
}
|
||||||
signal(SIGINT, stop_loop);
|
signal(SIGINT, stop_loop);
|
||||||
while(true){
|
while(true){
|
||||||
@@ -102,6 +100,8 @@ int main(int argc, char* argv[]) {
|
|||||||
drv->stop();
|
drv->stop();
|
||||||
drv->setMotorSpeed(0);
|
drv->setMotorSpeed(0);
|
||||||
drv->disconnect();
|
drv->disconnect();
|
||||||
|
} else {
|
||||||
|
localizer.sendMessage("strat", "set health", "0");
|
||||||
}
|
}
|
||||||
delete *channel;
|
delete *channel;
|
||||||
delete drv;
|
delete drv;
|
||||||
|
|||||||
Reference in New Issue
Block a user