Wed, 13 Mar 2019 11:49:46 +0300Fix typo
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Wed, 13 Mar 2019 11:49:46 +0300] rev 2538
Fix typo

Wed, 13 Mar 2019 11:47:03 +0300Fix various pylint and pep8 errors
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Wed, 13 Mar 2019 11:47:03 +0300] rev 2537
Fix various pylint and pep8 errors

Check basic code-style problems for PEP-8
pep8 version: 2.4.0
./connectors/PYRO/__init__.py:57:43: E261 at least two spaces before inline comment
./connectors/SchemeEditor.py:29:21: E128 continuation line under-indented for visual indent
./controls/IDBrowser.py:101:23: E127 continuation line over-indented for visual indent
./controls/IDBrowser.py:102:23: E127 continuation line over-indented for visual indent

Check for problems using pylint ...
No config file found, using default configuration
pylint 1.9.4,
astroid 1.6.5
Python 2.7.16rc1 (default, Feb 18 2019, 11:05:09)
[GCC 8.2.0]
Use multiple threads for pylint
Using config file /home/developer/WorkData/PLC/beremiz/beremiz/.pylint
************* Module connectors.PYRO_dialog
connectors/PYRO_dialog.py:9: [W0611(unused-import), ] Unused import wx
************* Module connectors
connectors/__init__.py:32: [W1652(deprecated-types-field), ] Accessing a deprecated fields on the types module
connectors/__init__.py:32: [C0411(wrong-import-order), ] standard import "from types import ClassType" should be placed before "from connectors.ConnectorBase import ConnectorBase"
************* Module connectors.PYRO.PSK_Adapter
connectors/PYRO/PSK_Adapter.py:7: [C0411(wrong-import-order), ] standard import "import ssl" should be placed before "import sslpsk"
************* Module connectors.SchemeEditor
connectors/SchemeEditor.py:29: [C0330(bad-continuation), ] Wrong continued indentation (add 1 space).
wx.ALIGN_CENTER_VERTICAL),
^|
connectors/SchemeEditor.py:42: [W0631(undefined-loop-variable), SchemeEditor.__init__] Using possibly undefined loop variable 'tag'
************* Module runtime.WampClient
runtime/WampClient.py:138: [W1612(unicode-builtin), WampSession.onJoin] unicode built-in referenced
runtime/WampClient.py:154: [W1612(unicode-builtin), WampSession.publishWithOwnID] unicode built-in referenced
runtime/WampClient.py:346: [W1612(unicode-builtin), PublishEvent] unicode built-in referenced
runtime/WampClient.py:351: [W1612(unicode-builtin), PublishEventWithOwnID] unicode built-in referenced
runtime/WampClient.py:31: [W0611(unused-import), ] Unused str imported from builtins as text
************* Module runtime.PLCObject
runtime/PLCObject.py:35: [W1648(bad-python3-import), ] Module moved in Python 3
runtime/PLCObject.py:35: [C0411(wrong-import-order), ] standard import "import md5" should be placed before "from six.moves import xrange"
runtime/PLCObject.py:36: [C0411(wrong-import-order), ] standard import "from tempfile import mkstemp" should be placed before "from six.moves import xrange"
runtime/PLCObject.py:37: [C0411(wrong-import-order), ] standard import "import shutil" should be placed before "from six.moves import xrange"
runtime/PLCObject.py:38: [C0411(wrong-import-order), ] standard import "from functools import wraps, partial" should be placed before "from six.moves import xrange"
************* Module runtime.Worker
runtime/Worker.py:12: [W1648(bad-python3-import), ] Module moved in Python 3
************* Module runtime.spawn_subprocess
runtime/spawn_subprocess.py:125: [C0325(superfluous-parens), ] Unnecessary parens after 'print' keyword
runtime/spawn_subprocess.py:130: [C0325(superfluous-parens), ] Unnecessary parens after 'print' keyword
runtime/spawn_subprocess.py:125: [E1601(print-statement), ] print statement used
runtime/spawn_subprocess.py:130: [E1601(print-statement), ] print statement used
************* Module controls.IDBrowser
controls/IDBrowser.py:101: [C0330(bad-continuation), ] Wrong continued indentation (remove 5 spaces).
if self.isManager
| ^
controls/IDBrowser.py:102: [C0330(bad-continuation), ] Wrong continued indentation (remove 5 spaces).
else dv.DATAVIEW_CELL_INERT),
| ^
************* Module Beremiz_service
Beremiz_service.py:34: [W0611(unused-import), ] Unused import __builtin__

