app_version

This commit is contained in:
2021-03-25 11:02:22 +01:00
parent 1a03fdb9da
commit 2a4c89aee6
2 changed files with 3 additions and 4 deletions

View File

@ -18,7 +18,7 @@
#include "timesync.h" #include "timesync.h"
#include "sinkSender.h" #include "sinkSender.h"
const char VERSION[] = "deadbeef"; extern const uint32_t APP_VERSION;
// static const char *TAG = "app"; // static const char *TAG = "app";

View File

@ -20,8 +20,6 @@
static const char *TAG = "ss"; static const char *TAG = "ss";
extern char VERSION[];
static const char SINK_SERVER[] = "sink.hottis.de"; static const char SINK_SERVER[] = "sink.hottis.de";
static const uint16_t SINK_PORT = 20169; static const uint16_t SINK_PORT = 20169;
@ -31,6 +29,7 @@ static char deviceId[16];
static const char DEFAULT_SHAREDSECRET[] = "1234567890123456789012345678901"; static const char DEFAULT_SHAREDSECRET[] = "1234567890123456789012345678901";
static char sharedSecret[32]; static char sharedSecret[32];
extern const uint32_t APP_VERSION;
extern xQueueHandle minuteBufferQueue; extern xQueueHandle minuteBufferQueue;
@ -41,7 +40,7 @@ static void sinksenderSend(t_minuteBuffer *minuteBuffer) {
minuteBuffer->s.totalRunningHours = (uint32_t) uptime; minuteBuffer->s.totalRunningHours = (uint32_t) uptime;
minuteBuffer->s.totalPowercycles = 0; minuteBuffer->s.totalPowercycles = 0;
minuteBuffer->s.totalWatchdogResets = 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)); memset(minuteBuffer->s.deviceId, 0, sizeof(minuteBuffer->s.deviceId));
strcpy(minuteBuffer->s.deviceId, deviceId); strcpy(minuteBuffer->s.deviceId, deviceId);