This commit is contained in:
2025-02-04 21:33:02 +03:00
parent a2e2896f29
commit aefdf3912c
9 changed files with 215 additions and 33 deletions

View File

@@ -51,10 +51,11 @@ void signals(int sig){
}
static conf_t Config = {
.MountPath = "/dev/ttyS1",
.MountSpeed = 19200,
.EncoderPath = "/dev/ttyUSB0",
.EncoderSpeed = 153000
.MountDevPath = "/dev/ttyS1",
.MountDevSpeed = 19200,
//.EncoderDevPath = "/dev/ttyUSB0",
//.EncoderDevSpeed = 153000,
.SepEncoder = 0
};
int main(int argc, char **argv){
@@ -67,8 +68,8 @@ int main(int argc, char **argv){
time_t curtime = time(NULL);
LOGMSG("Started @ %s", ctime(&curtime));
DBG("Devices ready");
LOGMSG("Mount device %s @ %d", Config.MountPath, Config.MountSpeed);
LOGMSG("Encoder device %s @ %d", Config.EncoderPath, Config.EncoderSpeed);
LOGMSG("Mount device %s @ %d", Config.MountDevPath, Config.MountDevSpeed);
LOGMSG("Encoder device %s @ %d", Config.EncoderDevPath, Config.EncoderDevSpeed);
signal(SIGTERM, signals); // kill (-15) - quit
signal(SIGHUP, SIG_IGN); // hup - ignore
signal(SIGINT, signals); // ctrl+C - quit