Wed, 13 Mar 2019 10:19:30 +0300Fix invalid python3 syntax
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Wed, 13 Mar 2019 10:19:30 +0300] rev 2536
Fix invalid python3 syntax

Syntax checking using python3 ...
Python 3.7.2+
File "./connectors/PYRO/__init__.py", line 76
except Exception, e:
^
SyntaxError: invalid syntax

Syntax error in ./connectors/PYRO/__init__.py
File "./connectors/PYRO/PSK_Adapter.py", line 40
except ProtocolError, x:
^
SyntaxError: invalid syntax

Syntax error in ./s.py
File "./runtime/Worker.py", line 67
raise _job.exc_info[0], _job.exc_info[1], _job.exc_info[2]
^
SyntaxError: invalid syntax

Wed, 13 Mar 2019 10:02:11 +0300Exclude pyjslib.py from python3 syntax correction check
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Wed, 13 Mar 2019 10:02:11 +0300] rev 2535
Exclude pyjslib.py from python3 syntax correction check

pyjs doesn't support python3 and it's unmaintained.
async is a new keyword introduced in python 3.7.

./tests/tools/check_source.sh
Syntax checking using python3 ...
Python 3.7.2+

Syntax error in ./runtime/Worker.py
File "./svgui/pyjs/lib/pyjslib.py", line 24
def import_module(path, parent_module, module_name, dynamic=1, async=False):
^
SyntaxError: invalid syntax

Wed, 13 Mar 2019 09:56:37 +0300revert occasionally committed changed first_steps project.
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Wed, 13 Mar 2019 09:56:37 +0300] rev 2534
revert occasionally committed changed first_steps project.

project was changed by commit:
update translations from https://www.transifex.com/beremiz/beremiz-ide (756d02cf78db)

