MY_CONFIG_SERVER

This commit is contained in:
livello
2018-03-18 20:45:29 +03:00
parent f3bee5cc1b
commit 6371895430
2 changed files with 7 additions and 1 deletions

View File

@@ -755,6 +755,11 @@ void saveFlash(short n, char* str)
void loadFlash(short n, char* str)
{}
#ifndef MY_CONFIG_SERVER
#define CONFIG_SERVER "lazyhome.ru"
#else
#define CONFIG_SERVER QUOTE(MY_CONFIG_SERVER)
#endif
int getConfig (int arg_cnt, char **args)
//(char *tokens)
{
@@ -763,7 +768,7 @@ int getConfig (int arg_cnt, char **args)
int returnCode =0;
char ch;
char URI [32];
char server[32] = "ri48.ru/tid";
char server[sizeof(CONFIG_SERVER)+21] = CONFIG_SERVER;
if (arg_cnt>0) {
strncpy(server,args[1],sizeof(server)-1);
saveFlash(0,server);

View File

@@ -42,6 +42,7 @@ platform = atmelavr
board = megaatmega2560
framework = arduino
;lib_ldf_mode = chain+
build_flags = !echo -n "-DPIO_SRC_REV="$(git rev-parse --short HEAD)
lib_deps =
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire