diff options
author | Abhishek Patel | 2016-05-27 17:45:35 +0530 |
---|---|---|
committer | Abhishek Patel | 2016-05-27 17:45:35 +0530 |
commit | 580e62658e53c4059626de70377954862fc84a00 (patch) | |
tree | 0fa09666b5a4827406c883bd96371c5d1276ed84 /views | |
parent | 096a8381f94ef9b417ddb650a80c81bda9c8805d (diff) | |
download | eSimWebApp-580e62658e53c4059626de70377954862fc84a00.tar.gz eSimWebApp-580e62658e53c4059626de70377954862fc84a00.tar.bz2 eSimWebApp-580e62658e53c4059626de70377954862fc84a00.zip |
Added analysis before generating netlist
Diffstat (limited to 'views')
-rw-r--r-- | views/schematic.html | 132 | ||||
-rw-r--r-- | views/script/gui.js | 190 | ||||
-rw-r--r-- | views/script/netlist.js | 20 | ||||
-rw-r--r-- | views/script/savenetlist.js | 149 | ||||
-rw-r--r-- | views/script/schematic.js | 5 | ||||
-rw-r--r-- | views/webtronix_server/parts.json | 1 |
6 files changed, 361 insertions, 136 deletions
diff --git a/views/schematic.html b/views/schematic.html index 2f587f1..4d8ef86 100644 --- a/views/schematic.html +++ b/views/schematic.html @@ -28,6 +28,7 @@ toolbar <img id='webtronics_file' title="file menu" src="buttons/openmenu.png"> <fieldset> <legend>Circuit</legend> + <img id="webtronics_analysis" class="normal_button" title="analysis" src="buttons/analysis.png"> <img id="webtronics_netlist" class="normal_button" title="view the netlist" src="buttons/netlist.png"> <!-- <img id="webtronics_run" class="normal_button" title="run spice" src="buttons/run.png"> --> <img id="webtronics_chips_open" class="normal_button" title="make chips" src="buttons/icbut.png"> @@ -209,39 +210,39 @@ add code text </div> -<!-- -netlist display ---> -<div id="webtronics_netlist_text" class='modal'> -<div id="webtronics_netlist_text_div" ></div> -<div class="webtronics_help" > -<pre> -convergence: -increase or decrease step size -or try adding -.options dampstrategy=2 -</pre> -</div> -<div id="webtronics_netlist_buttons"> -<!--<img id="webtronics_netlist_text_run" class="normal_button" src="buttons/run.png"> --> -<img id="webtronics_netlist_text_ok" class="normal_button" src="buttons/cancel.png"> -<img id="webtronics_netlist_generate" class="normal_button" src="buttons/generate.png"> -<img id="webtronics_netlist_simulate" class="normal_button" src="buttons/run.png"> -<img id="webtronics_netlist_text_download" class="normal_button" src="buttons/download.png"> -<select id="analysis_selectbox" class="exclude_button"> - <option value="" disabled="disabled" selected="selected">Analysis type</option> +<div id="webtronics_netlist_analysis" class='modal'> + +<br> + +<br> + +<br> + +<br> +<br> + + +<select id="analysis_selectbox" class="exclude_button"><br> + <option selected="selected" value="4">Analysis Type</option> <option value="1">DC</option> <option value="2">AC</option> <option value="3">Transient</option> <!-- <option value="4">Four</option> --> </select> -<!------------------------------------------------------------------------------------------------------------------------------------------------ -AC MENU FORM AND DIV --------------------------------------------------------------------------------------------------------------------------------------------------> + + +<div id = "select" display: none;> +<input id ="webtronics_netlist_cancels" class="button_cancel" type="button" value="cancel" ><br> + +</div> + +<!------------------------- AC MENU FORM AND DIV --------------------------------------------------------------------------------------------------------------> + + <div id = "ac_menu" display: none;> @@ -302,8 +303,9 @@ AC MENU FORM AND DIV </td> </tr> </table> -<input id ="saveac" type="button" value="Save" > +<input id ="saveac" class="view_netlist" type="button" value="save" > +<input id ="webtronics_netlist_cancela" class="button_cancel" type="button" value="cancel" ><br> </form> @@ -311,9 +313,13 @@ AC MENU FORM AND DIV </div> -<!------------------------------------------------------------------------------------------------------------------------------------------------ -TRANSIENT MENU FORM AND DIV --------------------------------------------------------------------------------------------------------------------------------------------------> + + +<!----------------------------------------- TRANSIENT MENU FORM AND DIV ------------------------------------------------------------> + + + + <div id="transient_menu" display: none;> <div id="inputbox_transient" display: table;> @@ -368,14 +374,17 @@ TRANSIENT MENU FORM AND DIV </td> </tr> </table> -<input id ="savetransient" type="button" value="Save" > +<input id ="savetransient" class="view_netlist" type="button" value="save" > +<input id ="webtronics_netlist_cancelt" class="button_cancel" type="button" value="cancel" ><br> + </form> </div> + </div> <!------------------------------------------------------------------------------------------------------------------------------------------------ DC MENU FORM AND DIV --------------------------------------------------------------------------------------------------------------------------------------------------> +--------------------------------------------------------------------------------------------------------------------------------------------> <div id="dc_menu" display: none;> @@ -450,20 +459,75 @@ DC MENU FORM AND DIV </tr> </table> -<input id ="savedc" type="button" value="Save" > +<input id ="savedc" class="view_netlist" type="button" value="save" > +<input id ="webtronics_netlist_canceld" class="button_cancel" type="button" value="cancel" ><br> + </form> + </div> </div> + <div id="domchange"> </div> -</div> -</div> + </div> + <!-- -code for select options of analysis +netlist display --> +<div id="webtronics_netlist_text" class='modal'> + +<div class="webtronics_help" > +<pre> +convergence: + +increase or decrease step size +or try adding + +.options dampstrategy=2 + +</pre> +</div> + + + +<br><br> +<div id="webtronics_netlist_text_div" ></div> +<br><br> + + + +<div id="webtronics_netlist_buttons"> +<!--<img id="webtronics_netlist_text_run" class="normal_button" src="buttons/run.png"> --> +<img id="webtronics_netlist_text_ok" class="normal_button" src="buttons/cancel.png"> + + +<img id="webtronics_netlist_simulate" class="normal_button" src="buttons/run.png"> +<img id="webtronics_netlist_text_download" class="normal_button" src="buttons/download.png"> + + + +</div> +</div> + + + + + + + + + + + + +</div> + +<!-- +code for select options of analysis +--> <!-- simulation display --> diff --git a/views/script/gui.js b/views/script/gui.js index 7a3a2ec..e7325ae 100644 --- a/views/script/gui.js +++ b/views/script/gui.js @@ -1,3 +1,10 @@ +
+
+
+
+globalVariable=0;
+
+
var webtronics={
circuit:null,
copy:null,
@@ -142,8 +149,13 @@ var webtronics={ var id=netlistcreator.readwtx(this.circuit.selected[0],"id");
var value=netlistcreator.readwtx(this.circuit.selected[0],"value");
+
+
if(id!=""){$('webtronics_part_id').value=id;}
if(value!=""){$('webtronics_part_value').value=value;}
+
+
+
$("webtronics_part_dir_value").value=netlistcreator.readwtx(this.circuit.selected[0],'model');
if(!netlistcreator.readwtx(webtronics.circuit.selected[0],"value")){
@@ -636,15 +648,31 @@ console.log(exception); });
/*
if($('webtronics_save')){
- Event.observe($('webtronics_save'), 'click', function() {
+ Event.observe($('webtronics_save'), 'click', function() {
webtronics.circuit.clearinfo();
webtronics.showMarkup();
});
}
*/
+
+ flag1=0;
+
+
+
+jQuery("#analysis_selectbox").change(function(){
+
+ analysis_type = jQuery(this).val();
+
+});
+
+
+
+
+
if($('webtronics_netlist')){
Event.observe($('webtronics_netlist'), 'click', function() {
-
+ if(flag1!=0){
+
netlistcreator.createnetlist(function(netlist){
var content=$$("#webtronics_netlist_text_div > *")
for(var i=0;i<content.length;i++){
@@ -652,12 +680,152 @@ console.log(exception); }
$("webtronics_netlist_text_div").insert(webtronics.formatnetlist(netlist,null));
$("webtronics_netlist_text").style.display='block';
-
- webtronics.center($('webtronics_netlist_text'));
+ globalVariable=1;
+ webtronics.center($('webtronics_netlist_text_div'));
webtronics.disablepage();});
-
+
+
+
+
+ jQuery('#webtronics_netlist_buttons').show();
+
+
+
+
+
+change_val = "0";
+Flag = "";
+ //console.log("out")
+ console.log(globalVariable+" gv\n");
+
+
+console.log(globalVariable+" gv1\n");
+console.log(Flag+"1 s\n");
+
+ if (change_val == "0")
+ {
+ Flag = jQuery("#webtronics_netlist_text_area").val();
+
+
+ console.log(Flag+"11s\n");
+/*-------------------------------------------------------------------------------------------------------------------------------------
+ Here are the conditions concatenated to give final netlist values for dc all cases
+---------------------------------------------------------------------------------------------------------------------------------------------*/
+ if (analysis_type == "1")
+ {
+
+ console.log(jQuery("#analysis_selectbox").val());
+
+ jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".dc" + " " + source + " " + start + "e" + "-" + start_dc_unit + " " + stop + "e" + "-" + stop_dc_unit + " " + increment + "e" + "-" + increment_dc_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" );
+
+ change_val = "1";
+ console.log(jQuery("#analysis_selectbox").val());
+ }
+
+
+/*------------------------------------------------------------------------------------------------------------------------------------------------
+Here are the all AC Cases for generating final netlist values
+------------------------------------------------------------------------------------------------------------------------------------------------*/
+ else if (analysis_type == "2")
+ {
+ jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".ac" + " " + scale_val + " " + noofpoint + " " + startfreq + start_ac_unit + " " + stopfreq + stop_ac_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" );
+
+ change_val = "1";
+ }
+/*------------------------------------------------------------------------------------------------------------------------------------------------
+Here are the all Transiet Cases for generating final netlist values
+------------------------------------------------------------------------------------------------------------------------------------------------*/
+ //else if (analysis_type == "3" && time == "1")
+ else if (analysis_type== "3")
+ {
+ jQuery("#webtronics_netlist_text_area").val(Flag + '\n' + ".tran" + " " + step_trans + "e" + "-" + step_trans_unit + " " + stop_trans + "e"+ "-" + stop_trans_unit + " " + start_trans + "e" + "-" + start_trans_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n" +".end \n" );
+
+ change_val = "1";
+ }
+console.log(Flag+"2\n");
+
+}
+
+else if( change_val == "1")
+
+{
+ console.log(Flag+"as\n");
+ jQuery("#webtronics_netlist_text_area").val("");
+ //console.log("if when 1")
+
+ if (analysis_type == "1")
+
+ {
+
+
+ jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".dc" + " " + source + " " + start + "e" + "-" + start_dc_unit + " " + stop + "e" + "-" + stop_dc_unit + " " + increment + "e" + "-" + increment_dc_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" );
+ change_val = "1";
+ }
+
+
+
+ else if (analysis_type == "2")
+ {
+ jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".ac" + " " + scale_val + " " + noofpoint + " " + startfreq + start_ac_unit + " " + stopfreq + stop_ac_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" );
+
+ change_val = "1";
+ }
+
+
+ else if (analysis_type == "3")
+ {
+ jQuery("#webtronics_netlist_text_area").val(Flag + '\n' + ".tran" + " " + step_trans + "e" + "-" + step_trans_unit + " " + stop_trans + "e"+ "-" + stop_trans_unit + " " + start_trans + "e" + "-" + start_trans_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n" +".end \n" );
+
+ change_val = "1";
+ }
+ console.log(Flag+"as\n");
+
+}
+
+
+
+
+
+
+
+ }
+ else {
+ alert("Analysis information is not available !");
+
+
+ }
+
+
+
+
});
}
+
+
+
+
+
+ jQuery("#webtronics_analysis").click(function(){
+ flag1=1;
+ jQuery('#webtronics_netlist_analysis').show();
+
+ jQuery('#webtronics_disable').show();
+
+
+
+ });
+
+ jQuery(".button_cancel").click(function(){
+ flag1=0;
+ jQuery("#webtronics_netlist_analysis").hide();
+ jQuery("#webtronics_disable").hide();
+
+ });
+
+
+
+
+
if($('webtronics_run')){
Event.observe($('webtronics_run'), 'click', function() {
// webtronics.postspice(webtronics.circuit.createnetlist());
@@ -719,7 +887,9 @@ console.log(exception); netlistcreator.writewtx(model,"model",$('webtronics_part_dir_value').value);
netlistcreator.writewtx(model,"measure",$('webtronics_print_dir_value').value);
- webtronics.circuit.createvalue(webtronics.circuit.selected[0]);
+
+
+ webtronics.circuit.createvalue(webtronics.circuit.selected[0]);
});
if($('webtronics_properties_cancel'))Event.observe($('webtronics_properties_cancel'), 'click', function() {
@@ -837,7 +1007,13 @@ console.log(exception); $('webtronics_netlist_text').style.display='none';
webtronics.enablepage();
});
- }
+ }
+
+
+
+
+
+
if($("webtronics_netlist_text_run")){
Event.observe($('webtronics_netlist_text_run'), 'click', function() {
webtronics.gnucapjs($("webtronics_netlist_text_area").value);
diff --git a/views/script/netlist.js b/views/script/netlist.js index cb32f7a..0fe044c 100644 --- a/views/script/netlist.js +++ b/views/script/netlist.js @@ -129,7 +129,7 @@ sortnetlist:function(list){ M.each(function(item){newlist.push(item)}); N.each(function(item){newlist.push(item)}); Q.each(function(item){newlist.push(item)}); - R.each(function(item){newlist.push(item)}); + R.each(function(item){newlist.push(item)}); U.each(function(item){newlist.push(item)}); A.each(function(item){newlist.push(item)}); other.each(function(item){newlist.push(item)}); @@ -203,6 +203,7 @@ getwtxdata:function(parts){ catch{part.error="wtx:pins not found"} */ part.elem=parts[i]; + try{ var category=webtronics.circuit.getwtxtagname(parts[i],"analog")[0]; var nodes = webtronics.circuit.getwtxtagname(category,"node"); @@ -244,7 +245,7 @@ getwtxdata:function(parts){ } catch(e){part.error="wtx:category not found";} try{ - part.value=this.readwtx(parts[i],'value'); + part.value=this.readwtx(parts[i],'value'); } catch(e){part.error="wtx:value not found";} try{ @@ -260,7 +261,7 @@ getwtxdata:function(parts){ part.measure=this.readwtx(parts[i],'measure'); } catch(e){} - + list.push(part); } return list; @@ -429,18 +430,24 @@ getnodes:function(parts){ createnetlist:function(responsefunc){ var parts=webtronics.circuit.getwithselector('#webtronics_drawing > g'); + if(parts.length<1){ - responsefunc("no parts found (moded by Niel Mishra)\n"); + responsefunc("no parts found \n"); return; } + + + var partswtx=this.sortnetlist(this.getwtxdata(parts)); + + if(partswtx[0].type.toLowerCase()!='gnd'){ responsefunc('no ground node'); return; } this.connectnamewires(partswtx); - var spice="*ngspice netlist by Niel Mishra* \n"; + var spice="*ngspice netlist * \n"; var sections=this.getnodes(partswtx); //dump models into spice @@ -458,9 +465,10 @@ createnetlist:function(responsefunc){ for(var j=0;j<sections.netlist[i].pins['digital'].length;j++)pins.push(sections.netlist[i].pins['digital'][j]); pins.sort(function(a,b){return a.index > b.index? 1:a.index < b.index?-1:0;}) // console.log(pins); - for(var j=0;j<pins.length;j++)command += " "+pins[j].node; + for(var j=0;j<pins.length;j++){command += " "+pins[j].node;} command+=" "+sections.netlist[i].model; + if(command!="")spice+=command+'\n'; } } diff --git a/views/script/savenetlist.js b/views/script/savenetlist.js index 1bfa721..12e2cd1 100644 --- a/views/script/savenetlist.js +++ b/views/script/savenetlist.js @@ -58,15 +58,25 @@ For Simulation of Netlist and Removal of netlist Window VIEW NETLIST WINDOW ------------------------------------------------------------------------------------------------------------------------------------------------*/ -jQuery("#webtronics_netlist").click(function(){ - jQuery('#webtronics_netlist_text_div').show(); - jQuery('#webtronics_netlist_buttons').show(); - jQuery('#webtronics_netlist_text').show(); - jQuery('#webtronics_disable').show(); - }); + + + + +// jQuery(".view_netlist").click(function(){ + +// jQuery('#webtronics_netlist_text_div').show(); +// jQuery('#webtronics_netlist_text').show(); +// }); + + + + + + + /*------------------------------------------------------------------------------------------------------------------------------------------------ For Download of netlist @@ -112,29 +122,43 @@ For Download of netlist DC FUNCTIONALITY IS WRITTEN HERE ---------------------------------------------------------------------------------------------------------------------------------------------------*/ jQuery(function(){ + jQuery("#select").show(); jQuery("#dc_menu").hide(); jQuery("#ac_menu").hide(); jQuery("#transient_menu").hide(); jQuery("#analysis_selectbox").change(function(){ - if (jQuery(this).val() == "1") + + if (jQuery(this).val() == "4") { + jQuery("#select").show(); + jQuery("#transient_menu").hide(); + jQuery("#dc_menu").hide(); + jQuery("#ac_menu").hide(); + + } + else if (jQuery(this).val() == "1") + { + jQuery("#select").hide(); jQuery("#dc_menu").show(); jQuery("#ac_menu").hide(); jQuery("#transient_menu").hide(); } else if (jQuery(this).val() == "2") { + jQuery("#select").hide(); jQuery("#ac_menu").show(); jQuery("#dc_menu").hide(); jQuery("#transient_menu").hide(); } else if (jQuery(this).val() == "3") { + jQuery("#select").hide(); jQuery("#transient_menu").show(); jQuery("#dc_menu").hide(); jQuery("#ac_menu").hide(); } + //$("#preview").change(function(){ //jQuery"#analysis_selectbox".val(); @@ -144,12 +168,7 @@ jQuery(function(){ -jQuery("#analysis_selectbox").change(function(){ - analysis_type = jQuery(this).val(); - //console.log(analysis_type); -}); - /*------------------------------------------------------------------------------------------------------------------------------------------------ Ac netlist variable for ac ------------------------------------------------------------------------------------------------------------------------------------------------*/ @@ -173,6 +192,13 @@ jQuery("#saveac").click(function(){ { alert("Please Enter No Of Points"); } + else{ + + jQuery("#webtronics_netlist_analysis").hide(); + jQuery("#webtronics_disable").hide(); + } + + }); @@ -280,6 +306,13 @@ jQuery("#savedc").click(function(){ { alert("Please enter the Stop Time"); } + + else{ + + jQuery("#webtronics_netlist_analysis").hide(); + jQuery("#webtronics_disable").hide(); + } + }); @@ -395,6 +428,12 @@ jQuery("#savetransient").click(function(){ { alert("Please enter the Stop Time"); } + else{ + + jQuery("#webtronics_netlist_analysis").hide(); + jQuery("#webtronics_disable").hide(); + } + }); @@ -471,96 +510,28 @@ jQuery("#stop_time_selectbox").change(function(){ console.log(stop_trans_unit); }); -/*------------------------------------------------------------------------------------------------------------------------------------------------ -Netlist Generation -------------------------------------------------------------------------------------------------------------------------------------------------*/ -change_val = "0"; -Flag = ""; - //console.log("out") - //console.log(change_val) - jQuery("#webtronics_netlist_generate").click(function(){ - //console.log(change_val) - - if (change_val == "0") - { - Flag = jQuery("#webtronics_netlist_text_area").val(); - //console.log("if when 0") - - -/*------------------------------------------------------------------------------------------------------------------------------------- - Here are the conditions concatenated to give final netlist values for dc all cases ----------------------------------------------------------------------------------------------------------------------------------------------*/ - if (analysis_type == "1") - { - //console.log(jQuery("#analysis_selectbox").val()); - - jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".dc" + " " + source + " " + start + "e" + "-" + start_dc_unit + " " + stop + "e" + "-" + stop_dc_unit + " " + increment + "e" + "-" + increment_dc_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" ); - - change_val = "1"; - //console.log(jQuery("#analysis_selectbox").val()); - } - -/*------------------------------------------------------------------------------------------------------------------------------------------------ -Here are the all AC Cases for generating final netlist values -------------------------------------------------------------------------------------------------------------------------------------------------*/ - else if (analysis_type == "2") - { - jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".ac" + " " + scale_val + " " + noofpoint + " " + startfreq + start_ac_unit + " " + stopfreq + stop_ac_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" ); - change_val = "1"; - } -/*------------------------------------------------------------------------------------------------------------------------------------------------ -Here are the all Transiet Cases for generating final netlist values -------------------------------------------------------------------------------------------------------------------------------------------------*/ - //else if (analysis_type == "3" && time == "1") - else if (analysis_type == "3") - { - jQuery("#webtronics_netlist_text_area").val(Flag + '\n' + ".tran" + " " + step_trans + "e" + "-" + step_trans_unit + " " + stop_trans + "e"+ "-" + stop_trans_unit + " " + start_trans + "e" + "-" + start_trans_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n" +".end \n" ); - change_val = "1"; - } -} -else if( change_val == "1") - -{ - //console.log(change_val) - jQuery("#webtronics_netlist_text_area").val(""); - //console.log("if when 1") - - if (analysis_type == "1") - - { - - - jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".dc" + " " + source + " " + start + "e" + "-" + start_dc_unit + " " + stop + "e" + "-" + stop_dc_unit + " " + increment + "e" + "-" + increment_dc_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" ); - change_val = "1"; - } - - - else if (analysis_type == "2") - { - jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".ac" + " " + scale_val + " " + noofpoint + " " + startfreq + start_ac_unit + " " + stopfreq + stop_ac_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" ); - change_val = "1"; - } - else if (analysis_type == "3") - { - jQuery("#webtronics_netlist_text_area").val(Flag + '\n' + ".tran" + " " + step_trans + "e" + "-" + step_trans_unit + " " + stop_trans + "e"+ "-" + stop_trans_unit + " " + start_trans + "e" + "-" + start_trans_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n" +".end \n" ); - change_val = "1"; - } - -} + + + +/*------------------------------------------------------------------------------------------------------------------------------------------------ +Netlist Generation +----------------------*/ + }); -}); + + diff --git a/views/script/schematic.js b/views/script/schematic.js index a6175d1..ab611ee 100644 --- a/views/script/schematic.js +++ b/views/script/schematic.js @@ -678,6 +678,7 @@ Schematic.prototype.createvalue=function(elem){ var id=this.readwtx(elem,"id");
var value=this.readwtx(elem,"value");
var label=this.readwtx(elem,"label");
+
}
catch(e){console.log(e);}
if(label.length && $(label)){
@@ -689,6 +690,8 @@ Schematic.prototype.createvalue=function(elem){ var idspan=this.createtspan(id,0,0);
$(label).appendChild(idspan);
}
+
+
if(value){
var box=this.tracker($(label));
var valuespan=this.createtspan(value,-box.width,box.height);
@@ -696,6 +699,7 @@ Schematic.prototype.createvalue=function(elem){ }
$(label).appendChild(idspan);
$(label).appendChild(valuespan);
+ $(label).appendChild(tempspan);
}
else{
var text=this.createtext("",'black',0,0-this.fontsize);
@@ -706,6 +710,7 @@ Schematic.prototype.createvalue=function(elem){ var idspan=this.createtspan(id,0,0);
text.appendChild(idspan);
}
+
if(value){
var box=this.tracker(text);
var valuespan=this.createtspan(value,-box.width,box.height);
diff --git a/views/webtronix_server/parts.json b/views/webtronix_server/parts.json index 49052f0..8ae516d 100644 --- a/views/webtronix_server/parts.json +++ b/views/webtronix_server/parts.json @@ -186,6 +186,7 @@ "transformer":{} }, "power":{ + "current":{ "values":{ |