Mon, 18 Mar 2019 07:13:04 +0000Merged in masterschlumpf/beremiz/generate-button (pull request #38)
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 18 Mar 2019 07:13:04 +0000] rev 2533
Merged in masterschlumpf/beremiz/generate-button (pull request #38)

"Generate Prgram" button

Approved-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>

Fri, 15 Mar 2019 18:27:43 +0100Create a "Generate Program As..." menu to make the "Generate Program" toolbutton even more useful. generate-button
Schlumpf <schlumpf@kr-ll.de> [Fri, 15 Mar 2019 18:27:43 +0100] rev 2532
Create a "Generate Program As..." menu to make the "Generate Program" toolbutton even more useful.

The behaviour is the same as "Save" and "Save As...". Now "Generate Program" uses the last filename
if known and "Generate Progam As..." asks every time.

Fri, 15 Mar 2019 17:34:24 +0100Add "Generate Program" to toolbar in PLCOpenEditor standalone mode. generate-button
Schlumpf <schlumpf@kr-ll.de> [Fri, 15 Mar 2019 17:34:24 +0100] rev 2531
Add "Generate Program" to toolbar in PLCOpenEditor standalone mode.

Currently you can find the "Generate Program" action only in the file menu,
but this action is very often used in standalone mode, so I added toolbuffon.

Fri, 22 Mar 2019 11:10:37 +0100Merged search in CTN branch
Edouard Tisserant [Fri, 22 Mar 2019 11:10:37 +0100] rev 2530
Merged search in CTN branch

Fri, 22 Mar 2019 11:09:41 +0100Finished adding search in python and C files. Stripped debug code and useless comments. Close branch search_in_CTN
Edouard Tisserant [Fri, 22 Mar 2019 11:09:41 +0100] rev 2529
Finished adding search in python and C files. Stripped debug code and useless comments. Close branch

Fri, 22 Mar 2019 10:57:04 +0100WIP adding searching capabilities in python files. was done : search_in_CTN
Edouard Tisserant [Fri, 22 Mar 2019 10:57:04 +0100] rev 2528
WIP adding searching capabilities in python files. was done :
- added search in body of Code File Tree Nodes (moved editor code so that we CTN search can have the same sections text layout as editor to search in)

Thu, 21 Mar 2019 14:00:26 +0100WIP adding searching capabilities in python files. was done : search_in_CTN
Edouard Tisserant [Thu, 21 Mar 2019 14:00:26 +0100] rev 2527
WIP adding searching capabilities in python files. was done :
- added search in global variables used by Code File Tree Nodes

Thu, 21 Mar 2019 13:10:49 +0100WIP adding searching capabilities in python files. was done : search_in_CTN
Edouard Tisserant [Thu, 21 Mar 2019 13:10:49 +0100] rev 2526
WIP adding searching capabilities in python files. was done :
- fixed highlighting search result in text body of CTN code editor.

Thu, 21 Mar 2019 13:04:26 +0100WIP adding searching capabilities in python files. was done : search_in_CTN
Edouard Tisserant [Thu, 21 Mar 2019 13:04:26 +0100] rev 2525
WIP adding searching capabilities in python files. was done :
- change stub search results to trigger highlighting un variable panel
- trying to highlight in CTN code file editors -> problem with EditorPanel not having self.VariableEditor set...
- added highlight capability to CTN's CodeFileEditor's VariablePanel

Wed, 20 Mar 2019 11:34:41 +0100WIP adding searching capabilities in python files. was done : search_in_CTN
Edouard Tisserant [Wed, 20 Mar 2019 11:34:41 +0100] rev 2524
WIP adding searching capabilities in python files. was done :
- fixed stub CTN search results so that they can be accepted by search result panel
- worked on search result panel so that it can display those CTN results
- made search result panel display correctly stub search result, for variables and body matches
- EditProjectElement now opens CTN node as well as PlcOpen project nodes

Fri, 15 Mar 2019 14:11:49 +0100WIP adding searching capabilities in python files: search_in_CTN
Edouard Tisserant [Fri, 15 Mar 2019 14:11:49 +0100] rev 2523
WIP adding searching capabilities in python files:
- Added recursive Search capability to config tree nodes
- Added stub search to code editors, for test

Mon, 11 Mar 2019 17:20:15 +0100Fixed more pylint reports :
Edouard Tisserant <edouard.tisserant@gmail.com> [Mon, 11 Mar 2019 17:20:15 +0100] rev 2522
Fixed more pylint reports :
connectors/__init__.py:31: [W1652(deprecated-types-field), ] Accessing a deprecated fields on the types module
in fact, it should have been unused import.

Mon, 11 Mar 2019 13:51:07 +0100Long due merge
Edouard Tisserant [Mon, 11 Mar 2019 13:51:07 +0100] rev 2521
Long due merge

Tue, 05 Mar 2019 11:43:20 +0300Fix backtrace on printing localized (non-ascii) error message in PLCGenerator.
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Tue, 05 Mar 2019 11:43:20 +0300] rev 2520
Fix backtrace on printing localized (non-ascii) error message in PLCGenerator.

traceback:
File "C:\Beremiz\targets\st\beremiz\..\..\..\beremiz\beremiz\BeremizIDE.py", line 811, in OnMenu
getattr(self.CTR, method)()
File "C:\Beremiz\targets\st\beremiz\..\..\..\beremiz\beremiz\ProjectController.py", line 1134, in _Build
IECGenRes = self._Generate_SoftPLC()
File "C:\Beremiz\targets\st\beremiz\..\..\..\beremiz\beremiz\ProjectController.py", line 746, in _Generate_SoftPLC
if self._Generate_PLC_ST():
File "C:\Beremiz\targets\st\beremiz\..\..\..\beremiz\beremiz\ProjectController.py", line 763, in _Generate_PLC_ST
self._getIECgeneratedcodepath())
File "C:\Beremiz\targets\st\beremiz\..\..\..\beremiz\beremiz\PLCControler.py", line 466, in GenerateProgram
errors.append(str(ex))
<type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode characters in position 0-9: ordinal not in range(128)
Fix backtrace on printing localized (non-ascii) error message in PLCGenerator.

