Change netdaemon to poll & work with libusefull_macros, add weatherdaemon

This commit is contained in:
Edward Emelianov
2021-01-02 20:04:20 +03:00
parent dff0f9e43f
commit 0028ba8a4b
45 changed files with 1835 additions and 168 deletions

View File

@@ -23,8 +23,9 @@
#include <string.h>
#include <strings.h>
#include <math.h>
#include <usefull_macros.h>
#include "cmdlnopts.h"
#include "usefull_macros.h"
#include "term.h"
/*
* here are global parameters initialisation
@@ -43,6 +44,8 @@ glob_pars const Gdefault = {
.terminal = 0,
.echo = 0,
.logfile = NULL,
.verb = 0,
.tty_speed = 115200,
.rest_pars = NULL,
.rest_pars_num = 0
};
@@ -59,6 +62,8 @@ myoption cmdlnopts[] = {
{"logfile", NEED_ARG, NULL, 'l', arg_string, APTR(&G.logfile), _("save logs to file (default: none)")},
{"terminal",NO_ARGS, NULL, 't', arg_int, APTR(&G.terminal), _("run as terminal")},
{"echo", NO_ARGS, NULL, 'e', arg_int, APTR(&G.echo), _("echo users commands back")},
{"verb", NO_ARGS, NULL, 'v', arg_none, APTR(&G.verb), _("logfile verbocity level (each -v increase it)")},
{"baudrate",NEED_ARG, NULL, 'b', arg_int, APTR(&G.tty_speed), _("serial terminal baudrate (default: 115200)")},
end_option
};