Added sendData function call to remote main.

Commented out more things that are currently not needed.
This commit is contained in:
Nffj84
2024-07-03 16:10:24 +03:00
parent 3e0841b0ca
commit 0b4b2f9f10
4 changed files with 24 additions and 6 deletions
+8 -1
View File
@@ -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) {