Skip to content

Commit 18ed164

Browse files
Cleanup: Remove Old TODOs / Remove Unused p_messageOutput from Export-Context
* Parameter `UCT_ExportUserLog` does not exist Anymore * Encoding should not be changed anymore for format-version cv1
1 parent 1edc551 commit 18ed164

3 files changed

Lines changed: 10 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# (upcoming) v0.6.0 "Fehler-Behandlung"
22

3+
* Cleanup:
4+
* Remove `p_messageOutput` from Context of `uctBtnExport`, as Parameter `UCT_ExportUserLog` does not exist Anymore
5+
* Remove Outdated TODOs
36
* Dokumentation: Fix Einrückung in Readme
47
* Chore: Replace Deprecated GitHub Actions
58

src/ConfigTransfer.script.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ function uctBtnExport(device, online, progress, context) {
2323
var exportFormat = (exportFormatSelection==3) ? "" : "name";
2424
var multiLine = (exportFormatSelection==1);
2525

26-
// TODO add p_messageOutput again?
27-
2826
var param_exportOutput = device.getParameterByName(context.p_exportOutput);
2927
param_exportOutput.value = uctExportModuleChannelToString(device, module, channelSource, exportFormat, multiLine, includeHidden, includeDefault);
3028
Log.info("OpenKNX ConfigTransfer: Handle Channel Export [DONE]")
@@ -94,7 +92,6 @@ function uctBtnReset(device, online, progress, context) {
9492

9593

9694
function uctSerializeParamValue(paramValue) {
97-
/* TODO check inclusion of ` ` and common characters without encoding */
9895
return encodeURIComponent(paramValue);
9996
}
10097

@@ -453,7 +450,7 @@ function uctImportModuleChannelFromString(device, module, channel, exportStr, im
453450
}
454451
}
455452

456-
// TODO implement handling of module version '*'
453+
// module version '*' is deprecated and should not longer used, but never created by export
457454

458455
// check app
459456
// '*' will not be accepted when app should be the same
@@ -507,7 +504,6 @@ function uctImportModuleChannelFromString(device, module, channel, exportStr, im
507504
if (!writeClean) {
508505
Log.error("OpenKNX ConfigTransfer: ImportModuleChannelFromString - Write Params produced Errors!");
509506
}
510-
/* TODO check need of validation, or repeated writing to compensate values updated by ETS, e.g. by calc */
511507

512508
Log.info("OpenKNX ConfigTransfer: ImportModuleChannelFromString [DONE]");
513509
var msg = module + "/" + channel + " Import ";
@@ -593,7 +589,7 @@ function uctPrepareParamValues(module, params, importContent, result, merge, all
593589
// TODO FIXME: Ensure same version!
594590
paramIndex = paramKey;
595591
} else {
596-
// TODO error-handling
592+
// will be ignored, ware or produce an error (depending on module and call)
597593
}
598594

599595
if (paramIndex >=0) {
@@ -687,10 +683,10 @@ function uctSwapModuleChannel(device, progress, module, channelA, channelB) {
687683
throw new Error('Zu tauschende Kanäle dürfen NICHT identisch sein!');
688684
}
689685
/* TODO check swap without serialize/deserialize */
690-
var exportStrA = uctExportModuleChannelToString(device, /* TODO progress,*/ module, channelA, "", false, true, false);
691-
var exportStrB = uctExportModuleChannelToString(device, /* TODO progress,*/ module, channelB, "", false, true, false);
692-
uctImportModuleChannelFromString(device, /* TODO progress,*/ module, channelB, exportStrA, 7);
693-
uctImportModuleChannelFromString(device, /* TODO progress,*/ module, channelA, exportStrB, 7);
686+
var exportStrA = uctExportModuleChannelToString(device, /* progress,*/ module, channelA, "", false, true, false);
687+
var exportStrB = uctExportModuleChannelToString(device, /* progress,*/ module, channelB, "", false, true, false);
688+
uctImportModuleChannelFromString(device, /* progress,*/ module, channelB, exportStrA, 7);
689+
uctImportModuleChannelFromString(device, /* progress,*/ module, channelA, exportStrB, 7);
694690
return module + "/" + channelA + " <--> " + module + "/" + channelB + " [OK]";
695691
}
696692

src/ConfigTransfer.share.Export.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</when>
3434
</choose>
3535
<ParameterRefRef RefId="%AID%_P-%TT%00202_R-%TT%0020201" HelpContext="UCT-Format" />
36-
<Button Id="%AID%_B-%TT%00200" Text="Exportieren" EventHandler="uctBtnExport" EventHandlerParameters="{ &quot;p_moduleSelection&quot;:&quot;%PREFIX%_ExportModul&quot;, &quot;p_channelSource&quot;:&quot;%PREFIX%_ExportSource&quot;, &quot;p_exportParamSelectionSelection&quot;:&quot;%PREFIX%_ExportParamSelection&quot;, &quot;p_exportFormatSelection&quot;:&quot;%PREFIX%_ExportFormat&quot;, &quot;p_messageOutput&quot;:&quot;%PREFIX%_ExportUserLog&quot; , &quot;p_exportOutput&quot;:&quot;%PREFIX%_ExportOutput&quot; }" />
36+
<Button Id="%AID%_B-%TT%00200" Text="Exportieren" EventHandler="uctBtnExport" EventHandlerParameters="{ &quot;p_moduleSelection&quot;:&quot;%PREFIX%_ExportModul&quot;, &quot;p_channelSource&quot;:&quot;%PREFIX%_ExportSource&quot;, &quot;p_exportParamSelectionSelection&quot;:&quot;%PREFIX%_ExportParamSelection&quot;, &quot;p_exportFormatSelection&quot;:&quot;%PREFIX%_ExportFormat&quot;, &quot;p_exportOutput&quot;:&quot;%PREFIX%_ExportOutput&quot; }" />
3737
<!--
3838
<ParameterRefRef RefId="%AID%_P-%TT%00203_R-%TT%0020301" />
3939
-->

0 commit comments

Comments
 (0)