traceback:
File "C:\Beremiz\targets\st\beremiz\..\..\..\beremiz\beremiz\BeremizIDE.py", line 811, in OnMenu
getattr(self.CTR, method)()
File "C:\Beremiz\targets\st\beremiz\..\..\..\beremiz\beremiz\ProjectController.py", line 1134, in _Build
IECGenRes = self._Generate_SoftPLC()
File "C:\Beremiz\targets\st\beremiz\..\..\..\beremiz\beremiz\ProjectController.py", line 746, in _Generate_SoftPLC
if self._Generate_PLC_ST():
File "C:\Beremiz\targets\st\beremiz\..\..\..\beremiz\beremiz\ProjectController.py", line 763, in _Generate_PLC_ST
self._getIECgeneratedcodepath())
File "C:\Beremiz\targets\st\beremiz\..\..\..\beremiz\beremiz\PLCControler.py", line 466, in GenerateProgram
errors.append(str(ex))
<type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode characters in position 0-9: ordinal not in range(128)


Close #67

Tue, 05 Mar 2019 11:19:36 +0300Fix crash if LD input contact isn't connected
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Tue, 05 Mar 2019 11:19:36 +0300] rev 2519
Fix crash if LD input contact isn't connected

Traceback (most recent call last):
File "/home/developer/WorkData/PLC/beremiz/beremiz/BeremizIDE.py", line 339, in OnMethod
obj.CTR.CallMethod('_'+meth)
File "/home/developer/WorkData/PLC/beremiz/beremiz/ProjectController.py", line 1996, in CallMethod
getattr(self, method)()
File "/home/developer/WorkData/PLC/beremiz/beremiz/ProjectController.py", line 1134, in _Build
IECGenRes = self._Generate_SoftPLC()
File "/home/developer/WorkData/PLC/beremiz/beremiz/ProjectController.py", line 746, in _Generate_SoftPLC
if self._Generate_PLC_ST():
File "/home/developer/WorkData/PLC/beremiz/beremiz/ProjectController.py", line 763, in _Generate_PLC_ST
self._getIECgeneratedcodepath())
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCControler.py", line 456, in GenerateProgram
self.ProgramChunks = GenerateCurrentProgram(self, self.Project, errors, warnings)
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 1762, in GenerateCurrentProgram
generator.GenerateProgram()
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 478, in GenerateProgram
self.GeneratePouProgram(pou_name)
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 260, in GeneratePouProgram
program = pou_program.GenerateProgram(pou)
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 1718, in GenerateProgram
self.ComputeProgram(pou)
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 1028, in ComputeProgram
self.GenerateBlock(instance, block_infos, body, None)
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 1144, in GenerateBlock
expression = self.ComputeExpression(body, connections, executionOrderId > 0)
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 1373, in ComputeExpression
paths = self.GeneratePaths(connections, body, order, to_inout)
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 1344, in GeneratePaths
elif isinstance(result[0], list):
IndexError: list index out of range


Close #70

Fri, 01 Mar 2019 16:55:16 +0300Fix section styling in code editor (python and c extensions) if non-latin symbols are used in the code
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 01 Mar 2019 16:55:16 +0300] rev 2518
Fix section styling in code editor (python and c extensions) if non-latin symbols are used in the code

Problem exists even if non-latin characters are placed in comments.
Close #76

Thu, 21 Feb 2019 11:39:50 +0300update localization template
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 21 Feb 2019 11:39:50 +0300] rev 2517
update localization template

Thu, 21 Feb 2019 11:27:16 +0300merge
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 21 Feb 2019 11:27:16 +0300] rev 2516
merge

Thu, 21 Feb 2019 11:25:58 +0300updated list of translators
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 21 Feb 2019 11:25:58 +0300] rev 2515
updated list of translators

Thu, 21 Feb 2019 11:25:03 +0300update translations from https://www.transifex.com/beremiz/beremiz-ide
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 21 Feb 2019 11:25:03 +0300] rev 2514
update translations from https://www.transifex.com/beremiz/beremiz-ide

added Basque (eu) and Vietnamese (Viet Nam) (vi_VN) translations

Thu, 21 Feb 2019 10:58:37 +0300Add SpinButtons for integer and floating point variables in ForceVariableDialog
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 21 Feb 2019 10:58:37 +0300] rev 2513
Add SpinButtons for integer and floating point variables in ForceVariableDialog

