Skip to content

Commit cb75f3f

Browse files
committed
Merge branch 'main' into fix/clear-localstorage-for-new-version
2 parents 26e4ab1 + 01f9d98 commit cb75f3f

File tree

6 files changed

+22
-9
lines changed

6 files changed

+22
-9
lines changed

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@
1414
path = packages/external-plugins/oscd-template-generator
1515
url = https://github.com/OpenEnergyTools/oscd-template-generator
1616
branch = deploy
17+
[submodule "packages/external-plugins/scl-template-update"]
18+
path = packages/external-plugins/scl-template-update
19+
url = https://github.com/OpenEnergyTools/scl-template-update
20+
branch = deploy

packages/compas-open-scd/public/js/plugins.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ export const officialPlugins = [
143143
kind: 'editor',
144144
requireDoc: true
145145
},
146+
{
147+
name: 'Template Update',
148+
src: '/external-plugins/scl-template-update/scl-template-update.js',
149+
icon: 'copy_all',
150+
activeByDefault: false,
151+
kind: 'editor',
152+
requireDoc: true
153+
},
146154
{
147155
name: 'Open project',
148156
src: '/src/menu/CompasOpen.js',
Submodule scl-template-update added at 8f587d0

packages/plugins/src/menu/Export104.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default class Export104 extends LitElement {
6666
if (signal104Data.isMonitorSignal) {
6767
line.push(signal104Data.ioa ?? '', '');
6868
} else {
69-
line.push('', signal104Data.ioa ?? '');
69+
line.push(signal104Data.ioa ?? '', signal104Data.ioa ?? '');
7070
}
7171

7272
lines.push(line);

packages/plugins/src/menu/export104/foundation.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface ExtractSignal104Result {
1717

1818
enum SignalType {
1919
Monitor,
20-
Control,
20+
MonitorAndControl,
2121
Unknown
2222
}
2323

@@ -88,7 +88,7 @@ function extractSignal104Data(addressElement: Element, doc: XMLDocument): Extrac
8888

8989
const substationName = parentSubstation.getAttribute('name');
9090

91-
const name = `${substationName}${voltageLevelName}${bayName}${doiDesc}`;
91+
const name = `${substationName} ${voltageLevelName} ${bayName} ${doiDesc}`;
9292

9393
return {
9494
signal: {
@@ -112,7 +112,7 @@ function getSignalType(tiString: string): SignalType {
112112
if ((ti >= 1 && ti <= 21) || (ti >= 30 && ti <= 40)) {
113113
return SignalType.Monitor;
114114
} else if ((ti >= 45 && ti <= 51) || (ti >= 58 && ti <= 64)) {
115-
return SignalType.Control;
115+
return SignalType.MonitorAndControl;
116116
} else {
117117
return SignalType.Unknown;
118118
}

packages/plugins/test/unit/menu/104Export/foundation.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,35 @@ describe('Export104 foundation', () => {
1616

1717
const expectedSignals = [
1818
{
19-
name: 'S1F2V105Control1',
19+
name: 'S1 F2 V105 Control1',
2020
signalNumber: '3001',
2121
isMonitorSignal: false,
2222
ioa: '1053001',
2323
ti: '50'
2424
},
2525
{
26-
name: 'S1F2V105Control2',
26+
name: 'S1 F2 V105 Control2',
2727
signalNumber: '3002',
2828
isMonitorSignal: false,
2929
ioa: '1053002',
3030
ti: '64'
3131
},
3232
{
33-
name: 'S1F1V104Behavior',
33+
name: 'S1 F1 V104 Behavior',
3434
signalNumber: '2001',
3535
isMonitorSignal: true,
3636
ioa: '1042001',
3737
ti: '35'
3838
},
3939
{
40-
name: 'S1F1V104Behavior',
40+
name: 'S1 F1 V104 Behavior',
4141
signalNumber: '2002',
4242
isMonitorSignal: true,
4343
ioa: '1042002',
4444
ti: '35'
4545
},
4646
{
47-
name: 'S1F1V103Behavior',
47+
name: 'S1 F1 V103 Behavior',
4848
signalNumber: '1003',
4949
isMonitorSignal: true,
5050
ioa: '1031003',

0 commit comments

Comments
 (0)