summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLoic Guegan <loic.guegan@mailbox.org>2024-02-02 13:08:16 +0100
committerLoic Guegan <loic.guegan@mailbox.org>2024-02-02 13:08:16 +0100
commit1e8c15ca87a6df0305396dacc267ba65d28c8631 (patch)
tree1be570ca998635b37f8bc832ec3b5846bd093c69 /src
parent10dc03b39c0622fa9e599904d56f2edfff70d218 (diff)
Minor changes
Diffstat (limited to 'src')
-rw-r--r--src/publisher.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/publisher.c b/src/publisher.c
index 1df2f88..db93e63 100644
--- a/src/publisher.c
+++ b/src/publisher.c
@@ -19,6 +19,9 @@
unsigned char __stop = 0;
unsigned char __stop_zmq_thread = 0;
+/// @brief Path of the break file (if found, publisher will stop publishing)
+char __break_file[STATIC_LEN];
+
/**
* @brief Stop process properly on SIGINT
*
@@ -33,6 +36,10 @@ void sighandler(int signo) {
void *publisher(void *zmq_publisher);
+void askforbreak(){
+
+}
+
typedef struct queue {
int size;
char issending;
@@ -62,6 +69,12 @@ int main(int argc, char *argv[]) {
strcat(regpower, "/");
strcat(regpower, INA260_POWER_OUTPUT);
+ // __break_file
+ strcat(__break_file, "/publisher_");
+ strcat(__break_file, key);
+ strcat(__break_file, "_break");
+ printf("%s\n",__break_file);
+
//----- Sanity checks
signal(SIGINT, sighandler);
if (loginterval < MIN_INTERVAL) {
@@ -175,4 +188,4 @@ void *publisher(void *zmq_publisher) {
queue_id = 0;
}
pthread_exit(EXIT_SUCCESS);
-} \ No newline at end of file
+}