it allows to change variable value using only mouse.

Thu, 21 Feb 2019 10:17:38 +0300Fix non-marking as manually forced floating point variable if the value isn't integer
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 21 Feb 2019 10:17:38 +0300] rev 2512
Fix non-marking as manually forced floating point variable if the value isn't integer

For example, if user in debug variable panel set any floating point
variable to 34.3, then it's not shown as forced (blue color) and user
can't release this enforcement.

If user changes the value to 34.0, then enforcement shows
correctly. This is done because binary representation of floating point
numbers in IDE and runtime can be slightly different (double vs float)
and as a result values aren't equal.

Thu, 14 Feb 2019 10:27:24 +0300Don't close ForceVariableDialog if user entered wrong new value
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 14 Feb 2019 10:27:24 +0300] rev 2511
Don't close ForceVariableDialog if user entered wrong new value

return back to edit field in this case

Thu, 14 Feb 2019 10:19:30 +0300Additional fix for rewrite ForceVariableDialog commit (9076249f)
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 14 Feb 2019 10:19:30 +0300] rev 2510
Additional fix for rewrite ForceVariableDialog commit (9076249f)

fix following backtrace:

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_core.py", line 16765, in <lambda>
lambda event: event.callable(*event.args, **event.kw) )
File "/home/developer/WorkData/PLC/beremiz/beremiz/controls/DebugVariablePanel/DebugVariableViewer.py", line 232, in HandleButton
button.ProcessCallback()
File "/home/developer/WorkData/PLC/beremiz/beremiz/controls/DebugVariablePanel/GraphButton.py", line 156, in ProcessCallback
self.Callback()
File "/home/developer/WorkData/PLC/beremiz/beremiz/controls/DebugVariablePanel/DebugVariableViewer.py", line 350, in OnForceButton
self.ForceValue(self.ItemsDict.values()[0])
File "/home/developer/WorkData/PLC/beremiz/beremiz/controls/DebugVariablePanel/DebugVariableViewer.py", line 428, in ForceValue
dialog.GetValue())
File "/home/developer/WorkData/PLC/beremiz/beremiz/dialogs/ForceVariableDialog.py", line 232, in GetValue
return GetTypeValue[self.IEC_Type](wx.TextEntryDialog.GetValue(self))
TypeError: unbound method GetValue() must be called with TextEntryDialog instance as first argument (got ForceVariableDialog instance instead)

Thu, 14 Feb 2019 10:02:58 +0300Fix redraw problems in preview frames and debug panel
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 14 Feb 2019 10:02:58 +0300] rev 2509
Fix redraw problems in preview frames and debug panel

The problem was that direct call of RefreshView (now DrawView) doesn't
generate EVT_PAINT (at least on GNU/Linux with Wayland and wxgtk build
with gtk3+ support).
Now RefreshView simply triggers EVT_PAINT and EVT_PAINT handler does actual work.

Thu, 14 Feb 2019 09:44:19 +0300Rewrite ForceVariableDialog. It's not based on wx.TextEntryDialog
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 14 Feb 2019 09:44:19 +0300] rev 2508
Rewrite ForceVariableDialog. It's not based on wx.TextEntryDialog

Don't customize standard wx.TextEntryDialog on the fly, implement your
own dialog for that with expected behavior and without any hacks.

Wed, 13 Feb 2019 13:35:48 +0000merge updates to modbus/mb_runtime.c
Mario de Sousa <msousa@fe.up.pt> [Wed, 13 Feb 2019 13:35:48 +0000] rev 2507
merge updates to modbus/mb_runtime.c

Mon, 14 Jan 2019 12:30:32 +0300fix 'SaveAs' in case of overwriting existing project
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 14 Jan 2019 12:30:32 +0300] rev 2506
fix 'SaveAs' in case of overwriting existing project

