Skip to content

Commit ca8f49a

Browse files
Release 2.2.2 (#5)
# Release 2.2.2 ## Improvements - Check if specific set functions are supported (e.g. not for SIM300 or SAE) ## Bugfix - Legacy bindings of ValueDisplay elements within UI did not work if deployed with VS Code AppSpace SDK - UI differs if deployed via Appstudio or VS Code AppSpace SDK - Fullscreen icon of iFrame was visible
1 parent ea53a29 commit ca8f49a

11 files changed

Lines changed: 329 additions & 185 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## Release 2.2.2
5+
6+
### Improvements
7+
- Check if specific set functions are supported (e.g. not for SIM300 or SAE)
8+
9+
### Bugfix
10+
- Legacy bindings of ValueDisplay elements within UI did not work if deployed with VS Code AppSpace SDK
11+
- UI differs if deployed via Appstudio or VS Code AppSpace SDK
12+
- Fullscreen icon of iFrame was visible
13+
414
## Release 2.2.1
515

616
### Bugfix

CSK_Module_DeviceNetworkConfig/pages/pages/CSK_Module_DeviceNetworkConfig/CSK_Module_DeviceNetworkConfig.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@
5252

5353
.myCustomButton_CSK_Module_DeviceNetworkConfig {
5454
border-radius: 30px;
55-
padding-right: 0px;
55+
padding: 11px;
5656
}

CSK_Module_DeviceNetworkConfig/pages/pages/CSK_Module_DeviceNetworkConfig/CSK_Module_DeviceNetworkConfig.html

Lines changed: 197 additions & 148 deletions
Large diffs are not rendered by default.

CSK_Module_DeviceNetworkConfig/pages/src/converter.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ export function InvalidUpstreamIPv4Display(inState) {
2020
export function changeStyle(theme) {
2121
const style: HTMLStyleElement = document.createElement('style');
2222
style.id ='blub'
23+
24+
const toggleSW = document.querySelectorAll("davinci-toggle-switch")
25+
toggleSW.forEach((userItem) => {
26+
const shadowToggle = userItem.shadowRoot
27+
const finalToggleSW = shadowToggle?.querySelector('div')
28+
finalToggleSW?.classList.add('hasIcon')
29+
});
30+
2331
if (theme == 'CSK_Style'){
2432
var headerToolbar = `.sopasjs-ui-header-toolbar-wrapper { background-color: #FFFFFF; }`
2533
var uiHeader = `.sopasjs-ui-header>.app-logo { margin-right:0px; }`

CSK_Module_DeviceNetworkConfig/pages/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ document.addEventListener('sopasjs-ready', () => {
1212
page_Setup.remove();
1313

1414
setTimeout(() => {
15-
document.title = 'CSK_Module_DeviceNetworkConfig'
15+
const element = document.querySelector("div.sjs-wrapper > div > div.sjs-fullscreen-toggle")
16+
if(element) {
17+
element.parentElement.removeChild(element)
18+
}
19+
document.title = 'CSK_Module_DeviceNetworkConfig'
1620
}, 500);
1721
})

CSK_Module_DeviceNetworkConfig/project.mf.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ See following descriptions of events/functions regarding further information.
132132
<desc>Notify if module can be used on device.</desc>
133133
<param desc="Status" multiplicity="1" name="status" type="bool"/>
134134
</event>
135+
<event name="OnNewStatusSetFunctionsNotSupported">
136+
<desc>Notify if module can not be used to set configuration (some devices only show current config).</desc>
137+
<param desc="Status" multiplicity="1" name="status" type="bool"/>
138+
</event>
135139
<function name="pageCalled">
136140
<desc>Function to register "OnResume" of the module UI (only as helper function).</desc>
137141
<return desc="Empty string (only needed to simplify binding)." multiplicity="1" name="empty" type="string"/>
@@ -227,7 +231,7 @@ See following descriptions of events/functions regarding further information.
227231
</serves>
228232
</crown>
229233
<meta key="author">SICK AG</meta>
230-
<meta key="version">2.2.1</meta>
234+
<meta key="version">2.2.2</meta>
231235
<meta key="priority">low</meta>
232236
<meta key="copy-protected">false</meta>
233237
<meta key="read-protected">false</meta>

CSK_Module_DeviceNetworkConfig/scripts/Configuration/DeviceNetworkConfig/DeviceNetworkConfig_Controller.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ local deviceNetworkConfig_Model
3535
Script.serveEvent('CSK_DeviceNetworkConfig.OnNewStatusModuleVersion', 'DeviceNetworkConfig_OnNewStatusModuleVersion')
3636
Script.serveEvent('CSK_DeviceNetworkConfig.OnNewStatusCSKStyle', 'DeviceNetworkConfig_OnNewStatusCSKStyle')
3737
Script.serveEvent('CSK_DeviceNetworkConfig.OnNewStatusModuleIsActive', 'DeviceNetworkConfig_OnNewStatusModuleIsActive')
38+
Script.serveEvent('CSK_DeviceNetworkConfig.OnNewStatusSetFunctionsNotSupported', 'DeviceNetworkConfig_OnNewStatusSetFunctionsNotSupported')
3839

3940
Script.serveEvent("CSK_DeviceNetworkConfig.OnNewStatusLoadParameterOnReboot", "DeviceNetworkConfig_OnNewStatusLoadParameterOnReboot")
4041
Script.serveEvent("CSK_DeviceNetworkConfig.OnPersistentDataModuleAvailable", "DeviceNetworkConfig_OnPersistentDataModuleAvailable")
@@ -332,6 +333,7 @@ local function handleOnExpiredTmrDeviceNetworkConfig()
332333
Script.notifyEvent("DeviceNetworkConfig_OnNewStatusModuleVersion", 'v' .. deviceNetworkConfig_Model.version)
333334
Script.notifyEvent("DeviceNetworkConfig_OnNewStatusCSKStyle", deviceNetworkConfig_Model.styleForUI)
334335
Script.notifyEvent("DeviceNetworkConfig_OnNewStatusModuleIsActive", _G.availableAPIs.default and _G.availableAPIs.specific)
336+
Script.notifyEvent("DeviceNetworkConfig_OnNewStatusSetFunctionsNotSupported", _G.availableAPIs.noSetSupport)
335337

336338
updateUserLevel()
337339

CSK_Module_DeviceNetworkConfig/scripts/Configuration/DeviceNetworkConfig/DeviceNetworkConfig_Model.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ local function refreshInterfaces()
8181
return deviceNetworkConfig_Model.interfacesTable
8282
end
8383
deviceNetworkConfig_Model.refreshInterfaces = refreshInterfaces
84+
refreshInterfaces()
8485

8586
local function getNetworkDescription()
8687
if deviceNetworkConfig_Model.interfacesTable ~= {} then

CSK_Module_DeviceNetworkConfig/scripts/Configuration/DeviceNetworkConfig/helper/checkAPIs.lua

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,22 @@ local function loadDateTimeAPIs()
4646
DateTime = require 'API.DateTime'
4747
end
4848

49+
-- Function to check if set features are not available
50+
local function checkSetFunctionsNotSupported()
51+
local deviceName = Engine.getTypeName()
52+
local isSIM300 = string.find(deviceName, 'SIG300') or string.find(deviceName, 'SIM300')
53+
local isSAE = string.find(deviceName, 'AppEngine') or string.find(deviceName, 'Emulator')
54+
if isSIM300 or isSAE then
55+
return true
56+
else
57+
return false
58+
end
59+
end
60+
4961
availableAPIs.default = xpcall(loadAPIs, debug.traceback) -- TRUE if all default APIs were loaded correctly
5062
availableAPIs.specific = xpcall(loadSpecificAPIs, debug.traceback) -- TRUE if all specific APIs were loaded correctly
5163
availableAPIs.dateTime = xpcall(loadDateTimeAPIs, debug.traceback) -- TRUE if DateTime API was loaded correctly
64+
availableAPIs.noSetSupport = checkSetFunctionsNotSupported() -- TRUE if set function are not supported
5265

5366
return availableAPIs
5467
--**************************************************************************

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ For further information check out the [documentation](https://raw.githack.com/SI
1212
Tested on:
1313
|Device|Firmware|Module version|
1414
|--|--|--|
15+
|SIM800|V1.1.1|V2.2.2|
1516
|SICK AppEngine|V1.7.0|V2.2.0|
1617
|SIM1012|V2.4.2|V2.2.0|
1718
|SIM1000FX|V1.7.2|<V2.2.0|

0 commit comments

Comments
 (0)