From 2a4c89aee65c3c88c319e59e3f7896741ac673d2 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Thu, 25 Mar 2021 11:02:22 +0100 Subject: [PATCH] app_version --- src/main/app_main.c | 2 +- src/main/sinkSender.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/app_main.c b/src/main/app_main.c index 74cb77a..cb32b59 100644 --- a/src/main/app_main.c +++ b/src/main/app_main.c @@ -18,7 +18,7 @@ #include "timesync.h" #include "sinkSender.h" -const char VERSION[] = "deadbeef"; +extern const uint32_t APP_VERSION; // static const char *TAG = "app"; diff --git a/src/main/sinkSender.c b/src/main/sinkSender.c index 2ca7222..795fb0e 100644 --- a/src/main/sinkSender.c +++ b/src/main/sinkSender.c @@ -20,8 +20,6 @@ static const char *TAG = "ss"; -extern char VERSION[]; - static const char SINK_SERVER[] = "sink.hottis.de"; static const uint16_t SINK_PORT = 20169; @@ -31,6 +29,7 @@ static char deviceId[16]; static const char DEFAULT_SHAREDSECRET[] = "1234567890123456789012345678901"; static char sharedSecret[32]; +extern const uint32_t APP_VERSION; extern xQueueHandle minuteBufferQueue; @@ -41,7 +40,7 @@ static void sinksenderSend(t_minuteBuffer *minuteBuffer) { minuteBuffer->s.totalRunningHours = (uint32_t) uptime; minuteBuffer->s.totalPowercycles = 0; minuteBuffer->s.totalWatchdogResets = 0; - minuteBuffer->s.version = strtoll(VERSION, NULL, 16); + minuteBuffer->s.version = APP_VERSION; memset(minuteBuffer->s.deviceId, 0, sizeof(minuteBuffer->s.deviceId)); strcpy(minuteBuffer->s.deviceId, deviceId);