Traceback (most recent call last):
File "/home/developer/WorkData/PLC/beremiz/beremiz/BeremizIDE.py", line 959, in OnSaveProjectAsMenu
self.CTR.SaveProjectAs()
File "/home/developer/WorkData/PLC/beremiz/beremiz/ProjectController.py", line 600, in SaveProjectAs
self.SaveProject(old_project_path)
File "/home/developer/WorkData/PLC/beremiz/beremiz/ProjectController.py", line 579, in SaveProject
self._getProjectFilesPath(self.ProjectPath))
File "/usr/lib/python2.7/shutil.py", line 200, in copytree
os.makedirs(dst)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 17] File exists: '/tmp/tests/project_files'

Mon, 14 Jan 2019 12:17:48 +0300fix 'SaveAs' to non-empty directory and directory without write permissions
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 14 Jan 2019 12:17:48 +0300] rev 2505
fix 'SaveAs' to non-empty directory and directory without write permissions

Sat, 12 Jan 2019 15:02:17 +0300fix problems with recursive beremiz.h inclusion
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 12 Jan 2019 15:02:17 +0300] rev 2504
fix problems with recursive beremiz.h inclusion

Sat, 12 Jan 2019 13:57:16 +0300remove LogMessage prototype from plc_main_head.c
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sat, 12 Jan 2019 13:57:16 +0300] rev 2503
remove LogMessage prototype from plc_main_head.c

it's not needed, because prototype is included in beremiz.h
But it caused problems with TARGET_LOGGING_DISABLE.

Mon, 07 Jan 2019 23:28:28 +0300merge
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 07 Jan 2019 23:28:28 +0300] rev 2502
merge

Sun, 06 Jan 2019 03:11:39 +0300Make online debug optional
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sun, 06 Jan 2019 03:11:39 +0300] rev 2501
Make online debug optional

It could be useful for very small targets like Atmega (Arduino) and
for target bring-up there developer want to have running PLC program,
but has not implemented runtime communication yet.


TARGET_DEBUG_AND_RETAIN_DISABLE - completely disable debug and retain
functionality. Previously named TARGET_DEBUG_DISABLE.

TARGET_ONLINE_DEBUG_DISABLE - can be used to enable retain
functionality (no define TARGET_DEBUG_AND_RETAIN_DISABLE is used), but disable
online debug with corresponding RAM/FLASH overhead.

TARGET_LOGGING_DISABLE - disables logging functionality from runtime and PLC program

TARGET_EXT_SYNC_DISABLE - disables PLC program synchronization with
external events. For example, it could be used to synchronize several
PLCs that control motors for different axes.

By default all these options are off.

To test generate program for Generic target, put following files in
project files directory and run build.sh after generating PLC program.
This is very easy to integrate into makefile (Generic target).

[------------- build.sh --------------------------]
files=$(find $PWD/../build -iname '*.c' | grep -v POUS.c)
arm-none-eabi-gcc \
-DTARGET_DEBUG_AND_RETAIN_DISABLE \
-DTARGET_ONLINE_DEBUG_DISABLE \
-DTARGET_LOGGING_DISABLE \
-DTARGET_EXT_SYNC_DISABLE \
-flto -ffunction-sections -fdata-sections -I../../../../matiec/lib/C \
$files \
main.c \
-Wl,--Map=./program.map,--cref \
-nodefaultlibs --specs=nano.specs -Wl,--static -Wl,--gc-section -Wl,--start-group -lc -lm -lnosys -lgcc -Wl,--end-group
[------------------------------------------------]

[------------- main.c --------------------------]
#ifndef TARGET_DEBUG_AND_RETAIN_DISABLE
void Retain(void){}
void InValidateRetainBuffer(void){}
void ValidateRetainBuffer(void){}
#endif

extern void __run(void);
int main(void)
{
for(;;) {
__run();
// sleep common_ticktime__ ns
// add common_ticktime__ ns to __CURRENT_TIME
}
return 0;
}
[------------------------------------------------]

Sun, 06 Jan 2019 02:00:07 +0300Disable Python extension in First steps example
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sun, 06 Jan 2019 02:00:07 +0300] rev 2500
Disable Python extension in First steps example

Sun, 06 Jan 2019 01:22:46 +0300use pregenerated CRC32 lookup tables for retain on Win32 and GNU/Linux
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Sun, 06 Jan 2019 01:22:46 +0300] rev 2499
use pregenerated CRC32 lookup tables for retain on Win32 and GNU/Linux

