From a2d340baee70aa8e7f907f44cfc9f60ebd28b38a Mon Sep 17 00:00:00 2001 From: Thiago Alves Date: Mon, 2 Sep 2019 10:34:11 -0300 Subject: [PATCH] make it consistent with Beremiz plc_main.c --- webserver/core/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webserver/core/main.cpp b/webserver/core/main.cpp index 8131e7d..6640e22 100644 --- a/webserver/core/main.cpp +++ b/webserver/core/main.cpp @@ -41,7 +41,7 @@ IEC_BOOL __DEBUG; IEC_LINT cycle_counter = 0; -static int tick = 0; +unsigned long __tick = 0; pthread_mutex_t bufferLock; //mutex for the internal buffers pthread_mutex_t logLock; //mutex for the internal log uint8_t run_openplc = 1; //Variable to control OpenPLC Runtime execution @@ -263,7 +263,7 @@ int main(int argc,char **argv) updateCustomIn(); updateBuffersIn_MB(); //update input image table with data from slave devices handleSpecialFunctions(); - config_run__(tick++); // execute plc program logic + config_run__(__tick++); // execute plc program logic updateCustomOut(); updateBuffersOut_MB(); //update slave devices with data from the output image table pthread_mutex_unlock(&bufferLock); //unlock mutex