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;
}
[------------------------------------------------]