This code could be possible reused on low-end targets with limited RAM.

code to generate lookup table:
[---------------------------------------------------------------------]

/* CRC lookup table and initial state. */
uint32_t crc32_table[256];

/* Generate CRC32 lookup table. */
void GenerateCRC32Table(void)
{
unsigned int i, j;
/* Use CRC-32-IEEE 802.3 polynomial 0x04C11DB7 (bit reflected). */
uint32_t poly = 0xEDB88320;

for (i = 0; i <= 0xFF; i++)
{
uint32_t c = i;
for (j = 0 ; j < 8 ; j++)
c = (c & 1) ? (c >> 1 ) ^ poly : (c >> 1);
crc32_table[i] = c;
}
}

void main(void)
{
GenerateCRC32Table();
int j=0;
for(int i=0; i<256; i++) {
printf("0x%08X, ", crc32_table[i]);
if (++j >= 8) {
j = 0;
printf("\n");
}
}
}
[---------------------------------------------------------------------]

Mon, 07 Jan 2019 20:24:49 +0000Merged in masterschlumpf/beremiz/wx3-fix (pull request #37)
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 07 Jan 2019 20:24:49 +0000] rev 2498
Merged in masterschlumpf/beremiz/wx3-fix (pull request #37)

Fix an exception with wx-3.0-gtk3 in PLCOpenEditor when generating ST files

Approved-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>

Mon, 07 Jan 2019 18:32:03 +0100Fix an exception on wx-3.0-gtk3 in PLCOpenEditor when generating ST files. wx3-fix
Schlumpf <schlumpf@kr-ll.de> [Mon, 07 Jan 2019 18:32:03 +0100] rev 2497
Fix an exception on wx-3.0-gtk3 in PLCOpenEditor when generating ST files.

On Python2.7 with WX3.0 and GTK3, an assertionError rises on generating a ST file if the name is already set. The first generation works without problems, if you generate the file a second one, PLCOpenEditor tries to open the file
save dialog with the pre entered name from last run. Then the following assertion pops up:

PyAssertionError: C++ assertion "volDummy.empty() && pathDummy.empty()" failed at ./src/common/filename.cpp(568) in Assign(): the file name shouldn't contain the path

This fix reduces the filepath of the ST file the to the filename. Now it works fine.

Mon, 24 Dec 2018 16:44:06 +0300Fix typos in function names
Dmitriy Kuzmin <z644813828@gmail.com> [Mon, 24 Dec 2018 16:44:06 +0300] rev 2496
Fix typos in function names

Mon, 24 Dec 2018 16:22:28 +0300update links to matiec and beremiz repos in README
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 24 Dec 2018 16:22:28 +0300] rev 2495
update links to matiec and beremiz repos in README

Mon, 24 Dec 2018 16:20:20 +0300fix zoom-in/zoom-out using mouse wheel
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 24 Dec 2018 16:20:20 +0300] rev 2494
fix zoom-in/zoom-out using mouse wheel

regression introduced by 2393:235f847be37e "python3 support: pylint, W1619 #(old-division) division w/o __future__ statement"

Mon, 11 Mar 2019 09:18:58 +0100better pylint complain workaround
Edouard Tisserant <edouard.tisserant@gmail.com> [Mon, 11 Mar 2019 09:18:58 +0100] rev 2493
better pylint complain workaround

Mon, 11 Mar 2019 01:03:32 +0100check_sources.sh makes me become even less productive
Edouard Tisserant <edouard.tisserant@gmail.com> [Mon, 11 Mar 2019 01:03:32 +0100] rev 2492
check_sources.sh makes me become even less productive

Thu, 07 Mar 2019 21:57:18 +0100Added stub axis_s type in EtherLAB CiA402 support code, until Motion Contol Library comes back
Edouard Tisserant <edouard.tisserant@gmail.com> [Thu, 07 Mar 2019 21:57:18 +0100] rev 2491
Added stub axis_s type in EtherLAB CiA402 support code, until Motion Contol Library comes back

Tue, 19 Feb 2019 11:27:29 +0100Allow using one XSD based target description for many targets. Target description XSD can now use %(target_name)s to refer to target name.
Edouard Tisserant [Tue, 19 Feb 2019 11:27:29 +0100] rev 2490
Allow using one XSD based target description for many targets. Target description XSD can now use %(target_name)s to refer to target name.

