Skip to content
Snippets Groups Projects
Commit 6471fdab authored by anne munoz's avatar anne munoz Committed by Adam Wujek
Browse files

www: fixed fiber calibration table

Fixed fiber calibration table to match the dot-conf structure
parent 163f50f3
No related branches found
No related tags found
No related merge requests found
......@@ -35,29 +35,27 @@
$size = "3";
$header = array ("#","&#955tx", "&#955rx","Value");
$matrix = array ("key=CONFIG_FIBER00_PARAMS,".$_SESSION["KCONFIG"]["CONFIG_FIBER00_PARAMS"],
"key=CONFIG_FIBER01_PARAMS,".$_SESSION["KCONFIG"]["CONFIG_FIBER01_PARAMS"],
"key=CONFIG_FIBER02_PARAMS,".$_SESSION["KCONFIG"]["CONFIG_FIBER02_PARAMS"],
"key=CONFIG_FIBER03_PARAMS,".$_SESSION["KCONFIG"]["CONFIG_FIBER03_PARAMS"],
"key=CONFIG_FIBER04_PARAMS,".$_SESSION["KCONFIG"]["CONFIG_FIBER04_PARAMS"],
"key=CONFIG_FIBER05_PARAMS,".$_SESSION["KCONFIG"]["CONFIG_FIBER05_PARAMS"]);
$matrix = array ("key=CONFIG_FIBER00_PARAMS, id=0,".$_SESSION["KCONFIG"]["CONFIG_FIBER00_PARAMS"],
"key=CONFIG_FIBER01_PARAMS, id=1,".$_SESSION["KCONFIG"]["CONFIG_FIBER01_PARAMS"],
"key=CONFIG_FIBER02_PARAMS,id=2,".$_SESSION["KCONFIG"]["CONFIG_FIBER02_PARAMS"],
"key=CONFIG_FIBER03_PARAMS, id=3,".$_SESSION["KCONFIG"]["CONFIG_FIBER03_PARAMS"]);
//change string to match drawing function
$length = count($matrix);
for ($i = 0; $i < $length; $i++) {
$matrix[$i] = str_replace("alpha_", "tx=", $matrix[$i]);
$matrix[$i] = str_replace("+", ",rx=", $matrix[$i]);
$matrix[$i] = lreplace("_", ",rx=", $matrix[$i]);
$matrix[$i] = lreplace("=", ",val=", $matrix[$i]);
}
print_multi_form($matrix, $header, $formatID, $class, $infoname, $size);
if(process_multi_form($matrix)){
save_kconfig();
apply_kconfig();
header ('Location: endpointcalibrationalpha.php');
header ('Location: fibercalibration.php');
}
?>
......
......@@ -343,8 +343,9 @@ function process_multi_form($matrix){
//change matrix fiber to match format to save at dot-config
if($fiber >=0 ){
$output = str_replace("id=".$i."," , "" ,$output);
$output = lreplace(",rx=", "_", $output);
$output = str_replace("tx=","alpha_", $output);
$output = str_replace(",rx=", "+", $output);
$output = str_replace(",val=", "=", $output);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment