Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
wattsworth
/
ethstream
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ed5c5692
authored
Oct 24, 2019
by
Daisy Green
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
nerdjack packet size
parent
8bb6de6c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
nerdjack.c
nerdjack.h
nerdjack.c
View file @
ed5c5692
...
...
@@ -28,13 +28,16 @@
#define NERD_HEADER_SIZE 8
#define MAX_SOCKETS 32
int
NERDJACK_PACKET_SIZE
=
1448
;
int
NERDJACK_NUM_SAMPLES
=
720
;
typedef
struct
__attribute__
((
__packed__
))
{
unsigned
char
headerone
;
unsigned
char
headertwo
;
unsigned
short
packetNumber
;
unsigned
short
adcused
;
unsigned
short
packetsready
;
signed
short
data
[
NERDJACK_NUM_SAMPLES
];
signed
short
data
[
720
];
}
dataPacket
;
struct
discovered_socket
{
...
...
@@ -439,6 +442,9 @@ nerd_data_stream(int data_fd, int numChannels, int *channel_list,
int
numgroupsProcessed
=
0
;
double
volts
;
NERDJACK_NUM_SAMPLES
=
numChannelsSampled
*
90
;
NERDJACK_PACKET_SIZE
=
NERDJACK_NUM_SAMPLES
*
2
+
8
;
//The timeout should be the expected time plus 60 seconds
//This permits slower speeds to work properly
unsigned
int
expectedtimeout
=
...
...
nerdjack.h
View file @
ed5c5692
...
...
@@ -21,8 +21,8 @@
#define NERDJACK_UDP_RECEIVE_PORT 49156
#define NERDJACK_COMMAND_PORT 49157
#define NERDJACK_PACKET_SIZE 1460
#define NERDJACK_NUM_SAMPLES 726
//
#define NERDJACK_PACKET_SIZE 1460
//
#define NERDJACK_NUM_SAMPLES 726
/* Packet structure used in message to start sampling on NerdJack */
typedef
struct
__attribute__
((
__packed__
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment