Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MicroCART_17-18
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bbartels
MicroCART_17-18
Commits
65d0b2a5
Commit
65d0b2a5
authored
8 years ago
by
burneykb
Browse files
Options
Downloads
Patches
Plain Diff
attempting to fix latency issues
parent
b228070d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
groundStation/src/microcart_cli.c
+9
-2
9 additions, 2 deletions
groundStation/src/microcart_cli.c
with
9 additions
and
2 deletions
groundStation/src/microcart_cli.c
+
9
−
2
View file @
65d0b2a5
...
...
@@ -24,6 +24,8 @@
#include
<errno.h>
#include
<string.h>
#include
<sys/ioctl.h>
#include
<sys/types.h>
#include
<netinet/tcp.h>
//user created includes
#include
"communication.h"
...
...
@@ -36,7 +38,7 @@
#define QUAD_BT_ADDR "00:06:66:64:61:D6"
#define QUAD_BT_CHANNEL 0x01
#define CMD_MAX_LENGTH 1024
#define MAX_HASH_SIZE
1
5
#define MAX_HASH_SIZE 5
0
// function prototypes
void
readAndPrint
(
void
);
...
...
@@ -99,7 +101,6 @@ modular_structs_t structs;
// Callback to be ran whenever the tracker receives data.
// Currently doing much more than it should. It will be slimmed down
// in the future.
static
void
cb
(
struct
ucart_vrpn_TrackerData
*
td
)
{
static
int
count
=
0
;
...
...
@@ -445,6 +446,8 @@ int connectToZybo() {
}
else
{
// int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (int[]){1}, sizeof(int));
// printf("result = %d\n", result);
printf
(
"connection successful!...
\n
"
);
return
sock
;
}
...
...
@@ -480,6 +483,7 @@ static ssize_t writeQuad(const char * buf, size_t count) {
if
(
pthread_mutex_lock
(
&
quadSocketMutex
))
{
err
(
-
2
,
"pthrtead_mutex_lock (%s:%d):"
,
__FILE__
,
__LINE__
);
}
//setsockopt(zyboSocket, IPPROTO_TCP, TCP_QUICKACK, (int[]){1}, sizeof(int));
retval
=
write
(
zyboSocket
,
buf
,
count
);
if
(
pthread_mutex_unlock
(
&
quadSocketMutex
))
{
err
(
-
2
,
"pthrtead_mutex_unlock (%s:%d):"
,
__FILE__
,
__LINE__
);
...
...
@@ -494,6 +498,9 @@ static ssize_t readQuad(char * buf, size_t count) {
err
(
-
2
,
"pthrtead_mutex_lock (%s:%d):"
,
__FILE__
,
__LINE__
);
}
retval
=
read
(
zyboSocket
,
buf
,
count
);
//int result = setsockopt(zyboSocket, IPPROTO_TCP, TCP_QUICKACK, (int[]){1}, sizeof(int));
//printf("result = %d\n", result);
if
(
pthread_mutex_unlock
(
&
quadSocketMutex
))
{
err
(
-
2
,
"pthrtead_mutex_unlock (%s:%d):"
,
__FILE__
,
__LINE__
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment