Changeset 14512
- Timestamp:
- 10/24/12 08:49:55 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
firmware/InterlockArduino/src/webserver/webserver.ino
r14511 r14512 52 52 //char * my_input_names[] = {"FC_OK", "BP_ON", "IL_ON", "FL_OK", "FP_EN", "X_ON", "Y_ON", "Z_OK"}; 53 53 54 char * my_input_names[] = { "Is the cooling liquid flow meter measuring enough throuput?", 55 "Is Bias Power enabled?", 56 "Is 24VDC Interlock power supply enabled?", 57 "Is the Level of the cooling liquid ok?", 58 "Is the Pump powered?", 59 "Is the Drive Cabinet Enable Signal on?", 60 "Is the Drive Cabinet Power Signal on?", 61 "Is Drive Container Enabled?"}; 54 char * my_input_names[] = { "Is the cooling liquid flow meter measuring enough throuput? ", 55 "Is Bias Power enabled? ", 56 "Is 24VDC Interlock power supply enabled? ", 57 "Is the Level of the cooling liquid ok? ", 58 "Is the Pump powered? ", 59 "<br />Is the Drive Cabinet Enable Signal on? ", 60 "Is the Drive Cabinet Power Signal on? ", 61 "Is Drive Container Enabled? "}; 62 63 char * my_input_span_id[] = {"flow_meter", "bias_power", "power_24v", "level", "pump", "drive_enable", "drive_power", "drive_on"}; 64 62 65 int Number_of_Buttons = 3; 63 66 // This is in HTML called the VALUE of the button, … … 170 173 { 171 174 get_http_found = true; 172 if (eth.indexOf(String(" pump_on=")) !=-1){175 if (eth.indexOf(String("cam_on=")) !=-1){ 173 176 Serial.println("User request: Enable Pump"); 174 177 digitalWrite( FC_ON, HIGH); … … 176 179 fc_on_time += 3000; 177 180 } 178 else if (eth.indexOf(String(" pump_off=")) !=-1)181 else if (eth.indexOf(String("cam_off=")) !=-1) 179 182 { 180 183 Serial.println("User request: Disable Pump"); … … 182 185 fc_off_time = 500; 183 186 } 184 else if (eth.indexOf(String(" toggle_drive=")) !=-1)187 else if (eth.indexOf(String("drive_toggle=")) !=-1) 185 188 { 186 189 Serial.println("User request: Toggle Drive"); … … 248 251 249 252 // add a meta refresh tag, so the browser pulls again every 5 seconds: 250 client->print("<meta http-equiv=\"refresh\" content=\"1 URL=index.html\">"); 253 client->println("<meta http-equiv=\"refresh\" content=\"5; URL=index.html\" />"); 254 client->println("<meta http-equiv=\"Content-type\" content=\"text/html;charset=UTF-8\" />"); 251 255 252 256 client->println("<title>FACT camera power interlock control</title></head><body>"); … … 260 264 client->print(my_input_names[ch]); 261 265 client->print(" :"); 262 client->print(my_inputs[ch]); 263 client->print(" is "); 266 client->print(" "); 267 client->print("<span id=\""); 268 client->print(my_input_span_id[ch]); 269 client->print("\" title=\""); 264 270 if ( digitalRead(my_inputs[ch]) ) 265 271 { 266 client->print("<font color=\"green\" size=20>HIGH</font>"); 272 client->print("1\"> Yes"); 273 //client->print(" Yes "); 267 274 } 268 275 else 269 276 { 270 client->print("<font color=\"red\" size=20>LOW</font>"); 277 client->print("0\"> No "); 278 //client->print(" No "); 271 279 } 272 client->println("< br />");280 client->println("</span> <br />"); 273 281 } 274 282 }
Note:
See TracChangeset
for help on using the changeset viewer.