master
sfeakes 2018-06-18 13:56:19 -05:00
parent 9a54dbc9a2
commit 5130a158d4
7 changed files with 38 additions and 0 deletions

BIN
.config.c.swp Normal file

Binary file not shown.

BIN
extras/IMG_0236.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

BIN
extras/IMG_0237.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
extras/IMG_0238.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 KiB

BIN
release/test Executable file

Binary file not shown.

32
test.c Normal file
View File

@ -0,0 +1,32 @@
#include <stdio.h>
#include <time.h>
#include "config.h"
#include "utils.h"
int main (int argc, char *argv[])
{
struct tm * timeinfo;
char buff[20];
_sdconfig_.log_level = LOG_DEBUG;
readCfg("/nas/data/Development/Raspberry/sprinklerd/release/sprinklerd.conf");
sprintf(_sdconfig_.cache_file, "/tmp/test.cache");
_sdconfig_.system = true;
_sdconfig_.delay24h = true;
time(&_sdconfig_.delay24h_time);
timeinfo = localtime (&_sdconfig_.delay24h_time);
strftime(buff, 20, "%b %d %H:%M\n", timeinfo);
printf("%s",buff);
write_cache();
read_cache();
timeinfo = localtime (&_sdconfig_.delay24h_time);
strftime(buff, 20, "%b %d %H:%M\n", timeinfo);
printf("%s",buff);
return 0;
}

6
version.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef SD_VERSION_H
#define SD_VERSION_H
#define SD_VERSION "1.0a"
#endif