Skip to content

Commit

Permalink
Merge branch 'release/V1.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleybuchanan committed May 27, 2022
2 parents d279ce5 + 37da11b commit 264e8a0
Show file tree
Hide file tree
Showing 290 changed files with 11,467 additions and 1,093 deletions.
29 changes: 15 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
# Git Repository File Ignore Specifications
# B&R Automation Studio project directory files

# Ignore every Binaries/ directory (the entire folder)
**/Binaries
# Ignore everything INSIDE every Diagnosis/ directory
**/Diagnosis/**
# Ignore every Temp/ directory
**/Temp
*/AS/System/
# Ignore Binaries/ directory (the entire folder)
*/Binaries
# Ignore everything INSIDE Diagnosis/ directory
*/Diagnosis/**
# Ignore Temp/ directory
*/Temp

# Ignore all .set and .isopen files
*.set
*.isopen
# Make exception for safety code
!cpu.set
*/*.set
*/*.isopen

# Ignore .zip files, for the moment
*.zip

# Ignore .bak files
*.bak

# Exception for Diagnosis/ sub-directories -> these won't be committed anyways
# because there are no files inside that will be committed
# Credit: Jim G. on Stack Overflow https://stackoverflow.com/a/25916709/11402416
Expand All @@ -35,4 +31,9 @@
!**/Diagnosis/**/*.PVM
!**/Diagnosis/**/*.tc

# add here

# ignore temp files
*~
~*
*.[Bb]ak
*.[Oo]rig
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 B&R Industrial Automation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion mappFramework/Logical/ChineseHelp/Package.pkg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<?AutomationStudio Version=4.8.6.30 SP?>
<Package xmlns="http://br-automation.co.at/AS/Package">
<Objects>
<Object Type="File">mappFramwork.chm</Object>
Expand Down
Binary file modified mappFramework/Logical/ChineseHelp/mappFramwork.chm
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ TYPE
Delete : BOOL; (*Delete a backup*)
SaveConfig : BOOL; (*Save automatic backup configuration settings*)
Reset : BOOL; (*Error reset*)
PageDown : BOOL; (*Page Down*)
PageUp : BOOL; (*Page Up*)
END_STRUCT;
BackupHmiParametersType : STRUCT (*Structure to hold the parameters for the HMI*)
Name : STRING[80] := 'myBackup'; (*Name of the backup*)
Expand All @@ -32,6 +34,7 @@ TYPE
SelectedIndex : USINT; (*Index of the selected backup file*)
LastSelectedIndex : USINT; (*Index of the last selected backup file*)
LastSelectedDeviceIndex : UINT; (*Index of the last selected file device. Compared with MpFileManagerUIConnect.DeviceList.SelectedIndex*)
FileOverMax : BOOL; (*Active when more than 50 items detected*)
END_STRUCT;
AutomaticBackupType : STRUCT (*Automatic backup settings*)
Enable : BOOL; (*Enable automatic backup feature*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
VAR
MpBackupCore_0 : MpBackupCore; (*MpBackupCore instance*)
MpBackupCoreConfig_0 : MpBackupCoreConfig; (*MpBackupCoreConfig instance*)
MpFileManagerUI_0 : MpFileManagerUI; (*MpFileManagerUI instance*)
MpFileManagerUI_0 : MpFileManagerUI := (UISetup:=(FileListSize:=50)); (*MpFileManagerUI instance*)
DirCreate_0 : DirCreate; (*DirCreate instance*)
END_VAR
(*Constants*)
Expand All @@ -24,4 +24,5 @@ END_VAR
VAR
i : USINT; (*Index for loops*)
DeviceCount : USINT; (*Counter for available file devices*)
ItemCount : UDINT;
END_VAR
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ACTION FormatDeviceDataProvider:

// Select CF device if USB device is not available
FOR i := 0 TO MAX_IDX_USB_DEV_LIST DO
FOR i := 0 TO ((SIZEOF(gUSBAvailable) / SIZEOF(gUSBAvailable[0])) - 1) DO
IF gUSBAvailable[i] THEN
HmiBackup.Status.DeviceDataProvider[i + 1] := '{"value":"USB';
brsitoa(i + 1, ADR(HmiBackup.Status.DeviceDataProvider[i + 1]) + brsstrlen(ADR(HmiBackup.Status.DeviceDataProvider[i + 1])));
Expand All @@ -18,7 +18,7 @@ ACTION FormatDeviceDataProvider:

// Configure visible device list
HmiBackup.Status.TableConfig[0] := '{ "specRows": [{"from":';
FOR i := 0 TO 9 DO
FOR i := 0 TO ((SIZEOF(MpFileManagerUIConnect.DeviceList.DeviceNames)/SIZEOF(MpFileManagerUIConnect.DeviceList.DeviceNames[0])) - 1) DO
IF MpFileManagerUIConnect.DeviceList.DeviceNames[i] <> '' THEN
DeviceCount := i + 1;
END_IF
Expand All @@ -27,10 +27,13 @@ ACTION FormatDeviceDataProvider:
brsstrcat(ADR(HmiBackup.Status.TableConfig[0]), ADR(',"to":9, "visible":false}]}'));

// Configure visible file list
HmiBackup.Status.TableConfig[1] := '{ "specRows": [{"from":';
brsitoa((MpFileManagerUIConnect.File.PathInfo.FileCount + MpFileManagerUIConnect.File.PathInfo.FolderCount), ADR(HmiBackup.Status.TableConfig[1]) + brsstrlen(ADR(HmiBackup.Status.TableConfig[1])));
brsstrcat(ADR(HmiBackup.Status.TableConfig[1]), ADR(',"to":49, "visible":false}]}'));

ItemCount := MpFileManagerUIConnect.File.PathInfo.FileCount + MpFileManagerUIConnect.File.PathInfo.FolderCount;
HmiBackup.Status.TableConfig[1] := '{ "specRows": [{"from":';
brsitoa((ItemCount), ADR(HmiBackup.Status.TableConfig[1]) + brsstrlen(ADR(HmiBackup.Status.TableConfig[1])));
brsstrcat(ADR(HmiBackup.Status.TableConfig[1]), ADR(',"to":50, "visible":false}]}'));

HmiBackup.Status.FileOverMax := ItemCount > 50;

END_ACTION

ACTION SaveBackupConfiguration:
Expand Down
Loading

0 comments on commit 264e8a0

Please sign in to comment.