Browse Source

changed nerdjack packet data type for 64 bit compilers and adjusted the Makefile for proper linking of the math library

git-svn-id: https://bucket.mit.edu/svn/nilm/acquisition/ethstream@10306 ddd99763-3ecb-0310-9145-efcb8ce7c51f
tags/ethstream-1.3
jdonnal 9 years ago
parent
commit
d6f01a3497
2 changed files with 5 additions and 2 deletions
  1. +3
    -1
      Makefile
  2. +2
    -1
      nerdjack.h

+ 3
- 1
Makefile View File

@@ -14,7 +14,9 @@
# Build options

CFLAGS += -Wall -g #-pg
LDFLAGS += -lm #-pg
LDFLAGS += #-pg
LDLIBS += -lm #CHANGED location from LDFLAGS for proper linking using gcc

PREFIX = /usr/local
MANPATH = ${PREFIX}/man/man1/
BINPATH = ${PREFIX}/bin


+ 2
- 1
nerdjack.h View File

@@ -27,7 +27,8 @@
/* Packet structure used in message to start sampling on NerdJack */
typedef struct __attribute__ ((__packed__)) {
char word[4];
unsigned long period;
unsigned int period; //CHANGED FROM TYPE LONG. With 64 bit compilers longs are 8 bytes and nerdjack expects a 4 byte value
//since the int type is 4 bytes this works but should be changed to use defined datatypes rather than rely on compiler data types
unsigned short channelbit;
unsigned char precision;
unsigned char prescaler;


Loading…
Cancel
Save