Skip to content
Snippets Groups Projects
Commit ecf988d5 authored by Colton Glick's avatar Colton Glick
Browse files

crazyflie groundstation, slowed down comm and increased num of pending responses allowed

parent 43a8619d
No related branches found
No related tags found
1 merge request!77Groundstation gui rough edits
......@@ -32,8 +32,6 @@
#include <pthread.h>
#include "CCrazyflie.h"
#include "CCrazyRadio.h"
int everyX = 0;
CCrazyflie::CCrazyflie(CCrazyRadio *crRadio, int nRadioChannel, XferRate dataRate, int quadNum, double startTime) {
m_quadNum = quadNum;
......@@ -351,13 +349,7 @@ bool CCrazyflie::cycle() {
this->m_sendPosition = false;
} else {
// Send a dummy packet for keepalive otherwise
//TODO this is a hacky fix to limit amount of data sent, should use a timer instead
if(everyX >= 100){
m_crRadio->sendDummyPacket(m_nRadioChannel, this);
everyX = 0;
}else{
everyX++;
}
m_crRadio->sendDummyPacket(m_nRadioChannel, this);
}
......
......@@ -23,7 +23,7 @@ void CCrazyRadio::mainLoop() {
(*it)->writeLogData();
}
usleep(200);
usleep(1000);
// Check if the thread has been told to terminate
if (this->m_exitThread) {
......
......@@ -43,7 +43,7 @@ int max_fd = 0;
#define MAX_CLIENTS 32
#define CLIENT_BUFFER_SIZE 64
#define CLIENT_MAX_PENDING_RESPONSES 15
#define CLIENT_MAX_PENDING_RESPONSES 64
static struct command* client_buffers[MAX_CLIENTS][CLIENT_BUFFER_SIZE];
static int client_fds[MAX_CLIENTS];
static int client_pending_responses[MAX_CLIENTS][CLIENT_MAX_PENDING_RESPONSES];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment