Browse Source

updated APR status display

Thomas Thümmler 6 months ago
parent
commit
9471911744
1 changed files with 9 additions and 7 deletions
  1. 9 7
      SDS_status_main.php

+ 9 - 7
SDS_status_main.php

@@ -802,13 +802,15 @@ if (($MSmode == 5) or ($MSmode == 4))
 			      "Power consumption of post regulation triode shunt. Must be < 28 W to prevent damage to triode.",
 			      $adeiChannel[10][28]);
 
-	    if ($APR_on) placeTextWithLink($pos_y+57,$pos_x-4, "APR ON", 40, 0, "#40AA40",
-					   "Advanced Post Regulation (APR) status. &#010Correction at ".sprintf('%.2F &#037;', 10*$PID_setpoint).".",
-					   $adeiChannel[10][29]);
-	  
-	    if ($PID_setpoint > 9.0) placeTextWithLink($pos_y+66,$pos_x-54,
-						       "APR setpoint limit", 140, 0, "#FF0000",
-						       "APR setpoint at 90% of limit.", $adeiChannel[10][30]);
+	    if ($APR_on)
+	      {
+		    if ($PID_setpoint < 9.0) { $APR_text = "APR ON"; $color = "#40AA40"; }
+		    else { $APR_text = "APR HIGH"; $color = "#FF0000"; }
+
+		    placeTextWithLink($pos_y+57,$pos_x-9, $APR_text, 50, 0, $color,
+				  "Advanced Post Regulation (APR) status. &#010Correction at ".sprintf('%.2F &#037;', 10*$PID_setpoint).". &#010Keep below 90 % at all times.",
+				  $adeiChannel[10][30]);
+	      }
 	  }    
         
   }  // end of PCS7 mode switch