summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--config.mk4
-rw-r--r--src/logger.c8
3 files changed, 7 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 51e80dd..6253512 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ CFLAGS=
MACROS=\
-DZMQ_TOKEN=\"$(ZMQ_TOKEN)\" \
-DZMQ_MSG_SIZE=$(ZMQ_MSG_SIZE) \
--DLOGGER_DELAY=$(LOGGER_DELAY)
+-DLOGGERS_DELAY=$(LOGGERS_DELAY)
all: publisher subscriber logger
diff --git a/config.mk b/config.mk
index 796abbf..4e01b7a 100644
--- a/config.mk
+++ b/config.mk
@@ -16,10 +16,10 @@ ZMQ_MSG_SIZE=5242880
# LOGGERS_DIR will contains all the data generated by the loggers
# a.k.a the ina260 power measurements
LOGGERS_DIR=./logs
-# LOGGER_DELAY defines the delay between 2 consecutive
+# LOGGERS_DELAY defines the delay between 2 consecutive
# ina260 power read performed by the logger
# Unit is milliseconds
-LOGGER_DELAY=1000
+LOGGERS_DELAY=1000
# SUBSCRIBER_DIR will contain all the measurments
# received from the publishers
SUBSCRIBER_DIR=./data
diff --git a/src/logger.c b/src/logger.c
index 7a86457..409d7c0 100644
--- a/src/logger.c
+++ b/src/logger.c
@@ -6,8 +6,8 @@
#include <signal.h>
#include "utils.h"
-#ifndef LOGGER_DELAY
-#define LOGGER_DELAY 0
+#ifndef LOGGERS_DELAY
+#define LOGGERS_DELAY 0
#endif
// Global:
@@ -86,8 +86,8 @@ int main (int argc, char *argv [])
fprintf(logptr,"%d,%ld,%d\n",power_ts.tv_sec,power_ts.tv_nsec,power);
// Reset power register file:
fseek(regptr,0,SEEK_SET);
-#if LOGGER_DELAY > 0
- usleep(LOGGER_DELAY*1000);
+#if LOGGERS_DELAY > 0
+ usleep(LOGGERS_DELAY*1000);
#endif
printf("Tick\n"); fflush(stdout);
}