Thu, 14 Feb 2019 10:06:43 +0100Fix previous commit : Using wx.CallAfter shouldn't have been necessary, and was a symptom of failing evaluator's deadlock detection.
Edouard Tisserant [Thu, 14 Feb 2019 10:06:43 +0100] rev 2489
Fix previous commit : Using wx.CallAfter shouldn't have been necessary, and was a symptom of failing evaluator's deadlock detection.

Wed, 13 Feb 2019 13:08:26 +0100Fix startup of wxGlade base HMI. Wx calls were issued from non-wx thread (main).
Edouard Tisserant [Wed, 13 Feb 2019 13:08:26 +0100] rev 2488
Fix startup of wxGlade base HMI. Wx calls were issued from non-wx thread (main).

Wed, 13 Feb 2019 09:41:35 +0100Reworked chunk based transfer to support duplicated files (i.e. files with same content, but different names)
Edouard Tisserant [Wed, 13 Feb 2019 09:41:35 +0100] rev 2487
Reworked chunk based transfer to support duplicated files (i.e. files with same content, but different names)

Fri, 01 Feb 2019 14:14:13 +0100Fixed deadlock in runtime's Worker. Was discovered while using WAMP and PYRO simultaneously.
Edouard Tisserant [Fri, 01 Feb 2019 14:14:13 +0100] rev 2486
Fixed deadlock in runtime's Worker. Was discovered while using WAMP and PYRO simultaneously.

Thu, 31 Jan 2019 14:10:06 +0100Add a debugger token to SetTraceVariables and GetTraceVariables to prevent crash an inconsistant data in case of multiple connections. Last connection now takes over existing connections's debug, and first connected IDE gets a wrning.
Edouard Tisserant [Thu, 31 Jan 2019 14:10:06 +0100] rev 2485
Add a debugger token to SetTraceVariables and GetTraceVariables to prevent crash an inconsistant data in case of multiple connections. Last connection now takes over existing connections's debug, and first connected IDE gets a wrning.

Tue, 29 Jan 2019 09:14:47 +0100Fixed deadlock when using Wx together with Twisted in runtime.
Edouard Tisserant [Tue, 29 Jan 2019 09:14:47 +0100] rev 2484
Fixed deadlock when using Wx together with Twisted in runtime.

Fri, 25 Jan 2019 14:06:11 +0100Split IDE's frame OnCloseFrame() into TryCloseFrame() and OnCloseFrame(), to help further customization
Edouard Tisserant [Fri, 25 Jan 2019 14:06:11 +0100] rev 2483
Split IDE's frame OnCloseFrame() into TryCloseFrame() and OnCloseFrame(), to help further customization

Wed, 09 Jan 2019 14:10:07 +0100fixed exception happening randomly just after showing discovery panel.
Edouard Tisserant [Wed, 09 Jan 2019 14:10:07 +0100] rev 2482
fixed exception happening randomly just after showing discovery panel.

Wed, 09 Jan 2019 14:09:02 +0100fixed exception happening when connecting to empty URI, and set URI through URI Editor Dialog popping up becaue empty.
Edouard Tisserant [Wed, 09 Jan 2019 14:09:02 +0100] rev 2481
fixed exception happening when connecting to empty URI, and set URI through URI Editor Dialog popping up becaue empty.

Mon, 07 Jan 2019 13:50:39 +0100Merged Mario's modbus fix : Modbus plugin: reset periodic activation timer when overrun occurs (delays due to communication errors, ...)
Edouard Tisserant [Mon, 07 Jan 2019 13:50:39 +0100] rev 2480
Merged Mario's modbus fix : Modbus plugin: reset periodic activation timer when overrun occurs (delays due to communication errors, ...)

Sat, 02 Jun 2018 11:56:01 +0100Modbus plugin: reset periodic activation timer when overrun occurs (delays due to communication errors, ...)
Mario de Sousa <msousa@fe.up.pt> [Sat, 02 Jun 2018 11:56:01 +0100] rev 2479
Modbus plugin: reset periodic activation timer when overrun occurs (delays due to communication errors, ...)