Mentions légales du service

Skip to content
Snippets Groups Projects
Commit cad38ec0 authored by SECK Jean-Camille's avatar SECK Jean-Camille
Browse files

Merge branch 'wattmetre-port' into 'master'

[wattmetre] Correct the port incrementation generated by input_loader.rb

See merge request !831
parents 84f55aeb 98c64530
Branches
No related tags found
1 merge request!831[wattmetre] Correct the port incrementation generated by input_loader.rb
Pipeline #1064425 passed with warnings
......@@ -33,7 +33,7 @@
"25": "sagittaire-3",
"26": "sagittaire-4",
"27": "sagittaire-5",
"28": "sagittaire-7",
"29": "sagittaire-7",
"3": "gemini-1",
"30": "gemini-2",
"31": "gemini-2",
......
......@@ -205,7 +205,7 @@
},
{
"kind": "wattmetre-only",
"port": 0,
"port": 4,
"uid": "wattmetrev3-1"
}
],
......
......@@ -205,7 +205,7 @@
},
{
"kind": "wattmetre-only",
"port": 1,
"port": 5,
"uid": "wattmetrev3-1"
}
],
......
......@@ -14,8 +14,6 @@
],
"model": "v3",
"ports": {
"0": "paradoxe-31",
"1": "paradoxe-32",
"10": "paradoxe-5",
"11": "paradoxe-6",
"12": "paradoxe-25",
......@@ -42,6 +40,8 @@
"33": "paradoxe-16",
"34": "paradoxe-17",
"35": "paradoxe-18",
"4": "paradoxe-31",
"5": "paradoxe-32",
"6": "paradoxe-1",
"7": "paradoxe-2",
"8": "paradoxe-3",
......
......@@ -168,10 +168,10 @@ def add_wattmetre_mapping(h)
# Wattmetre ports are numbered by modules serial, then by channels inside module
wattmetre_modules.sort.each_with_index do |m, module_idx|
channels = m[1]
channels.sort.sort.each_with_index do |c, chan_idx|
channels.sort.sort.each_with_index do |c, _chan_idx|
node_uid = c[1]
# Each module has 6 channels
port_num = module_idx*6 + chan_idx
port_num = module_idx*6 + c[0]-1
pdu["ports"] ||= {}
if pdu['ports'].key?(port_num)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment