mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-14 09:16:02 +08:00
Optimize printer.tpl for 64K SPIFFS
Remove all fancy and keep only functionnal
This commit is contained in:
parent
953c24c8da
commit
a08ba29ef7
BIN
esp8266/data - for 64K SPIFFS/favicon.ico
Normal file
BIN
esp8266/data - for 64K SPIFFS/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@ -24,10 +24,11 @@ a{position:relative;display:block;padding:10px 15px;text-decoration:none;color:#
|
||||
.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tbody>tr>td{border:1px solid #dddddd;}
|
||||
.active{color:#ffffff;background-color:#000000;}
|
||||
caption{text-align:left;}
|
||||
.btnimg {cursor:hand; border-radius:6px ;;border:1px solid #FFFFFF;}
|
||||
</style><title>$PAGE_TITLE$</title> </head><body><div class="container"><table class="nav"><tr width=100%>
|
||||
<td class="$MENU_HOME$"><a href="http://$WEB_ADDRESS$">Home</a></td><td class="$MENU_SYSTEM$"><a href="http://$WEB_ADDRESS$/CONFIGSYS">System Configuration</a></td>
|
||||
<td class="$MENU_AP$"><a href="http://$WEB_ADDRESS$/CONFIGAP">AP Configuration</a></td><td class="$MENU_STA$"><a href="http://$WEB_ADDRESS$/CONFIGSTA">Station Configuration</a></td>
|
||||
<td class="$MENU_PRINTER$"><a href="http://$WEB_ADDRESS$/PRINTER">Printer Status</a></td><td class="$MENU_SETTINGS$"><a href="http://$WEB_ADDRESS$/SETTINGS">Printer Settings</a></td>
|
||||
<td class="$MENU_PRINTER$"><a href="http://$WEB_ADDRESS$/PRINTER">Printer Status</a></td><td class="$MENU_SETTINGS$"><a href="http://$WEB_ADDRESS$/SETTINGS">Extra Settings</a></td>
|
||||
<td width=100%> </td><td>FW: V$FW_VER$</td><td><a href="https://github.com/luc-github/ESP8266" >Github</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -1,134 +1,74 @@
|
||||
$INCLUDE[header.inc]$
|
||||
<table>
|
||||
<tr><td style="padding:0px;"><div id="Extruder1" style="visibility:hidden;height:0px;">
|
||||
<table><tr><td><label>E1: </label></td>
|
||||
<td id="data_extruder1"></td><td>0<input id="rangeinput1" type="range" min=0 max=270 onchange="Updatenumber('1');">270</td>
|
||||
<td><input class="form-control" id="numberinput1" type="number" min=0 max=270 step=1 value=0 onchange="Updaterange('1');"></td><td> °C
|
||||
<table><tr><td>E1: </td>
|
||||
<td id="data_extruder1"></td>
|
||||
<td><input class="form-control" id="numberinput1" type="number" min=0 max=270 step=1 value=0></td><td> °C
|
||||
<td><input type="submit" value="Set" onclick="SendValue( 'M104 T0 S', '1');"></td></tr></table></div></td></tr>
|
||||
<tr ><td style="padding:0px;"><div id="Extruder2" style="visibility:hidden;height:0px;">
|
||||
<table><tr><td><label>E2: </label></td>
|
||||
<td id="data_extruder2"></td><td>0<input id="rangeinput2" type="range" min=0 max=270 onchange="Updatenumber('2');">270</td>
|
||||
<td><input class="form-control" id="numberinput2" type="number" min=0 max=270 step=1 value=0 onchange="Updaterange('2');"></td><td>°C
|
||||
<table><tr><td>E2: </td>
|
||||
<td id="data_extruder2"></td>
|
||||
<td><input class="form-control" id="numberinput2" type="number" min=0 max=270 step=1 value=0></td><td>°C
|
||||
<input type="submit" value="Set" onclick="SendValue( 'M104 T1 S', '2');">
|
||||
</td></tr></table></div></td></tr>
|
||||
<tr><td style="padding:0px;"><div id="Bed" style="visibility:hidden;height:0px;">
|
||||
<table><tr><td><label>Bed:</label></td>
|
||||
<td id="data_bed"></td><td>0<input id="rangeinputbed" type="range" min=0 max=130 onchange="Updatenumber('bed');">130</td>
|
||||
<td><input class="form-control" id="numberinputbed"type="number" min=0 max=270 step=1 value=0 onchange="Updaterange('bed');"></td><td>°C
|
||||
<table><tr><td>Bed:</td>
|
||||
<td id="data_bed"></td>
|
||||
<td><input class="form-control" id="numberinputbed"type="number" min=0 max=270 step=1 value=0></td><td>°C
|
||||
<input type="submit" value="Set" onclick="SendValue( 'M140 S', 'bed');">
|
||||
</td></tr></table></div></td></tr>
|
||||
<tr><td id="speed"><table><tr>
|
||||
<td><label>Speed:</label></td><td class="text-info" id="currentspeed"></td>
|
||||
<td>0<input id="rangeinputspeed" type="range" min=0 max=300 onchange="Updatenumber('speed');">300</td>
|
||||
<td><input class="form-control" id="numberinputspeed" type="number" size="3" min=0 max=300 step=1 value=0 onchange="Updaterange('speed');"></td><td>%
|
||||
<td>Speed:</td><td class="text-info" id="currentspeed"></td>
|
||||
<td><input class="form-control" id="numberinputspeed" type="number" size="3" min=0 max=300 step=1 value=0></td><td>%
|
||||
<input type="submit" value="Set" onclick="SendValue( 'M220 S', 'speed');"></td>
|
||||
<td> </td><td>Status:</td><td id="status" align="center" valign="middle">
|
||||
<svg width="20" height="20"><circle cx="10" cy="10" r="8" stroke="black" stroke-width="2" fill="white"></circle></svg></td>
|
||||
<td id="status-text"></td><td> </td><td class="btnimg" onclick="OnclickEmergency();">
|
||||
<svg width="40" height="40" viewBox="0 0 40 40"><circle cx="20" cy="20" r="18" stroke="black" stroke-width="2" fill="red" />
|
||||
<circle cx="20" cy="20" r="10" stroke="black" stroke-width="4" fill="red" /><rect x="15" y="8" width="10" height="10" style="fill:red;stroke-width:1;stroke:red" />
|
||||
<rect x="18" y="6" rx="1" ry="1" width="4" height="14" style="fill:black;stroke-width:1;stroke:black" /></svg></td></tr></table></td></tr>
|
||||
<tr><td id="flow"><table><tr><td><label>Flow:</label></td><td class="text-info" id="currentflow"></td>
|
||||
<td>0<input id="rangeinputflow" type="range" min=0 max=300 onchange="Updatenumber('flow');">300</td>
|
||||
<td><input class="form-control" id="numberinputflow" size="3" type="number" min=0 max=300 step=1 value=0 onchange="Updaterange('flow');"></td><td>%
|
||||
<td> </td><td>Status:</td><td id="status">◯</td>
|
||||
<td id="status-text"></td><td> </td><td class="btnimg" style="color:#ffffff;background-color:#d9534f;border:1px solid #d43f3a;" onclick="OnclickEmergency();">Emergency</td></tr></table></td></tr>
|
||||
<tr><td id="flow"><table><tr><td>Flow:</td><td class="text-info" id="currentflow"></td>
|
||||
<td><input class="form-control" id="numberinputflow" size="3" type="number" min=0 max=300 step=1 value=0 ></td><td>%
|
||||
<input type="submit" value="Set" onclick="SendValue( 'M221 S', 'flow');"></td><td> </td>
|
||||
<td><label>X:</label></td><td class="text-info" id="posx"></td><td> </td><td><label>Y:</label></td><td class="text-info" id="posy"></td><td> </td>
|
||||
<td><label>Z:</label></td><td class="text-info" id="posz" ></td></tr></table></td></tr>
|
||||
<tr><td><table width="100%"><tr><td width="auto"><label>Command:</label></td>
|
||||
<td>X:</td><td class="text-info" id="posx"></td><td> </td><td>Y:</td><td class="text-info" id="posy"></td><td> </td>
|
||||
<td>Z:</td><td class="text-info" id="posz" ></td></tr></table></td></tr>
|
||||
<tr><td><table width="100%"><tr><td width="auto">Command:</td>
|
||||
<td width="100%"><input class="form-control" id="cmd" type="text" style="width: 100%;"></td>
|
||||
<td width="auto"><input type="submit" value="Send" onclick="Sendcustomcommand();"></td></tr></table></td></tr>
|
||||
<tr><td><hr></td></tr><tr><td><table><tr><td><label>Info:</label></td><td width=100% id="infomsg" class="text-info"></td></tr></table></tr>
|
||||
<tr><td><hr></td></tr><tr><td><table><tr><td><label>Error:</label></td><td width=100% id="errormsg" class="text-info"></td></tr></table></tr>
|
||||
<tr><td><hr></td></tr><tr><td><table><tr><td><label>Status:</label></td><td width=100% id="statusmsg" class="text-info"></td></tr></table></tr>
|
||||
<tr><td><hr></td></tr><tr><td><table><tr><td class="btnimg" onclick="Sendcommand('M24');">
|
||||
<svg width="40" height="40" viewBox="0 0 40 40"><circle cx="20" cy="20" r="18" stroke="black" stroke-width="2" fill="white" /><polygon points="15,10 30,20 15,30" fill:"white" stroke:"white" stroke-width:"1" /></svg></td>
|
||||
<td class="btnimg" onclick="Sendcommand('M25');"><svg width="40" height="40" viewBox="0 0 40 40"> <circle cx="20" cy="20" r="18" stroke="black" stroke-width="2" fill="white" />
|
||||
<rect x="10" y="10" width="7" height="20" rx="2" ry="2" style="fill:rgb(0,0,0);stroke-width:1;stroke:rgb(0,0,0)" /> <rect x="23" y="10" width="7" height="20" rx="2" ry="2" style="fill:rgb(0,0,0);stroke-width:1;stroke:rgb(0,0,0)" /></svg></td>
|
||||
<td class="btnimg" onclick="Sendcommand('M50');"><svg width="40" height="40" viewBox="0 0 40 40"><circle cx="20" cy="20" r="18" stroke="black" stroke-width="2" fill="white" />
|
||||
<rect x="10" y="10" width="20" height="20" rx="2" ry="2" style="fill:rgb(0,0,0);stroke-width:1;stroke:rgb(0,0,0)" /></svg></td>
|
||||
<td class="btnimg" onclick="alert('Not yet implemented');"><svg width="40" height="40" viewBox="0 0 40 40"><rect x="5" y="10" width="30" height="20" rx="2" ry="2" style="fill:rgb(0,0,0);stroke-width:1;stroke:rgb(0,0,0)" />
|
||||
<rect x="20" y="5" width="15" height="15" rx="2" ry="2" style="fill:rgb(0,0,0);stroke-width:1;stroke:rgb(0,0,0)" /><text x="10" y="25" font-family="Verdana" font-size="14" fill="white">SD</text></svg></td>
|
||||
<td> </td></tr></table></td></tr><tr><td><table><tr align="center" valign="middle"><td class="btnimg" onclick=" Sendcommand('G28 X');">
|
||||
<svg width="40" height="40" viewBox="0 0 40 40" ><polygon points="7,40 7,25 4,28 0,24 20,4 26,10 26,6 32,6 32,16 40,24 36,28 33,25 33,40" fill="black" stroke-width:"1" stroke:"black" />
|
||||
<line x1="25" y1="8" x2="33" y2="16" style="stroke:white;stroke-width:1" /><polyline points="4,28 20,12 36,28" style="fill:none;stroke:white;stroke-width:1" />
|
||||
<text x="15" y="35" font-family="Verdana" font-size="14" fill="white">X</text></svg></td><td>
|
||||
<table><tr><td class="btnimg" onclick="SendJogcommand( 'Y-10',XYfeedrate);"><svg width="40" height="20" viewBox="0 0 40 20">
|
||||
<polyline points="5,18 20,5 35,18" style="fill:none;stroke:blue;stroke-width:7"/><text x="13" y="20" font-family="Verdana" font-size="7" fill="black">-10</text></svg></td></tr>
|
||||
<tr><td class="btnimg" onclick="SendJogcommand( 'Y-1',XYfeedrate);"><svg width="40" height="20" viewBox="0 2 40 20">
|
||||
<polyline points="5,18 20,5 35,18" style="fill:none;stroke:blue;stroke-width:5"/><text x="15" y="20" font-family="Verdana" font-size="7" fill="black">-1</text></svg></td></tr>
|
||||
<tr><td class="btnimg" onclick="SendJogcommand( 'Y-0.1',XYfeedrate);"><svg width="40" height="20" viewBox="0 4 40 20">
|
||||
<polyline points="5,18 20,5 35,18" style="fill:none;stroke:blue;stroke-width:2"/><text x="12" y="20" font-family="Verdana" font-size="7" fill="black">-0.1</text></svg></td></tr></table></td>
|
||||
<td class="btnimg" onclick=" Sendcommand('G28 Y');"><svg width="40" height="40" viewBox="0 0 40 40">
|
||||
<polygon points="7,40 7,25 4,28 0,24 20,4 26,10 26,6 32,6 32,16 40,24 36,28 33,25 33,40" fill="blue" stroke-width:"1" stroke:"black" /><line x1="25" y1="8" x2="33" y2="16" style="stroke:white;stroke-width:1" />
|
||||
<polyline points="4,28 20,12 36,28" style="fill:none;stroke:white;stroke-width:1" /><text x="15" y="35" font-family="Verdana" font-size="14" fill="white">Y</text></svg></td>
|
||||
<td></td><td><table><tr><td class="btnimg" onclick="SendJogcommand( 'Z-10',Zfeedrate);"><svg width="40" height="20" viewBox="0 0 40 20">
|
||||
<polyline points="5,18 20,5 35,18" style="fill:none;stroke:green;stroke-width:7"/><text x="14" y="20" font-family="Verdana" font-size="7" fill="black">-10</text></svg></td></tr>
|
||||
<tr><td class="btnimg" onclick="SendJogcommand( 'Z-1',Zfeedrate);"><svg width="40" height="20" viewBox="0 2 40 20">
|
||||
<polyline points="5,18 20,5 35,18" style="fill:none;stroke:green;stroke-width:5"/><text x="15" y="20" font-family="Verdana" font-size="7" fill="black">-1</text></svg></td></tr>
|
||||
<tr><td class="btnimg" onclick="SendJogcommand( 'Z-0.1',Zfeedrate);"><svg width="40" height="20" viewBox="0 4 40 20"><polyline points="5,18 20,5 35,18" style="fill:none;stroke:green;stroke-width:2"/>
|
||||
<text x="12" y="20" font-family="Verdana" font-size="7" fill="black">-0.1</text></svg></td></tr></table></td>
|
||||
<td></td><td id="JogExtruder1-1" style="visibility:hidden;"><table><tr><td class="btnimg" onclick="SendJogcommand( 'E0-10',Efeedrate);"><svg width="40" height="20" viewBox="0 0 40 20">
|
||||
<polyline points="5,18 20,5 35,18" style="fill:none;stroke:orange;stroke-width:7"/><text x="14" y="20" font-family="Verdana" font-size="7" fill="black">-10</text></svg></td></tr>
|
||||
<tr><td class="btnimg" onclick="SendJogcommand( 'E0-1',Efeedrate);"><svg width="40" height="20" viewBox="0 2 40 20"><polyline points="5,18 20,5 35,18" style="fill:none;stroke:orange;stroke-width:5"/>
|
||||
<text x="15" y="20" font-family="Verdana" font-size="7" fill="black">-1</text></svg></td></tr>
|
||||
<tr><td class="btnimg" onclick="SendJogcommand( 'E0-0.1',Efeedrate);"><svg width="40" height="20" viewBox="0 4 40 20"><polyline points="5,18 20,5 35,18" style="fill:none;stroke:orange;stroke-width:2"/>
|
||||
<text x="12" y="20" font-family="Verdana" font-size="7" fill="black">-0.1</text></svg></td></tr></table></td>
|
||||
<td></td><td id="JogExtruder2-1" style="visibility:hidden;"><table><tr><td class="btnimg" onclick="SendJogcommand( 'E1-10',Efeedrate);"><svg width="40" height="20" viewBox="0 0 40 20">
|
||||
<polyline points="5,18 20,5 35,18" style="fill:none;stroke:pink;stroke-width:7"/><text x="14" y="20" font-family="Verdana" font-size="7" fill="black">-10</text></svg></td></tr>
|
||||
<tr><td class="btnimg" onclick="SendJogcommand( 'E1-1',Efeedrate);"><svg width="40" height="20" viewBox="0 2 40 20"><polyline points="5,18 20,5 35,18" style="fill:none;stroke:pink;stroke-width:5"/>
|
||||
<text x="15" y="20" font-family="Verdana" font-size="7" fill="black">-1</text></svg></td></tr>
|
||||
<tr><td class="btnimg" onclick="SendJogcommand( 'E1-0.1',Efeedrate);"><svg width="40" height="20" viewBox="0 4 40 20"><polyline points="5,18 20,5 35,18" style="fill:none;stroke:pink;stroke-width:2"/>
|
||||
<text x="12" y="20" font-family="Verdana" font-size="7" fill="black">-0.1</text></svg></td></tr></table></td></tr>
|
||||
<tr align="center" valign="middle"><td><table><tr><td class="btnimg" onclick="SendJogcommand( 'X10',XYfeedrate);"><svg width="20" height="40" viewBox="12 -10 20 40">
|
||||
<polyline points="5,18 20,5 35,18" style="fill:none;stroke:black;stroke-width:7" transform="rotate(-90 20 10)"/><text x="22" y="13" font-family="Verdana" font-size="7" fill="black">10</text></svg></td>
|
||||
<td class="btnimg" onclick="SendJogcommand( 'X1',XYfeedrate);"><svg width="20" height="40" viewBox="10 -10 20 40"><polyline points="5,18 20,5 35,18" style="fill:none;stroke:black;stroke-width:5" transform="rotate(-90 20 10)"/>
|
||||
<text x="21" y="13" font-family="Verdana" font-size="7" fill="black">1</text></svg></td>
|
||||
<td class="btnimg" onclick="SendJogcommand( 'X0.1',XYfeedrate);"><svg width="20" height="40" viewBox="14 -10 20 40">
|
||||
<polyline points="5,18 20,5 35,18" style="fill:none;stroke:black;stroke-width:2" transform="rotate(-90 20 10)"/><text x="19" y="13" font-family="Verdana" font-size="7" fill="black">0.1</text></svg></td></tr>
|
||||
</table></td><td></td><td><table><tr><td class="btnimg" onclick="SendJogcommand( 'X-0.1',XYfeedrate);"><svg width="20" height="40" viewBox="6 -10 20 40">
|
||||
<polyline points="5,18 20,5 35,18" style="fill:none;stroke:black;stroke-width:3" transform="rotate(90 20 10)"/><text x="7" y="12" font-family="Verdana" font-size="7" fill="black">-0.1</text></svg></td>
|
||||
<td class="btnimg" onclick="SendJogcommand( 'X-1',XYfeedrate);"><svg width="20" height="40" viewBox="8 -10 20 40"><polyline points="5,18 20,5 35,18" style="fill:none;stroke:black;stroke-width:5" transform="rotate(90 20 10)"/>
|
||||
<text x="11" y="13" font-family="Verdana" font-size="7" fill="black">-1</text></svg></td><td class="btnimg" onclick="SendJogcommand( 'X-10',XYfeedrate);">
|
||||
<svg width="20" height="40" viewBox="8 -10 20 40"><polyline points="5,18 20,5 35,18" style="fill:none;stroke:black;stroke-width:7" transform="rotate(90 20 10)"/>
|
||||
<text x="7" y="12" font-size="7" fill="black">-10</text></svg></td></tr></table></td>
|
||||
<td></td><td><svg width="20" height="20" viewBox="0 0 20 20"><text x="1" y="18" font-family="Verdana" font-size="22" fill="green">Z</text></svg></td>
|
||||
<td></td><td id="JogExtruder1-2" style="visibility:hidden;"><svg width="20" height="20" viewBox="0 0 20 20"><text x="1" y="18" font-family="Verdana" font-size="22" fill="orange">1</text></svg></td>
|
||||
<td></td><td id="JogExtruder2-2" style="visibility:hidden;"><svg width="20" height="20" viewBox="0 0 20 20"><text x="1" y="18" font-family="Verdana" font-size="22" fill="pink">2</text></svg></td></tr>
|
||||
<tr align="center" valign="middle"><td class="btnimg" onclick=" Sendcommand('G28');"><svg width="40" height="40" viewBox="0 0 40 40"><polygon points="7,40 7,25 4,28 0,24 20,4 26,10 26,6 32,6 32,16 40,24 36,28 33,25 33,40" fill="purple" stroke-width:"1" stroke:"black" />
|
||||
<line x1="25" y1="8" x2="33" y2="16" style="stroke:white;stroke-width:1" /><polyline points="4,28 20,12 36,28" style="fill:none;stroke:white;stroke-width:1" /></svg></td><td>
|
||||
<table><tr><td class="btnimg" onclick="SendJogcommand( 'Y0.1',XYfeedrate);"><svg width="40" height="20" viewBox="0 -4 40 20">
|
||||
<polyline points="5,18 20,5 35,18" style="fill:none;stroke:blue;stroke-width:3" transform="rotate(180 20 10)"/><text x="15" y="6" font-family="Verdana" font-size="7" fill="black">0.1</text></svg></td></tr>
|
||||
<tr><td class="btnimg" onclick="SendJogcommand( 'Y1',XYfeedrate);"><svg width="40" height="20" viewBox="0 -2 40 20"><polyline points="5,18 20,5 35,18" style="fill:none;stroke:blue;stroke-width:5" transform="rotate(180 20 10)"/>
|
||||
<text x="17" y="7" font-family="Verdana" font-size="7" fill="black">1</text></svg></td></tr>
|
||||
<tr><td class="btnimg" onclick="SendJogcommand( 'Y10',XYfeedrate);"><svg width="40" height="20" viewBox="0 0 40 20"><polyline points="5,18 20,5 35,18" style="fill:none;stroke:blue;stroke-width:7" transform="rotate(180 20 10)"/>
|
||||
<text x="15" y="6" font-family="Verdana" font-size="7" fill="black">10</text></svg></td></tr></table></td>
|
||||
<td class="btnimg" onclick=" Sendcommand('G28 Z');"><svg width="40" height="40" viewBox="0 0 40 40"><polygon points="7,40 7,25 4,28 0,24 20,4 26,10 26,6 32,6 32,16 40,24 36,28 33,25 33,40" fill="green" stroke-width:"1" stroke:"black" />
|
||||
<line x1="25" y1="8" x2="33" y2="16" style="stroke:white;stroke-width:1" /><polyline points="4,28 20,12 36,28" style="fill:none;stroke:white;stroke-width:1" /><text x="15" y="35" font-family="Verdana" font-size="14" fill="white">Z</text></svg></td>
|
||||
<td></td><td><table><tr><td class="btnimg" onclick="SendJogcommand( 'Z0.1',Zfeedrate);"><svg width="40" height="20" viewBox="0 -4 40 20">
|
||||
<polyline points="5,18 20,5 35,18" style="fill:none;stroke:green;stroke-width:3" transform="rotate(180 20 10)"/><text x="14" y="6" font-family="Verdana" font-size="7" fill="black">0.1</text></svg></td></tr>
|
||||
<tr><td class="btnimg" onclick="SendJogcommand( 'Z1',Zfeedrate);"><svg width="40" height="20" viewBox="0 -2 40 20"><polyline points="5,18 20,5 35,18" style="fill:none;stroke:green;stroke-width:5" transform="rotate(180 20 10)"/>
|
||||
<text x="18" y="7" font-family="Verdana" font-size="7" fill="black">1</text></svg></td></tr>
|
||||
<tr><td class="btnimg" onclick="SendJogcommand( 'Z10',Zfeedrate);"><svg width="40" height="20" viewBox="0 0 40 20">
|
||||
<polyline points="5,18 20,5 35,18" style="fill:none;stroke:green;stroke-width:7" transform="rotate(180 20 10)"/><text x="15" y="6" font-family="Verdana" font-size="7" fill="black">10</text></svg></td></tr></table></td>
|
||||
<td></td><td id="JogExtruder1-3" style="visibility:hidden;"><table><tr><td class="btnimg" onclick="SendJogcommand( 'E0+0.1',Efeedrate);"><svg width="40" height="20" viewBox="0 -4 40 20">
|
||||
<polyline points="5,18 20,5 35,18" style="fill:none;stroke:orange;stroke-width:3" transform="rotate(180 20 10)"/><text x="14" y="6" font-family="Verdana" font-size="7" fill="black">0.1</text></svg></td></tr>
|
||||
<tr><td class="btnimg" onclick="SendJogcommand( 'E0+1',Efeedrate);"><svg width="40" height="20" viewBox="0 -2 40 20"><polyline points="5,18 20,5 35,18" style="fill:none;stroke:orange;stroke-width:5" transform="rotate(180 20 10)"/>
|
||||
<text x="18" y="7" font-family="Verdana" font-size="7" fill="black">1</text></svg></td></tr>
|
||||
<tr><td class="btnimg" onclick="SendJogcommand( 'E0+10',Efeedrate);"><svg width="40" height="20" viewBox="0 0 40 20">
|
||||
<polyline points="5,18 20,5 35,18" style="fill:none;stroke:orange;stroke-width:7" transform="rotate(180 20 10)"/><text x="15" y="6" font-family="Verdana" font-size="7" fill="black">10</text></svg></td></tr></table></td>
|
||||
<td></td><td id="JogExtruder2-3" style="visibility:hidden;"><table><tr><td class="btnimg" onclick="SendJogcommand( 'E1+0.1',Efeedrate);"><svg width="40" height="20" viewBox="0 -4 40 20">
|
||||
<polyline points="5,18 20,5 35,18" style="fill:none;stroke:pink;stroke-width:3" transform="rotate(180 20 10)"/><text x="14" y="6" font-family="Verdana" font-size="7" fill="black">0.1</text></svg></td></tr>
|
||||
<tr><td class="btnimg" onclick="SendJogcommand( 'E1+1',Efeedrate);"><svg width="40" height="20" viewBox="0 -2 40 20"><polyline points="5,18 20,5 35,18" style="fill:none;stroke:pink;stroke-width:5" transform="rotate(180 20 10)"/>
|
||||
<text x="18" y="7" font-family="Verdana" font-size="7" fill="black">1</text></svg></td></tr>
|
||||
<tr><td class="btnimg" onclick="SendJogcommand( 'E1+10',Efeedrate);"><svg width="40" height="20" viewBox="0 0 40 20" ><polyline points="5,18 20,5 35,18" style="fill:none;stroke:pink;stroke-width:7" transform="rotate(180 20 10)"/>
|
||||
<text x="15" y="6" font-family="Verdana" font-size="7" fill="black">10</text></svg></td></tr></table></td></tr></table></td></tr></table>
|
||||
<tr><td><hr></td></tr><tr><td><table><tr><td>Info:</td><td width=100% id="infomsg" class="text-info"></td></tr></table></tr>
|
||||
<tr><td><hr></td></tr><tr><td><table><tr><td>Error:</td><td width=100% id="errormsg" class="text-info"></td></tr></table></tr>
|
||||
<tr><td><hr></td></tr><tr><td><table><tr><td>Status:</td><td width=100% id="statusmsg" class="text-info"></td></tr></table></tr>
|
||||
<tr><td><hr></td></tr><tr><td><table><tr><td class="btnimg" style="color:#ffffff;background-color:#337ab7;border-color:#2e6da4;" onclick="Sendcommand('M24');">Play</td><td> </td>
|
||||
<td class="btnimg" style="color:#ffffff;background-color:#337ab7;border-color:#2e6da4;" onclick="Sendcommand('M25');">Pause</td><td> </td>
|
||||
<td class="btnimg" style="color:#ffffff;background-color:#337ab7;border-color:#2e6da4;" onclick="Sendcommand('M50');" >Stop</td><td> </td>
|
||||
<td class="btnimg" style="color:#ffffff;background-color:#337ab7;border-color:#2e6da4;" onclick="alert('Not yet implemented');">SD</td>
|
||||
<td> </td></tr></table></td></tr>
|
||||
<tr><td >
|
||||
<form><table><tr><td>Axis:</td>
|
||||
<td><input type="radio" id="X_axis" name="axis" value="X"><label class="control-label" for="X_axis">X</label></td>
|
||||
<td><input type="radio" id="Y_axis" name="axis" value="Y"><label class="control-label" for="Y_axis">Y</label></td>
|
||||
<td><input type="radio" id="Z_axis"name="axis" value="Z"><label class="control-label" for="Z_axis">Z</label></td>
|
||||
<td id="radioE1"><input type="radio" id="E1_axis"name="axis" value="E0"><label class="control-label" for="E1_axis">E1</label></td>
|
||||
<td id="radioE2"><input type="radio" id="E2_axis" name="axis" value="E1"><label class="control-label" for="E2_axis">E2</label></td></tr></table></form>
|
||||
</td><tr>
|
||||
<tr><td >
|
||||
<form><table><tr><td>Steps:</td>
|
||||
<td><input id="pos01" type="radio" name="position" value="0.1"><label class="control-label" for="pos01">0.1</label></td>
|
||||
<td><input id="pos1" type="radio" name="position" value="1"><label class="control-label" for="pos1">1</label></td>
|
||||
<td><input id="pos10"type="radio" name="position" value="10"><label class="control-label" for="pos10">10</label></td>
|
||||
<td><input id="pos50"type="radio" name="position" value="50"><label class="control-label" for="pos50">50</label></td></tr></table></form>
|
||||
</td><tr>
|
||||
<tr><td >
|
||||
<table><tr>
|
||||
<td>Direction:</td>
|
||||
<td class="btnimg" style="color:#ffffff;background-color:#337ab7;border-color:#2e6da4;" onclick="SendJog('-');"> - </td>
|
||||
<td></td><td></td><td></td>
|
||||
<td class="btnimg" style="color:#ffffff;background-color:#337ab7;border-color:#2e6da4;" onclick="SendJog('+');" > + </td>
|
||||
</td><tr>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
var XYfeedrate=$XY_FEEDRATE$;
|
||||
var Zfeedrate=$Z_FEEDRATE$;
|
||||
var Efeedrate=$E_FEEDRATE$;
|
||||
function Sendcommand(commandtxt){
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
var url = "http://$WEB_ADDRESS$/CMD?COM="+encodeURI(commandtxt);;
|
||||
var url = "http://$WEB_ADDRESS$/CMD?COM="+encodeURIComponent(commandtxt);
|
||||
xmlhttp.open("POST", url, true);
|
||||
xmlhttp.send();
|
||||
}
|
||||
@ -138,6 +78,29 @@ ms += new Date().getTime();
|
||||
while (new Date() < ms){}
|
||||
}
|
||||
|
||||
function SendJog( direction){
|
||||
|
||||
var axischecked;
|
||||
var feedrate;
|
||||
var step;
|
||||
var i;
|
||||
for (i = 0; i < axis.length; i++) {
|
||||
if (axis[i].checked) {
|
||||
axischecked=axis[i].value;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < pos.length; i++) {
|
||||
if (pos[i].checked) {
|
||||
step=pos[i].value;
|
||||
}
|
||||
}
|
||||
if (axischecked=="X")feedrate=XYfeedrate;
|
||||
else if (axischecked=="Y")feedrate=XYfeedrate;
|
||||
else if (axischecked=="Z")feedrate=Zfeedrate;
|
||||
else feedrate=Efeedrate;
|
||||
SendJogcommand( axischecked+direction+step, feedrate);
|
||||
}
|
||||
|
||||
function SendJogcommand( cmd, feedrate){
|
||||
Sendcommand("G91");
|
||||
delay(100);
|
||||
@ -156,61 +119,20 @@ document.getElementById("cmd").value="";
|
||||
function OnclickEmergency(){
|
||||
Sendcommand("M112");
|
||||
}
|
||||
function Updatenumber(item){
|
||||
document.getElementById("numberinput"+item).value=document.getElementById("rangeinput"+item).value;
|
||||
}
|
||||
function Updaterange(item){
|
||||
document.getElementById("rangeinput"+item).value=document.getElementById("numberinput"+item).value;
|
||||
}
|
||||
Updaterange('1');
|
||||
Updaterange('2');
|
||||
Updaterange('bed');
|
||||
Updaterange('speed');
|
||||
Updaterange('flow');
|
||||
var pulse=true;
|
||||
var initialization_done = false;
|
||||
|
||||
function displaytemp(temperature, target,item){
|
||||
var displaypicture = "<svg height=\"30px \" width=\"300px \" xmlns=\"http://wwww.w3.org/2000/svg\">\n<linearGradient id=\"gradient\">\n";
|
||||
var description = String (temperature) + "/";
|
||||
if (target>0)description += String (target);
|
||||
else description += "Off ";
|
||||
displaypicture+="<stop class=\"begin\" style=\"stop-color:green;\" offset=\"0%\"/>\n";
|
||||
displaypicture+="<stop class=\"middle\" style=\"stop-color:yellow;\" offset=\"100%\"/>\n</linearGradient>\n<linearGradient id=\"gradient2\">\n";
|
||||
displaypicture+="<stop class=\"middle\" style=\"stop-color:yellow;\" offset=\"0%\"/>\n<stop class=\"end\" style=\"stop-color:red;\" offset=\"100%\"/>\n";
|
||||
displaypicture+="</linearGradient>\n<rect x=\"10\" y=\"4\" width=\"24\" height=\"21\" style=\"fill:url(#gradient)\" />\n";
|
||||
displaypicture+="<rect x=\"34\" y=\"4\" width=\"280\" height=\"21\" style=\"fill:url(#gradient2)\" />\n<line x1=\"";
|
||||
displaypicture+=String(target+10);
|
||||
displaypicture+="\" y1=\"4\" x2=\"";
|
||||
displaypicture+=String(target+10);
|
||||
displaypicture+="\" y2=\"25\" style=\"stroke:rgb(255,255,255);stroke-width:1\" />\n<path d=\"M";
|
||||
displaypicture+=String(temperature+5);
|
||||
displaypicture+=" 0 L";
|
||||
displaypicture+=String(temperature+15);
|
||||
displaypicture+=" 0 L";
|
||||
displaypicture+=String(temperature+10);
|
||||
displaypicture+=" 8 Z\" stroke=\"white\" stroke-width=\"1\" />\n<path d=\"M";
|
||||
displaypicture+=String(temperature+5);
|
||||
displaypicture+=" 30 L";
|
||||
displaypicture+=String(temperature+15);
|
||||
displaypicture+=" 30 L";
|
||||
displaypicture+=String(temperature+10);
|
||||
displaypicture+=" 22 Z\" stroke=\"white\" stroke-width=\"1\"/>\n<text x=\"30\" y=\"19\" fill=\"black\" style=\"font-family: calibri; font-size:10pt;\">\n";
|
||||
displaypicture+=description;
|
||||
displaypicture+=" °C</text>\n</svg>";
|
||||
document.getElementById(item).innerHTML=displaypicture;
|
||||
description+=" °C";
|
||||
document.getElementById(item).innerHTML=description;
|
||||
}
|
||||
function displaystatus(status){
|
||||
var content ="<svg width=\"20\" height=\"20\"><circle cx=\"10\" cy=\"10\" r=\"8\" stroke=\"black\" stroke-width=\"2\" fill=\"";
|
||||
if (status=="Connected"){
|
||||
if (pulse)content +="#00FF00";
|
||||
else content +="#007F0E";}
|
||||
else if (status=="Busy"){
|
||||
if (pulse)content +="#FFD800";
|
||||
else content +="#7F6A00";}
|
||||
else{
|
||||
if (pulse)content +="#FF0000";
|
||||
else content +="#7F0000";}
|
||||
content +="\"></circle></svg>";
|
||||
var content ;
|
||||
if (pulse)content ="⨀";
|
||||
else content ="⦿";
|
||||
pulse=!pulse;
|
||||
document.getElementById("status").innerHTML=content;
|
||||
document.getElementById("status-text").innerHTML=status;
|
||||
@ -220,36 +142,25 @@ function dispatchstatus(jsonresponse){
|
||||
if(jsonresponse.heater[0].active==1){
|
||||
document.getElementById("Extruder1").style.visibility="visible";
|
||||
document.getElementById("Extruder1").style.height="auto";
|
||||
document.getElementById("JogExtruder1-1").style.visibility="visible";
|
||||
document.getElementById("JogExtruder1-2").style.visibility="visible";
|
||||
document.getElementById("JogExtruder1-3").style.visibility="visible";
|
||||
displaytemp(jsonresponse.heater[0].temperature, jsonresponse.heater[0].target,"data_extruder1");
|
||||
Updaterange('1');}
|
||||
document.getElementById("radioE1").style.visibility="visible";
|
||||
displaytemp(jsonresponse.heater[0].temperature, jsonresponse.heater[0].target,"data_extruder1");}
|
||||
else {
|
||||
document.getElementById("Extruder1").style.visibility="hidden";
|
||||
document.getElementById("Extruder1").style.height="0px";
|
||||
document.getElementById("JogExtruder1-1").style.visibility="hidden";
|
||||
document.getElementById("JogExtruder1-2").style.visibility="hidden";
|
||||
document.getElementById("JogExtruder1-3").style.visibility="hidden";}
|
||||
document.getElementById("radioE1").style.visibility="hidden";}
|
||||
if(jsonresponse.heater[1].active==1){
|
||||
document.getElementById("Extruder2").style.visibility="visible";
|
||||
document.getElementById("Extruder2").style.height="auto";
|
||||
document.getElementById("JogExtruder2-1").style.visibility="visible";
|
||||
document.getElementById("JogExtruder2-2").style.visibility="visible";
|
||||
document.getElementById("JogExtruder2-3").style.visibility="visible";
|
||||
displaytemp(jsonresponse.heater[1].temperature, jsonresponse.heater[1].target,"data_extruder2");
|
||||
Updaterange('2');}
|
||||
document.getElementById("radioE2").style.visibility="visible";
|
||||
displaytemp(jsonresponse.heater[1].temperature, jsonresponse.heater[1].target,"data_extruder2");}
|
||||
else {
|
||||
document.getElementById("Extruder2").style.visibility="hidden";
|
||||
document.getElementById("Extruder2").style.height="0px";
|
||||
document.getElementById("JogExtruder2-1").style.visibility="hidden";
|
||||
document.getElementById("JogExtruder2-2").style.visibility="hidden";
|
||||
document.getElementById("JogExtruder2-3").style.visibility="hidden";}
|
||||
document.getElementById("radioE2").style.visibility="hidden";}
|
||||
if(jsonresponse.heater[2].active==1){
|
||||
document.getElementById("Bed").style.visibility="visible";
|
||||
document.getElementById("Bed").style.height="auto";
|
||||
displaytemp(jsonresponse.heater[2].temperature, jsonresponse.heater[2].target,"data_bed");
|
||||
Updaterange('bed');}
|
||||
displaytemp(jsonresponse.heater[2].temperature, jsonresponse.heater[2].target,"data_bed");}
|
||||
else {
|
||||
document.getElementById("Bed").style.visibility="hidden";
|
||||
document.getElementById("Bed").style.height="0px";}
|
||||
@ -259,29 +170,21 @@ document.getElementById("posz").innerHTML=jsonresponse.Zpos;
|
||||
displaystatus(jsonresponse.status);
|
||||
var content="";
|
||||
for (i = 0; i < jsonresponse.InformationMsg.length; i++) {
|
||||
if (i==jsonresponse.InformationMsg.length-1)content +="<li style='list-style-type: disc;'><b>" +jsonresponse.InformationMsg[i].line+ "</b>";
|
||||
else content +="<li style='list-style-type: circle;'>"+jsonresponse.InformationMsg[i].line;
|
||||
content += "</li>";}
|
||||
content +="<li style='list-style-type: circle;'>"+jsonresponse.InformationMsg[i].line+"</li>";}
|
||||
document.getElementById("infomsg").innerHTML=content;
|
||||
content="";
|
||||
for (i = 0; i < jsonresponse.ErrorMsg.length; i++){
|
||||
if (i==jsonresponse.ErrorMsg.length-1)content +="<li style='list-style-type: disc;'><b>" +jsonresponse.ErrorMsg[i].line+ "</b>";
|
||||
else content +="<li style='list-style-type: circle;'>"+jsonresponse.ErrorMsg[i].line;
|
||||
content +="</li>";}
|
||||
content +="<li style='list-style-type: circle;'>"+jsonresponse.ErrorMsg[i].line+"</li>";}
|
||||
document.getElementById("errormsg").innerHTML=content;
|
||||
content="";
|
||||
for (i = 0; i < jsonresponse.StatusMsg.length; i++)
|
||||
{
|
||||
if (i==jsonresponse.StatusMsg.length-1)content +="<li style='list-style-type: disc;'><b>" +jsonresponse.StatusMsg[i].line+ "</b>";
|
||||
else content +="<li style='list-style-type: circle;'>"+jsonresponse.StatusMsg[i].line;
|
||||
content +="</li>";
|
||||
content +="<li style='list-style-type: circle;'>"+jsonresponse.StatusMsg[i].line+"</li>";
|
||||
}
|
||||
document.getElementById("statusmsg").innerHTML=content;
|
||||
if (!initialization_done){
|
||||
document.getElementById("numberinputspeed").value=jsonresponse.speed;
|
||||
Updaterange('speed');
|
||||
document.getElementById("numberinputflow").value=jsonresponse.flow;
|
||||
Updaterange('flow');
|
||||
initialization_done=true;}
|
||||
document.getElementById("currentspeed").innerHTML=jsonresponse.speed + "%";
|
||||
document.getElementById("currentflow").innerHTML=jsonresponse.flow + "%";
|
||||
@ -299,6 +202,10 @@ xmlhttp.open("GET", url, true);
|
||||
xmlhttp.send();
|
||||
}
|
||||
setInterval(function(){getstatus();},$REFRESH_PAGE$);
|
||||
var axis = document.forms[0];
|
||||
var pos = document.forms[1];
|
||||
axis[0].checked=true;
|
||||
pos[0].checked=true;
|
||||
</script>
|
||||
$SERVICE_PAGE$
|
||||
</body>
|
||||
|
@ -1,6 +1,6 @@
|
||||
$INCLUDE[header.inc]$
|
||||
<div class="panel">
|
||||
<div class="panel-heading">Printer Settings</div>
|
||||
<div class="panel-heading">Extra Settings</div>
|
||||
<div class="panel-body">
|
||||
<form method="POST">
|
||||
<div class="form-group $REFRESH_PAGE_STATUS$"><label class="control-label" for="CONFIG1">Refresh page time: </label><br>
|
||||
@ -11,6 +11,7 @@ $INCLUDE[header.inc]$
|
||||
<input type="number" class="form-control" id="CONFIG3" name="Z_FEEDRATE" placeholder="1~9999 " value="$Z_FEEDRATE$" min="1"max="9999" step="1"style="width: auto;"></div>
|
||||
<div class="form-group $E_FEEDRATE_STATUS$"><label class="control-label" for="CONFIG4">Extruder feedrate: </label><br>
|
||||
<input type="number" class="form-control" id="CONFIG4" name="E_FEEDRATE" placeholder="1~9999 " value="$E_FEEDRATE$" min="1"max="9999" step="1"style="width: auto;"></div>
|
||||
|
||||
<div class="alert alert-danger" role="alert" style="$ERROR_MSG_VISIBILITY$" >
|
||||
$ERROR_MSG$
|
||||
</div>
|
||||
@ -21,9 +22,65 @@ $SUCCESS_MSG$
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
$SERVICE_PAGE$
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-heading">Filesystem</div>
|
||||
<div class="panel-body">
|
||||
<input type="file" id="file-select" name="myfiles[]" multiple />
|
||||
<input type="button" id="upload-button" onclick="Sendfile();" value="Upload"/><br><br>
|
||||
<table class="table table-striped" style="border:1px;solid #dddddd;margin-bottom:20px;" ><thead><tr><th>Name</th><th>size</th><th width='0%'></th></tr></thead><tbody id="file_list"><tbody></table>
|
||||
<label class="text-info" id="status"></label>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function dispatchstatus(jsonresponse)
|
||||
{
|
||||
var content ="";
|
||||
document.getElementById('status').innerHTML=jsonresponse.status;
|
||||
for (var i=0;i <jsonresponse.files.length;i++){
|
||||
content +="<TR><TD style=\"cursor:hand;\" onclick=\"window.open('"+jsonresponse.files[i].name+"');\">";
|
||||
content +=jsonresponse.files[i].name;
|
||||
content +="</TD><TD>";
|
||||
content +=jsonresponse.files[i].size;
|
||||
content +="</TD><TD width='0%'><div style=\"cursor:hand; background:red; color:white;border-radius:12px ;\" onclick=\"Delete('"+jsonresponse.files[i].name+"')\"> × ";
|
||||
content +="</div></TD></TR>";
|
||||
}
|
||||
document.getElementById('file_list').innerHTML=content;}
|
||||
function Delete(filename){
|
||||
if (confirm("Confirm deletion of :" + filename))SendCommand("delete",filename);
|
||||
}
|
||||
function SendCommand(action,filename){
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
var url = "/FILES?action="+action;
|
||||
url += "&filename="+encodeURI(filename);
|
||||
xmlhttp.onreadystatechange = function() {
|
||||
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
||||
var jsonresponse = JSON.parse(xmlhttp.responseText);
|
||||
dispatchstatus(jsonresponse);}
|
||||
}
|
||||
xmlhttp.open("GET", url, true);
|
||||
xmlhttp.send();
|
||||
}
|
||||
function Sendfile(){
|
||||
document.getElementById('upload-button').value = "Uploading...";
|
||||
var files = document.getElementById('file-select').files;
|
||||
var formData = new FormData();
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
var file = files[i];
|
||||
formData.append('myfiles[]', file, "/"+file.name);}
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
xmlhttp.open('POST', '/FILES', true);
|
||||
xmlhttp.onload = function () {
|
||||
if (xmlhttp.status === 200) {
|
||||
document.getElementById('upload-button').value = 'Upload';
|
||||
document.getElementById('file-select').value="";
|
||||
var jsonresponse = JSON.parse(xmlhttp.responseText);
|
||||
dispatchstatus(jsonresponse);
|
||||
} else alert('An error occurred!');
|
||||
}
|
||||
xmlhttp.send(formData);
|
||||
}
|
||||
SendCommand('list','all');
|
||||
</script>
|
||||
$INCLUDE[footer.inc]$
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user