# HG changeset patch # User Edouard Tisserant # Date 1434742595 -7200 # Node ID 9011e2ceea8546bf964aa63eab7bbde6f1d41fe8 # Parent 9ee3a2dea7e8d8c3ed8b10f7b86c37ecdfc0d8c7 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well diff -r 9ee3a2dea7e8 -r 9011e2ceea85 targets/Win32/plc_Win32_main.c --- a/targets/Win32/plc_Win32_main.c Thu Jun 18 15:22:43 2015 +0200 +++ b/targets/Win32/plc_Win32_main.c Fri Jun 19 21:36:35 2015 +0200 @@ -76,8 +76,6 @@ BOOL tmp; setlocale(LC_NUMERIC, "C"); - InitializeCriticalSection(&Atomic64CS); - debug_sem = CreateSemaphore( NULL, // default security attributes 1, // initial count @@ -170,7 +168,6 @@ CloseHandle(PLC_timer); WaitForSingleObject(PLC_thread, INFINITE); __cleanup(); - DeleteCriticalSection(&Atomic64CS); CloseHandle(debug_wait_sem); CloseHandle(debug_sem); CloseHandle(python_wait_sem); @@ -279,3 +276,17 @@ { } +static void __attribute__((constructor)) +beremiz_dll_init(void) +{ + ResetLogCount(); + InitializeCriticalSection(&Atomic64CS); + +} + +static void __attribute__((destructor)) +beremiz_dll_destroy(void) +{ + DeleteCriticalSection(&Atomic64CS); +} + diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/HMI@wxglade_hmi/baseconfnode.xml --- a/tests/wxHMI/HMI@wxglade_hmi/baseconfnode.xml Thu Jun 18 15:22:43 2015 +0200 +++ b/tests/wxHMI/HMI@wxglade_hmi/baseconfnode.xml Fri Jun 19 21:36:35 2015 +0200 @@ -1,2 +1,2 @@ - - + + diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/HMI@wxglade_hmi/pyfile.xml --- a/tests/wxHMI/HMI@wxglade_hmi/pyfile.xml Thu Jun 18 15:22:43 2015 +0200 +++ b/tests/wxHMI/HMI@wxglade_hmi/pyfile.xml Fri Jun 19 21:36:35 2015 +0200 @@ -1,135 +1,134 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/beremiz.xml --- a/tests/wxHMI/beremiz.xml Thu Jun 18 15:22:43 2015 +0200 +++ b/tests/wxHMI/beremiz.xml Fri Jun 19 21:36:35 2015 +0200 @@ -1,5 +1,5 @@ - - - - - + + + + + diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/plc.xml --- a/tests/wxHMI/plc.xml Thu Jun 18 15:22:43 2015 +0200 +++ b/tests/wxHMI/plc.xml Fri Jun 19 21:36:35 2015 +0200 @@ -1,592 +1,592 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Power_ON - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Power_OFF - - - - - - - - - - - - - power - - - - - - - DrawTest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ZaxisPos - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XaxisPos - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tmp - - - - - - - 1 - - - - - - - tmp - - - - - - - - - - - - - YaxisPos - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - power - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BOOL#TRUE - - - - - - - 'wxglade_hmi.UpdPos()' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LocalVar0 - - - - - - - - - - - - - LocalVar1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Power_ON + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Power_OFF + + + + + + + + + + + + + power + + + + + + + DrawTest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ZaxisPos + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XaxisPos + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + tmp + + + + + + + 1 + + + + + + + tmp + + + + + + + + + + + + + YaxisPos + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + power + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BOOL#TRUE + + + + + + + 'wxglade_hmi.UpdPos()' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LocalVar0 + + + + + + + + + + + + + LocalVar1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/project_files/Detect_Circle.png Binary file tests/wxHMI/project_files/Detect_Circle.png has changed diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/project_files/DrawEscher.png Binary file tests/wxHMI/project_files/DrawEscher.png has changed diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/project_files/DrawLogo.png Binary file tests/wxHMI/project_files/DrawLogo.png has changed diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/project_files/DrawTest.png Binary file tests/wxHMI/project_files/DrawTest.png has changed diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/project_files/Power_OFF.png Binary file tests/wxHMI/project_files/Power_OFF.png has changed diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/project_files/Power_ON.png Binary file tests/wxHMI/project_files/Power_ON.png has changed diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/project_files/TaxisMinus.png Binary file tests/wxHMI/project_files/TaxisMinus.png has changed diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/project_files/TaxisPlus.png Binary file tests/wxHMI/project_files/TaxisPlus.png has changed diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/project_files/XaxisMinus.png Binary file tests/wxHMI/project_files/XaxisMinus.png has changed diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/project_files/XaxisPlus.png Binary file tests/wxHMI/project_files/XaxisPlus.png has changed diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/project_files/YaxisMinus.png Binary file tests/wxHMI/project_files/YaxisMinus.png has changed diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/project_files/YaxisPlus.png Binary file tests/wxHMI/project_files/YaxisPlus.png has changed diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/project_files/ZaxisMinus.png Binary file tests/wxHMI/project_files/ZaxisMinus.png has changed diff -r 9ee3a2dea7e8 -r 9011e2ceea85 tests/wxHMI/project_files/ZaxisPlus.png Binary file tests/wxHMI/project_files/ZaxisPlus.png has changed