mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 13:16:34 +00:00
Added sendData function call to remote main.
Commented out more things that are currently not needed.
This commit is contained in:
@@ -13,13 +13,18 @@
|
||||
#include <random>
|
||||
#endif
|
||||
|
||||
RemoteControl::RemoteControl() {}
|
||||
RemoteControl::RemoteControl()
|
||||
{
|
||||
createNamedPipe();
|
||||
}
|
||||
|
||||
RemoteControl::~RemoteControl()
|
||||
{
|
||||
#ifdef FIFO_TEST
|
||||
if (mFifoFdIn != -1) {
|
||||
close(mFifoFdIn);
|
||||
}
|
||||
#endif
|
||||
if (mFifoFdOut != -1) {
|
||||
close(mFifoFdOut);
|
||||
}
|
||||
@@ -29,6 +34,7 @@ void RemoteControl::createNamedPipe()
|
||||
{
|
||||
struct stat statBuf;
|
||||
|
||||
#ifdef FIFO_TEST
|
||||
// Open incoming pipe (READ ONLY)
|
||||
if (stat(FIFO_FROM_GIMBAL, &statBuf) == 0) {
|
||||
if (S_ISFIFO(statBuf.st_mode)) {
|
||||
@@ -51,6 +57,7 @@ void RemoteControl::createNamedPipe()
|
||||
} else {
|
||||
qInfo().noquote().nospace() << "Opened pipe: " << FIFO_FROM_GIMBAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Open outgoing pipe (WRITE ONLY)
|
||||
if (stat(FIFO_TO_GIMBAL, &statBuf) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user