text:
27" display="off"/>
<attribute name="SPICEMODEL" value="NONE" x="61.632609375" y="46.6226" size="1.778" layer="27" display="off"/>
</element>
<element name="U$11" library="MakesmithDiode" package="SMA" value="MRA4004" x="67.563171875" y="43.053" smashed="yes" rot="R90"/>
<element name="U$13" library="MakesmithDiode" package="SMA" value="MRA4004" x="63.341021875" y="33.6042" smashed="yes" rot="R90"/>
<element name="U$14" library="MakesmithDiode" package="SMA" value="MRA4004" x="67.28469375" y="33.6042" smashed="yes" rot="R270"/>
<element name="U$15" library="MakesmithDiode" package="SMA" value="MRA4004" x="88.13766875" y="33.6042" smashed="yes" rot="R90"/>
<element name="U$16" library="MakesmithDiode" package="SMA" value="MRA4004" x="92.127721875" y="33.6042" smashed="yes" rot="R270"/>
<element name="U$17" library="MakesmithDiode" package="SMA" value="MRA4004" x="88.302025" y="43.053" smashed="yes" rot="R270"/>
<element name="U$18" library="MakesmithDiode" package="SMA" value="MRA4004" x="92.249690625" y="43.053" smashed="yes" rot="R90"/>
<element name="U$19" library="JST-CON" package="JST-PHR-6-SMD" value="JST-PH-6" x="97.190734375" y="43.434" rot="R270"/>
<element name="U$20" library="JST-CON" package="JST-PHR-6-SMD" value="JST-PH-6" x="57.01835625" y="43.434" rot="R270"/>
<element name="J6" library="SparkFun-Connectors" package="1X03_LOCK" value="" x="38.1" y="11.3792" smashed="yes" rot="R270">
<attribute name="VALUE" x="34.925" y="12.6492" size="1.27" layer="27" rot="R270"/>
</element>
<element name="J7" library="SparkFun-Connectors" package="1X03_LOCK" value="" x="40.64" y="11.3792" smashed="yes" rot="R270">
<attribute name="VALUE" x="37.465" y="12.6492" size="1.27" layer="27" rot="R270"/>
</element>
<element name="COMMUNICATION1" library="pinhead" package="1X08" value="" x="42.545" y="50.8" smashed="yes">
<attribute name="VALUE" x="32.385" y="47.625" size="1.27" layer="27"/>
</element>
<element name="JP3" library="pinhead" package="2X02" value="" x="6.9861125" y="3.8096875" smashed="yes" rot="R90">
<attribute name="VALUE" x="11.4311125" y="1.2696875" size="1.27" layer="27" rot="R90"/>
</element>
<element name="JP4" library="pinhead" package="2X02" value="" x="6.987575" y="44.44901875" smashed="yes" rot="R270">
<attribute name="VALUE" x="2.542575" y="46.98901875" size="1.27" layer="27" rot="R270"/>
</element>
</elements>
<signals>
<signal name="GND" class="2">
<contactref element="USB" pad="C"/>
<contactref element="C1" pad="2"/>
<contactref element="C2" pad="2"/>
<contactref element="IC1" pad="1"/>
<contactref element="U$4" pad="A"/>
<contactref element="U$6" pad="A"/>
<contactref element="U$8" pad="A"/>
<contactref element="U$10" pad="A"/>
<contactref element="J1" pad="3"/>
<polygon width="0.6096" layer="16">
<vertex x="-1.39133125" y="54.75705"/>
<vertex x="100.184378125" y="54.03924375"/>
<vertex x="99.760878125" y="-0.407590625"/>
<vertex x="54.41208125" y="0.09781875"/>
<vertex x="-2.129090625" y="-2.14818125"/>
</polygon>
<contactref element="U$1" pad="P$4"/>
<contactref element="U$12" pad="P$4"/>
<contactref element="IC1" pad="19"/>
<contactref element="IC1" pad="2"/>
<contactref element="J3" pad="1"/>
<contactref element="J4" pad="1"/>
<contactref element="J5" pad="1"/>
<contactref element="J2" pad="1"/>
<wire x1="25.441503125" y1="41.4528" x2="25.441503125" y2="40.1828" width="0.6096" layer="1"/>
<wire x1="25.441503125" y1="41.4528" x2="23.977025" y2="45.01931875" width="0.6096" layer="1"/>
<wire x1="23.977025" y1="45.01931875" x2="21.75345" y2="45.053" width="0.6096" layer="1"/>
<wire x1="53.389334375" y1="44.116434375" x2="54.757303125" y2="44.116434375" width="0.6096" layer="16"/>
<wire x1="54.757303125" y1="44.116434375" x2="54.946253125" y2="44.305384375" width="0.6096" layer="16"/>
<contactref element="IC2" pad="1"/>
<contactref element="C3" pad="2"/>
<contactref element="C4" pad="2"/>
<contactref element="IC2" pad="19"/>
<contactref element="IC2" pad="2"/>
<contactref element="U$11" pad="A"/>
<contactref element="U$14" pad="A"/>
<contactref element="U$16" pad="A"/>
<contactref element="U$18" pad="A"/>
<contactref element="U$19" pad="P$4"/>
<contactref element="U$20" pad="P$4"/>
<wire x1="71.118046875" y1="41.4528" x2="71.118046875" y2="40.1828" width="0.6096" layer="1"/>
<wire x1="71.118046875" y1="41.4528" x2="71.146128125" y2="40.61359375" width="0.6096" layer="1"/>
<wire x1="71.146128125" y1="40.61359375" x2="71.146128125" y2="42.448509375" width="0.6096" layer="1"/>
<via x="71.146128125" y="42.448509375" extent="1-16" drill="0.6"/>
<wire x1="71.146128125" y1="42.448509375" x2="71.146128125" y2="43.511765625" width="0.6096" layer="16"/>
<wire x1="92.127721875" y1="31.6042" x2="92.15745" y2="29.760184375" width="0.6096" layer="1"/>
<wire x1="92.15745" y1="29.760184375" x2="92.205884375" y2="29.089409375" width="0.6096" layer="1"/>
<via x="92.205884375" y="29.089409375" extent="1-16" drill="0.6"/>
<wire x1="92.205884375" y1="29.089409375" x2="92.205884375" y2="28.997346875" width="0.6096" layer="16"/>
<wire x1="92.205884375" y1="28.997346875" x2="92.25729375" y2="28.886753125" width="0.6096" layer="16"/>
<contactref element="IC1" pad="HEAT"/>
<contactref element="IC2" pad="HEAT"/>
<contactref element="J6" pad="1"/>
<contactref element="J7" pad="1"/>
<wire x1="5.711590625" y1="50.53169375" x2="5.711590625" y2="45.723409375" width="0.6096" layer="1"/>
<wire x1="38.441503125" y1="40.1828" x2="38.386284375" y2="40.23348125" width="0.4064" layer="1"/>
<wire x1="38.386284375" y1="40.23348125" x2="36.539265625" y2="40.23348125" width="0.4064" layer="1"/>
<via x="36.539265625" y="40.23348125" extent="1-16" drill="0.6"/>
<wire x1="36.539265625" y1="40.23348125" x2="36.518696875" y2="40.25405" width="0.4064" layer="16"/>
<wire x1="36.518696875" y1="40.25405" x2="35.98408125" y2="40.25405" width="0.4064" layer="16"/>
<wire x1="45.93135625" y1="45.053" x2="47.351775" y2="46.591446875" width="0.6096" layer="1"/>
<wire x1="47.351775" y1="46.591446875" x2="48.755971875" y2="46.591446875" width="0.6096" layer="1"/>
<via x="48.755971875" y="46.591446875" extent="1-16" drill="0.6"/>
<wire x1="48.755971875" y1="46.591446875" x2="49.72904375" y2="46.591446875" width="0.6096" layer="16"/>
<wire x1="31.972309375" y1="44.9326" x2="32.98198125" y2="44.91415" width="0.6096" layer="1"/>
<wire x1="32.98198125" y1="44.91415" x2="34.183328125" y2="44.91415" width="0.6096" layer="1"/>
<wire x1="34.183328125" y1="44.91415" x2="34.21876875" y2="44.9326" width="0.6096" layer="1"/>
<wire x1="27.236421875" y1="40.1782625" x2="25.441503125" y2="40.1828" width="0.6096" layer="1"/>
<wire x1="32.98198125" y1="44.91415" x2="34.48303125" y2="46.4152" width="0.6096" layer="1"/>
<wire x1="34.48303125" y1="46.4152" x2="34.48303125" y2="46.91849375" width="0.6096" layer="1"/>
<via x="34.48303125" y="46.91849375" extent="1-16" drill="0.6"/>
<wire x1="34.48303125" y1="46.91849375" x2="34.5036" y2="46.897925" width="0.6096" layer="16"/>
<wire x1="34.5036" y1="46.897925" x2="35.94295625" y2="46.897925" width="0.6096" layer="16"/>
<wire x1="46.04288125" y1="31.6042" x2="46.679665625" y2="30.4407375" width="0.6096" layer="1"/>
<wire x1="46.679665625" y1="30.4407375" x2="46.679665625" y2="28.751715625" width="0.6096" layer="1"/>
<via x="46.679665625" y="28.751715625" extent="1-16" drill="0.6"/>
<wire x1="46.679665625" y1="28.751715625" x2="47.094640625" y2="28.336740625" width="0.6096" layer="16"/>
<wire x1="47.094640625" y1="28.336740625" x2="47.479378125" y2="28.336740625" width="0.6096" layer="16"/>
<contactref element="IC1" pad="HEAT1"/>
<contactref element="IC1" pad="HEAT2"/>
<contactref element="IC1" pad="HEAT3"/>
<contactref element="IC1" pad="HEAT4"/>
<contactref element="IC1" pad="HEAT5"/>
<contactref element="IC1" pad="HEAT6"/>
<contactref element="IC2" pad="HEAT1"/>
<contactref element="IC2" pad="HEAT2"/>
<contactref element="IC2" pad="HEAT3"/>
<contactref element="IC2" pad="HEAT4"/>
<contactref element="IC2" pad="HEAT5"/>
<contactref element="IC2" pad="HEAT6"/>
<wire x1="27.236421875" y1="40.1782625" x2="28.836828125" y2="41.77866875" width="0.6096" layer="1"/>
<wire x1="28.836828125" y1="41.77866875" x2="28.836828125" y2="42.487803125" width="0.6096" layer="1"/>
<wire x1="28.836828125" y1="42.487803125" x2="29.7452" y2="43.396175" width="0.6096" layer="1"/>
<wire x1="29.7452" y1="43.396175" x2="31.149940625" y2="43.396175" width="0.6096" layer="1"/>
<wire x1="31.149940625" y1="43.396175" x2="31.972309375" y2="44.21854375" width="0.6096" layer="1"/>
<wire x1="31.972309375" y1="44.21854375" x2="31.972309375" y2="44.9326" width="0.6096" layer="1"/>
<wire x1="21.696659375" y1="31.6042" x2="21.696659375" y2="30.04485625" width="1.4224" layer="1"/>
<wire x1="21.696659375" y1="30.04485625" x2="20.164725" y2="28.512921875" width="1.4224" layer="1"/>
<via x="20.164725" y="28.512921875" extent="1-16" drill="0.6"/>
<wire x1="20.164725" y1="28.512921875" x2="18.042178125" y2="28.512921875" width="1.4224" layer="16"/>
<wire x1="18.042178125" y1="28.512921875" x2="17.770628125" y2="28.241371875" width="1.4224" layer="16"/>
<contactref element="JP4" pad="1"/>
<contactref element="JP4" pad="2"/>
<wire x1="5.711590625" y1="45.723409375" x2="8.257575" y2="45.723409375" width="0.6096" layer="1"/>
<wire x1="8.257575" y1="45.723409375" x2="8.257575" y2="45.71901875" width="0.6096" layer="1"/>
<contactref element="JP4" pad="3"/>
<contactref element="JP4" pad="4"/>
<contactref element="JP3" pad="4"/>
<wire x1="67.28469375" y1="31.6042" x2="67.28469375" y2="29.83461875" width="0.6096" layer="1"/>
<wire x1="67.28469375" y1="29.83461875" x2="66.56793125" y2="29.11785625" width="0.6096" layer="1"/>
<via x="66.56793125" y="29.11785625" extent="1-16" drill="0.6"/>
<wire x1="66.56793125" y1="29.11785625" x2="65.586525" y2="29.11785625" width="0.6096" layer="16"/>
<wire x1="65.586525" y1="29.11785625" x2="65.5011375" y2="29.03246875" width="0.6096" layer="16"/>
<wire x1="67.563171875" y1="45.053" x2="70.1676625" y2="42.448509375" width="0.6096" layer="1"/>
<wire x1="70.1676625" y1="42.448509375" x2="71.146128125" y2="42.448509375" width="0.6096" layer="1"/>
<wire x1="84.118046875" y1="40.1828" x2="84.13736875" y2="40.163478125" width="0.6096" layer="1"/>
<wire x1="84.13736875" y1="40.163478125" x2="85.5983625" y2="40.163478125" width="0.6096" layer="1"/>
<wire x1="85.5983625" y1="40.163478125" x2="86.072265625" y2="40.63738125" width="0.6096" layer="1"/>
<wire x1="77.618046875" y1="42.0878" x2="77.618046875" y2="44.258915625" width="0.6096" layer="1"/>
<wire x1="77.618046875" y1="44.258915625" x2="76.9443625" y2="44.9326" width="0.6096" layer="1"/>
<wire x1="76.9443625" y1="44.9326" x2="79.907696875" y2="44.9326" width="0.6096" layer="1"/>
<wire x1="86.072265625" y1="40.63738125" x2="86.072265625" y2="42.39264375" width="0.6096" layer="1"/>
<wire x1="86.072265625" y1="42.39264375" x2="85.3287875" y2="43.136121875" width="0.6096" layer="1"/>
<wire x1="85.3287875" y1="43.136121875" x2="84.614903125" y2="43.136121875" width="0.6096" layer="1"/>
<wire x1="84.614903125" y1="43.136121875" x2="84.6049875" y2="43.12620625" width="0.6096" layer="1"/>
<via x="84.6049875" y="43.12620625" extent="1-16" drill="0.6"/>
<wire x1="84.6049875" y1="43.12620625" x2="85.0015875" y2="43.12620625" width="0.6096" layer="16"/>
<wire x1="85.0015875" y1="43.12620625" x2="85.01150625" y2="43.1162875" width="0.6096" layer="16"/>
<wire x1="92.249690625" y1="45.053" x2="91.094096875" y2="46.20859375" width="0.6096" layer="1"/>
<wire x1="91.094096875" y1="46.20859375" x2="91.094096875" y2="47.048634375" width="0.6096" layer="1"/>
<via x="91.094096875" y="47.048634375" extent="1-16" drill="0.6"/>
<wire x1="91.094096875" y1="47.048634375" x2="91.094096875" y2="46.515203125" width="0.6096" layer="16"/>
<wire x1="77.618046875" y1="34.4678" x2="77.618046875" y2="35.7378" width="0" layer="19" extent="1-1"/>
<wire x1="31.941503125" y1="35.7378" x2="31.941503125" y2="34.4678" width="0" layer="19" extent="1-1"/>
</signal>
<signal name="INCA1">
<contactref element="U$12" pad="P$6"/>
<contactref element="PWML" pad="4"/>
<wire x1="46.355" y1="2.54" x2="46.355" y2="11.948790625" width="0.6096" layer="1"/>
<wire x1="46.355" y1="11.948790625" x2="48.414515625" y2="14.00830625" width="0.6096" layer="1"/>
<via x="48.414515625" y="14.00830625" extent="1-16" drill="0.6"/>
<wire x1="48.414515625" y1="14.00830625" x2="48.414515625" y2="14.017878125" width="0.6096" layer="16"/>
<wire x1="48.414515625" y1="14.00830625" x2="48.430721875" y2="14.00830625" width="0.6096" layer="16"/>
<wire x1="48.430721875" y1="14.00830625" x2="54.87336875" y2="20.450953125" width="0.6096" layer="16"/>
<via x="54.87336875" y="20.450953125" extent="1-16" drill="0.6"/>
<wire x1="54.87336875" y1="20.450953125" x2="54.87336875" y2="22.06888125" width="0.6096" layer="1"/>
<wire x1="54.87336875" y1="22.06888125" x2="51.018246875" y2="25.924003125" width="0.6096" layer="1"/>
<wire x1="51.018246875" y1="25.924003125" x2="51.018246875" y2="30.934" width="0.6096" layer="1"/>
</signal>
<signal name="INCA2">
<contactref element="U$12" pad="P$5"/>
<contactref element="PWML" pad="3"/>
<wire x1="43.815" y1="2.54" x2="43.815" y2="12.185728125" width="0.6096" layer="1"/>
<wire x1="43.815" y1="12.185728125" x2="47.1121375" y2="15.482865625" width="0.6096" layer="1"/>
<via x="47.1121375" y="15.482865625" extent="1-16" drill="0.6"/>
<wire x1="47.1121375" y1="15.482865625" x2="47.1121375" y2="15.54915" width="0.6096" layer="16"/>
<wire x1="47.1121375" y1="15.54915" x2="53.22765625" y2="21.66466875" width="0.6096" layer="16"/>
<via x="53.22765625" y="21.66466875" extent="1-16" drill="0.6"/>
<wire x1="50.88619375" y1="33.301946875" x2="51.018246875" y2="33.434" width="0.6096" layer="1"/>
<wire x1="53.22765625" y1="21.66466875" x2="49.02719375" y2="25.86513125" width="0.6096" layer="1"/>
<wire x1="49.02719375" y1="25.86513125" x2="49.02719375" y2="32.717115625" width="0.6096" layer="1"/>
<wire x1="49.02719375" y1="32.717115625" x2="49.744078125" y2="33.434" width="0.6096" layer="1"/>
<wire x1="49.744078125" y1="33.434" x2="51.018246875" y2="33.434" width="0.6096" layer="1"/>
</signal>
<signal name="INCB1">
<contactref element="U$1" pad="P$6"/>
<contactref element="COMMUNICATION" pad="3"/>
<wire x1="20.955" y1="2.54" x2="20.955" y2="7.13748125" width="0.6096" layer="1"/>
<wire x1="20.955" y1="7.13748125" x2="12.78159375" y2="15.3108875" width="0.6096" layer="1"/>
<wire x1="12.78159375" y1="15.3108875" x2="12.78159375" y2="30.934" width="0.6096" layer="1"/>
</signal>
<signal name="INCB2">
<contactref element="U$1" pad="P$5"/>
<contactref element="COMMUNICATION" pad="4"/>
<wire x1="14.386865625" y1="15.535834375" x2="23.525384375" y2="6.397315625" width="0.6096" layer="1"/>
<wire x1="23.525384375" y1="6.397315625" x2="23.525384375" y2="2.570384375" width="0.6096" layer="1"/>
<wire x1="23.525384375" y1="2.570384375" x2="23.495" y2="2.54" width="0.6096" layer="1"/>
<wire x1="14.386865625" y1="15.535834375" x2="14.386865625" y2="32.04925" width="0.6096" layer="1"/>
<wire x1="14.386865625" y1="32.04925" x2="12.940578125" y2="33.4955375" width="0.6096" layer="1"/>
<wire x1="12.940578125" y1="33.4955375" x2="12.78159375" y2="33.434" width="0.6096" layer="1"/>
</signal>
<signal name="INCC1">
<contactref element="COMMUNICATION" pad="2"/>
<contactref element="U$20" pad="P$6"/>
<wire x1="18.415" y1="2.54" x2="18.216428125" y2="2.738571875" width="0.6096" layer="16"/>
<wire x1="18.216428125" y1="2.738571875" x2="18.216428125" y2="4.695903125" width="0.6096" layer="16"/>
<wire x1="18.216428125" y1="4.695903125" x2="17.46780625" y2="5.444525" width="0.6096" layer="16"/>
<wire x1="17.46780625" y1="5.444525" x2="13.050575" y2="5.444525" width="0.6096" layer="16"/>
<wire x1="13.050575" y1="5.444525" x2="12.302884375" y2="6.192215625" width="0.6096" layer="16"/>
<wire x1="12.302884375" y1="6.192215625" x2="12.302884375" y2="18.919721875" width="0.6096" layer="16"/>
<wire x1="12.302884375" y1="18.919721875" x2="16.658503125" y2="23.275340625" width="0.6096" layer="16"/>
<wire x1="16.658503125" y1="23.275340625" x2="56.76591875" y2="23.275340625" width="0.6096" layer="16"/>
<via x="56.76591875" y="23.275340625" extent="1-16" drill="0.6"/>
<wire x1="56.76591875" y1="23.275340625" x2="56.76591875" y2="30.6815625" width="0.6096" layer="1"/>
<wire x1="56.76591875" y1="30.6815625" x2="57.01835625" y2="30.934" width="0.6096" layer="1"/>
</signal>
<signal name="INCC2">
<contactref element="COMMUNICATION" pad="1"/>
<contactref element="U$20" pad="P$5"/>
<wire x1="15.83775625" y1="24.7725875" x2="55.062409375" y2="24.808146875" width="0.6096" layer="16"/>
<wire x1="15.875" y1="2.54" x2="12.623209375" y2="2.54" width="0.6096" layer="16"/>
<wire x1="12.623209375" y1="2.54" x2="10.739534375" y2="4.423675" width="0.6096" layer="16"/>
<wire x1="10.739534375" y1="4.423675" x2="10.739534375" y2="19.674365625" width="0.6096" layer="16"/>
<wire x1="10.739534375" y1="19.674365625" x2="15.83775625" y2="24.7725875" width="0.6096" layer="16"/>
<via x="55.062409375" y="24.808146875" extent="1-16" drill="0.6"/>
<wire x1="55.062409375" y1="24.808146875" x2="55.062409375" y2="32.744096875" width="0.6096" layer="1"/>
<wire x1="55.062409375" y1="32.744096875" x2="55.71110625" y2="33.39279375" width="0.6096" layer="1"/>
<wire x1="55.71110625" y1="33.39279375" x2="56.97715" y2="33.39279375" width="0.6096" layer="1"/>
<wire x1="56.97715" y1="33.39279375" x2="57.01835625" y2="33.434" width="0.6096" layer="1"/>
</signal>
<signal name="5V">
<contactref element="R1" pad="2"/>
<contactref element="IC1" pad="12"/>
<contactref element="C1" pad="1"/>
<contactref element="U$1" pad="P$3"/>
<contactref element="U$12" pad="P$3"/>
<wire x1="9.669328125" y1="2.3843375" x2="8.4106625" y2="2.3843375" width="0.8128" layer="1"/>
<wire x1="98.682871875" y1="43.17000625" x2="98.682871875" y2="46.681696875" width="0.8128" layer="16"/>
<wire x1="98.682871875" y1="46.681696875" x2="96.59254375" y2="48.772025" width="0.8128" layer="16"/>
<wire x1="96.59254375" y1="48.772025" x2="86.523253125" y2="48.772025" width="0.8128" layer="16"/>
<contactref element="J2" pad="2"/>
<contactref element="J3" pad="2"/>
<contactref element="J4" pad="2"/>
<contactref element="J5" pad="2"/>
<wire x1="86.523253125" y1="48.772025" x2="63.023809375" y2="48.772025" width="0.8128" layer="16"/>
<wire x1="63.023809375" y1="48.772025" x2="55.21724375" y2="48.772025" width="0.8128" layer="16"/>
<wire x1="55.21724375" y1="48.772025" x2="41.18968125" y2="48.772025" width="0.8128" layer="16"/>
<wire x1="41.18968125" y1="48.772025" x2="19.19906875" y2="48.772025" width="0.8128" layer="16"/>
<wire x1="27.813" y1="8.8392" x2="30.353" y2="8.8392" width="1.016" layer="1"/>
<wire x1="30.353" y1="8.8392" x2="32.893" y2="8.8392" width="1.016" layer="1"/>
<wire x1="32.893" y1="8.8392" x2="35.433" y2="8.8392" width="1.016" layer="1"/>
<wire x1="9.669328125" y1="2.3843375" x2="10.59603125" y2="3.311040625" width="0.8128" layer="1"/>
<wire x1="10.59603125" y1="3.311040625" x2="15.963628125" y2="8.6786375" width="0.8128" layer="1"/>
<wire x1="15.963628125" y1="8.6786375" x2="15.963628125" y2="8.85318125" width="0.8128" layer="1"/>
<via x="15.963628125" y="8.85318125" extent="1-16" drill="0.6"/>
<wire x1="15.963628125" y1="8.85318125" x2="15.97814375" y2="8.838665625" width="0.8128" layer="16"/>
<wire x1="15.97814375" y1="8.838665625" x2="26.6926625" y2="8.838665625" width="0.8128" layer="16"/>
<via x="19.19906875" y="48.772025" extent="1-16" drill="0.6"/>
<wire x1="14.55115" y1="48.640534375" x2="14.74970625" y2="48.640534375" width="0.8128" layer="1"/>
<wire x1="14.74970625" y1="48.640534375" x2="19.067578125" y2="48.640534375" width="0.8128" layer="1"/>
<wire x1="19.067578125" y1="48.640534375" x2="19.19906875" y2="48.772025" width="0.8128" layer="1"/>
<contactref element="IC2" pad="12"/>
<contactref element="C3" pad="1"/>
<contactref element="U$19" pad="P$3"/>
<contactref element="U$20" pad="P$3"/>
<wire x1="98.682871875" y1="43.17000625" x2="98.682871875" y2="39.4863375" width="0.6096" layer="16"/>
<via x="83.69199375" y="46.6216125" extent="1-16" drill="0.6"/>
<wire x1="83.69199375" y1="46.6216125" x2="85.84240625" y2="48.772025" width="0.6096" layer="16"/>
<wire x1="85.84240625" y1="48.772025" x2="86.523253125" y2="48.772025" width="0.6096" layer="16"/>
<wire x1="63.023809375" y1="48.772025" x2="60.7468125" y2="48.772025" width="0.6096" layer="16"/>
<wire x1="38.785009375" y1="46.367353125" x2="41.18968125" y2="48.772025" width="0.6096" layer="16"/>
<contactref element="J6" pad="2"/>
<contactref element="J7" pad="2"/>
<wire x1="35.433" y1="8.8392" x2="35.62245" y2="8.876446875" width="0.6096" layer="1"/>
<wire x1="35.62245" y1="8.876446875" x2="37.973" y2="8.8392" width="0.6096" layer="1"/>
<wire x1="37.973" y1="8.8392" x2="38.802165625" y2="8.86024375" width="0.6096" layer="1"/>
<wire x1="38.802165625" y1="8.86024375" x2="40.513" y2="8.8392" width="0.6096" layer="1"/>
<wire x1="98.682871875" y1="39.4863375" x2="98.679159375" y2="39.4863375" width="0.6096" layer="16"/>
<wire x1="12.671359375" y1="50.594009375" x2="12.79623125" y2="50.594009375" width="0.6096" layer="1"/>
<wire x1="12.79623125" y1="50.594009375" x2="14.74970625" y2="48.640534375" width="0.6096" layer="1"/>
<wire x1="14.55115" y1="48.640534375" x2="14.412290625" y2="48.640534375" width="0.6096" layer="1"/>
<wire x1="14.412290625" y1="48.640534375" x2="10.44870625" y2="44.67695" width="0.6096" layer="1"/>
<wire x1="10.44870625" y1="44.67695" x2="10.44870625" y2="37.09125" width="0.6096" layer="1"/>
<wire x1="10.44870625" y1="37.09125" x2="10.44870625" y2="3.458365625" width="0.6096" layer="1"/>
<wire x1="10.44870625" y1="3.458365625" x2="10.59603125" y2="3.311040625" width="0.6096" layer="1"/>
<wire x1="12.78159375" y1="38.434" x2="11.85299375" y2="38.4955375" width="0.6096" layer="1"/>
<wire x1="11.85299375" y1="38.4955375" x2="10.44870625" y2="37.09125" width="0.6096" layer="1"/>
<wire x1="51.018246875" y1="38.434" x2="52.28058125" y2="38.434" width="0.6096" layer="1"/>
<wire x1="52.28058125" y1="38.434" x2="54.10778125" y2="40.2612" width="0.6096" layer="1"/>
<wire x1="57.01835625" y1="38.434" x2="55.93498125" y2="38.434" width="0.6096" layer="1"/>
<wire x1="55.93498125" y1="38.434" x2="54.10778125" y2="40.2612" width="0.6096" layer="1"/>
<wire x1="54.10778125" y1="40.2612" x2="54.10778125" y2="46.238475" width="0.6096" layer="1"/>
<via x="54.10778125" y="46.238475" extent="1-16" drill="0.6"/>
<wire x1="54.10778125" y1="46.238475" x2="54.10778125" y2="47.6625625" width="0.6096" layer="16"/>
<wire x1="54.10778125" y1="47.6625625" x2="55.21724375" y2="48.772025" width="0.6096" layer="16"/>
<wire x1="36.11876875" y1="44.9326" x2="36.12331875" y2="44.954140625" width="0.6096" layer="1"/>
<wire x1="36.12331875" y1="44.954140625" x2="38.47834375" y2="44.954140625" width="0.6096" layer="1"/>
<via x="38.47834375" y="44.954140625" extent="1-16" drill="0.6"/>
<wire x1="38.47834375" y1="44.954140625" x2="38.785009375" y2="45.26080625" width="0.6096" layer="16"/>
<wire x1="38.785009375" y1="45.26080625" x2="38.785009375" y2="46.367353125" width="0.6096" layer="16"/>
<wire x1="38.47834375" y1="44.798828125" x2="38.47834375" y2="44.954140625" width="0.4064" layer="16"/>
<wire x1="98.682871875" y1="39.4863375" x2="97.630534375" y2="38.434" width="0.6096" layer="16"/>
<wire x1="97.630534375" y1="38.434" x2="97.190734375" y2="38.434" width="0.6096" layer="16"/>
<contactref element="JP3" pad="1"/>
<contactref element="JP3" pad="2"/>
<wire x1="8.2561125" y1="2.5396875" x2="5.7161125" y2="2.5396875" width="0.6096" layer="1"/>
<contactref element="JP3" pad="3"/>
<wire x1="8.2561125" y1="2.5396875" x2="8.2561125" y2="5.0796875" width="0.6096" layer="1"/>
<wire x1="84.118046875" y1="31.2928" x2="84.108346875" y2="31.3025" width="0.6096" layer="1"/>
<wire x1="84.108346875" y1="31.3025" x2="85.855759375" y2="31.3025" width="0.6096" layer="1"/>
<wire x1="85.855759375" y1="31.3025" x2="86.076440625" y2="31.08181875" width="0.6096" layer="1"/>
<wire x1="86.588290625" y1="29.63019375" x2="86.588290625" y2="43.725315625" width="0.6096" layer="16"/>
<wire x1="86.588290625" y1="43.725315625" x2="83.69199375" y2="46.6216125" width="0.6096" layer="16"/>
<wire x1="86.076440625" y1="31.08181875" x2="86.076440625" y2="28.654240625" width="0.6096" layer="1"/>
<wire x1="86.076440625" y1="28.654240625" x2="86.044478125" y2="28.622278125" width="0.6096" layer="1"/>
<via x="86.044478125" y="28.622278125" extent="1-16" drill="0.6"/>
<wire x1="86.044478125" y1="28.622278125" x2="86.044478125" y2="29.08638125" width="0.6096" layer="16"/>
<wire x1="86.044478125" y1="29.08638125" x2="86.588290625" y2="29.63019375" width="0.6096" layer="16"/>
<wire x1="81.807696875" y1="44.9326" x2="82.00298125" y2="44.9326" width="0.6096" layer="1"/>
<wire x1="82.00298125" y1="44.9326" x2="83.69199375" y2="46.6216125" width="0.6096" layer="1"/>
<wire x1="38.441503125" y1="31.2928" x2="39.96165" y2="31.2928" width="0.4064" layer="1"/>
<wire x1="39.96165" y1="31.2928" x2="40.216125" y2="31.038325" width="0.4064" layer="1"/>
<wire x1="40.216125" y1="31.038325" x2="40.216125" y2="30.05045625" width="0.4064" layer="1"/>
<wire x1="40.216125" y1="30.05045625" x2="40.489784375" y2="29.776796875" width="0.4064" layer="1"/>
<via x="40.489784375" y="29.776796875" extent="1-16" drill="0.6"/>
<wire x1="40.489784375" y1="29.776796875" x2="40.489784375" y2="42.9427" width="0.4064" layer="16"/>
<wire x1="40.489784375" y1="42.9427" x2="38.47834375" y2="44.954140625" width="0.4064" layer="16"/>
<wire x1="26.6926625" y1="8.838665625" x2="27.813" y2="8.8392" width="0" layer="19" extent="16-16"/>
<wire x1="8.2561125" y1="2.5396875" x2="8.4106625" y2="2.3843375" width="0" layer="19" extent="1-1"/>
</signal>
<signal name="N$1">
</signal>
<signal name="12V">
<contactref element="IC1" pad="6"/>
<contactref element="C2" pad="1"/>
<contactref element="U$3" pad="C"/>
<contactref element="U$5" pad="C"/>
<contactref element="U$7" pad="C"/>
<contactref element="U$9" pad="C"/>
<polygon width="0.6096" layer="1">
<vertex x="10.49914375" y="52.97479375"/>
<vertex x="100.33" y="53.45108125"/>
<vertex x="98.658959375" y="4.49180625"/>
<vertex x="10.690259375" y="4.517415625"/>
</polygon>
<contactref element="J1" pad="1"/>
<contactref element="IC2" pad="6"/>
<contactref element="C4" pad="1"/>
<contactref element="U$2" pad="C"/>
<contactref element="U$13" pad="C"/>
<contactref element="U$15" pad="C"/>
<contactref element="U$17" pad="C"/>
<wire x1="27.9060125" y1="46.262490625" x2="27.9060125" y2="46.54134375" width="1.4224" layer="1"/>
<via x="27.9060125" y="46.54134375" extent="1-16" drill="0.6"/>
<wire x1="27.9060125" y1="46.54134375" x2="22.91230625" y2="41.5476375" width="1.4224" layer="16"/>
<wire x1="22.91230625" y1="41.5476375" x2="22.980278125" y2="26.604403125" width="1.4224" layer="16"/>
<via x="22.980278125" y="26.604403125" extent="1-16" drill="0.6"/>
<wire x1="22.980278125" y1="26.604403125" x2="24.581509375" y2="22.485165625" width="1.4224" layer="1"/>
<wire x1="24.581509375" y1="22.485165625" x2="25.84978125" y2="22.485165625" width="1.4224" layer="1"/>
<wire x1="75.0443625" y1="44.9326" x2="73.839953125" y2="44.9326" width="1.4224" layer="1"/>
<via x="71.9438125" y="46.615678125" extent="1-16" drill="0.6"/>
<wire x1="71.573590625" y1="46.266890625" x2="71.9019" y2="46.58003125" width="1.4224" layer="16"/>
<wire x1="71.9019" y1="46.58003125" x2="61.2339625" y2="35.91209375" width="1.4224" layer="16"/>
<wire x1="61.2339625" y1="35.91209375" x2="61.2339625" y2="26.726946875" width="1.4224" layer="16"/>
<via x="61.2339625" y="26.726946875" extent="1-16" drill="0.6"/>
<wire x1="61.2339625" y1="26.726946875" x2="62.343428125" y2="25.61748125" width="1.4224" layer="1"/>
<wire x1="62.343428125" y1="25.61748125" x2="62.343428125" y2="25.53149375" width="1.4224" layer="1"/>
<wire x1="88.302025" y1="45.053" x2="88.13766875" y2="31.6042" width="0" layer="19" extent="1-1"/>
</signal>
<signal name="ENA">
<contactref element="IC1" pad="8"/>
<contactref element="PWML" pad="7"/>
<wire x1="41.900321875" y1="24.875440625" x2="41.936859375" y2="24.838903125" width="0.6096" layer="1"/>
<wire x1="41.936859375" y1="24.838903125" x2="53.975" y2="12.8007625" width="0.6096" layer="1"/>
<wire x1="53.975" y1="12.8007625" x2="53.975" y2="2.54" width="0.6096" layer="1"/>
<wire x1="25.441503125" y1="32.5628" x2="27.10735" y2="32.5582625" width="0.4064" layer="1"/>
<wire x1="27.10735" y1="32.5582625" x2="28.691040625" y2="30.974571875" width="0.4064" layer="1"/>
<wire x1="28.691040625" y1="30.974571875" x2="28.691040625" y2="27.453525" width="0.4064" layer="1"/>
<wire x1="28.691040625" y1="27.453525" x2="30.219809375" y2="25.92475625" width="0.4064" layer="1"/>
<wire x1="30.219809375" y1="25.92475625" x2="31.3056625" y2="24.838903125" width="0.6096" layer="1"/>
<wire x1="31.3056625" y1="24.838903125" x2="41.936859375" y2="24.838903125" width="0.6096" layer="1"/>
</signal>
<signal name="IN1">
<contactref element="IC1" pad="7"/>
<wire x1="25.441503125" y1="33.8328" x2="27.188428125" y2="33.8282625" width="0.4064" layer="1"/>
<wire x1="27.188428125" y1="33.8282625" x2="29.757621875" y2="31.25906875" width="0.4064" layer="1"/>
<wire x1="29.757621875" y1="31.25906875" x2="29.757621875" y2="27.773725" width="0.4064" layer="1"/>
<wire x1="29.757621875" y1="27.773725" x2="30.7531" y2="26.778246875" width="0.4064" layer="1"/>
<contactref element="PWMH" pad="2"/>
<wire x1="42.1951625" y1="25.89143125" x2="55.04255625" y2="13.0440375" width="0.6096" layer="1"/>
<wire x1="55.04255625" y1="13.0440375" x2="55.1026875" y2="13.0440375" width="0.6096" layer="1"/>
<via x="55.1026875" y="13.0440375" extent="1-16" drill="0.6"/>
<wire x1="55.1026875" y1="13.0440375" x2="58.41285625" y2="9.73386875" width="0.6096" layer="16"/>
<wire x1="58.41285625" y1="9.73386875" x2="58.476990625" y2="9.73386875" width="0.6096" layer="16"/>
<via x="58.476990625" y="9.73386875" extent="1-16" drill="0.6"/>
<wire x1="58.476990625" y1="9.73386875" x2="62.865" y2="5.345859375" width="0.6096" layer="1"/>
<wire x1="62.865" y1="5.345859375" x2="62.865" y2="2.54" width="0.6096" layer="1"/>
<wire x1="30.7531" y1="26.778246875" x2="31.639915625" y2="25.89143125" width="0.6096" layer="1"/>
<wire x1="31.639915625" y1="25.89143125" x2="42.1951625" y2="25.89143125" width="0.6096" layer="1"/>
</signal>
<signal name="IN2">
<contactref element="IC1" pad="9"/>
<wire x1="25.441503125" y1="31.2928" x2="26.741834375" y2="31.2882625" width="0.4064" layer="1"/>
<wire x1="26.741834375" y1="31.2882625" x2="27.41114375" y2="30.618953125" width="0.4064" layer="1"/>
<wire x1="27.41114375" y1="30.618953125" x2="27.41114375" y2="26.848678125" width="0.4064" layer="1"/>
<wire x1="27.41114375" y1="26.848678125" x2="30.04204375" y2="24.217778125" width="0.4064" layer="1"/>
<contactref element="PWMH" pad="1"/>
<wire x1="60.325" y1="2.54" x2="60.325" y2="5.15504375" width="0.6096" layer="1"/>
<wire x1="60.325" y1="5.15504375" x2="57.88039375" y2="7.59965" width="0.6096" layer="1"/>
<via x="57.88039375" y="7.59965" extent="1-16" drill="0.6"/>
<wire x1="57.88039375" y1="7.59965" x2="57.26431875" y2="7.59965" width="0.6096" layer="16"/>
<wire x1="57.26431875" y1="7.59965" x2="52.33021875" y2="12.53375" width="0.6096" layer="16"/>
<via x="52.33021875" y="12.53375" extent="1-16" drill="0.6"/>
<wire x1="52.33021875" y1="12.53375" x2="41.27103125" y2="23.5929375" width="0.6096" layer="1"/>
<wire x1="30.04204375" y1="24.217778125" x2="30.666884375" y2="23.5929375" width="0.6096" layer="1"/>
<wire x1="30.666884375" y1="23.5929375" x2="41.27103125" y2="23.5929375" width="0.6096" layer="1"/>
</signal>
<signal name="ENB">
<contactref element="IC1" pad="14"/>
<contactref element="PWML" pad="8"/>
<wire x1="56.515" y1="14.728834375" x2="56.515" y2="14.70826875" width="0.6096" layer="1"/>
<wire x1="56.515" y1="14.2002125" x2="56.515" y2="2.54" width="0.6096" layer="1"/>
<wire x1="38.441503125" y1="33.8328" x2="36.508528125" y2="33.8328" width="0.4064" layer="1"/>
<wire x1="36.508528125" y1="33.8328" x2="36.168365625" y2="33.4926375" width="0.4064" layer="1"/>
<wire x1="36.168365625" y1="33.4926375" x2="36.168365625" y2="28.5221" width="0.4064" layer="1"/>
<wire x1="36.168365625" y1="28.5221" x2="36.939421875" y2="27.75104375" width="0.4064" layer="1"/>
<wire x1="36.939421875" y1="27.75104375" x2="40.10933125" y2="27.75104375" width="0.4064" layer="1"/>
<wire x1="40.10933125" y1="27.75104375" x2="43.472225" y2="27.75104375" width="0.6096" layer="1"/>
<wire x1="43.472225" y1="27.75104375" x2="56.515" y2="14.70826875" width="0.6096" layer="1"/>
<wire x1="56.515" y1="14.70826875" x2="56.515" y2="14.2002125" width="0.6096" layer="1"/>
</signal>
<signal name="IN3">
<contactref element="IC1" pad="13"/>
<contactref element="PWMH" pad="4"/>
<wire x1="44.000015625" y1="28.652984375" x2="67.945" y2="4.708" width="0.6096" layer="1"/>
<wire x1="67.945" y1="4.708" x2="67.945" y2="2.54" width="0.6096" layer="1"/>
<wire x1="39.849790625" y1="28.652984375" x2="39.8703625" y2="28.67355625" width="0.4064" layer="1"/>
<wire x1="44.000015625" y1="28.652984375" x2="39.849790625" y2="28.652984375" width="0.6096" layer="1"/>
<wire x1="38.441503125" y1="32.5628" x2="38.388615625" y2="32.6156875" width="0.4064" layer="1"/>
<wire x1="38.388615625" y1="32.6156875" x2="36.827240625" y2="32.6156875" width="0.4064" layer="1"/>
<wire x1="36.827240625" y1="32.6156875" x2="36.827240625" y2="28.94788125" width="0.4064" layer="1"/>
<wire x1="36.827240625" y1="28.94788125" x2="37.15284375" y2="28.622278125" width="0.4064" layer="1"/>
<wire x1="37.15284375" y1="28.622278125" x2="39.819084375" y2="28.622278125" width="0.4064" layer="1"/>
<wire x1="39.819084375" y1="28.622278125" x2="39.849790625" y2="28.652984375" width="0.4064" layer="1"/>
</signal>
<signal name="IN4">
<contactref element="IC1" pad="15"/>
<wire x1="39.89013125" y1="26.99161875" x2="39.961253125" y2="26.920496875" width="0.4064" layer="1"/>
<contactref element="PWMH" pad="3"/>
<via x="58.1884" y="11.685771875" extent="1-16" drill="0.6"/>
<wire x1="58.1884" y1="11.685771875" x2="58.112296875" y2="11.685771875" width="0.6096" layer="16"/>
<wire x1="58.112296875" y1="11.685771875" x2="53.94464375" y2="15.853425" width="0.6096" layer="16"/>
<via x="53.94464375" y="15.853425" extent="1-16" drill="0.6"/>
<wire x1="53.94464375" y1="15.853425" x2="53.85401875" y2="15.853425" width="0.6096" layer="1"/>
<wire x1="53.85401875" y1="15.853425" x2="42.800146875" y2="26.907296875" width="0.6096" layer="1"/>
<wire x1="58.1884" y1="11.685771875" x2="65.405" y2="4.469171875" width="0.6096" layer="1"/>
<wire x1="65.405" y1="4.469171875" x2="65.405" y2="2.54" width="0.6096" layer="1"/>
<wire x1="39.961253125" y1="26.920496875" x2="39.974453125" y2="26.907296875" width="0.6096" layer="1"/>
<wire x1="39.974453125" y1="26.907296875" x2="42.800146875" y2="26.907296875" width="0.6096" layer="1"/>
<wire x1="38.441503125" y1="35.1028" x2="36.28044375" y2="35.1028" width="0.4064" layer="1"/>
<wire x1="36.28044375" y1="35.1028" x2="35.467209375" y2="34.289565625" width="0.4064" layer="1"/>
<wire x1="35.467209375" y1="34.289565625" x2="35.467209375" y2="27.747478125" width="0.4064" layer="1"/>
<wire x1="35.467209375" y1="27.747478125" x2="36.257015625" y2="26.957671875" width="0.4064" layer="1"/>
<wire x1="36.257015625" y1="26.957671875" x2="39.856184375" y2="26.957671875" width="0.4064" layer="1"/>
<wire x1="39.856184375" y1="26.957671875" x2="39.89013125" y2="26.99161875" width="0.4064" layer="1"/>
</signal>
<signal name="N$2">
<contactref element="USB" pad="A"/>
<contactref element="R1" pad="1"/>
<wire x1="8.555590625" y1="50.53169375" x2="10.70904375" y2="50.53169375" width="0.6096" layer="1"/>
<wire x1="10.70904375" y1="50.53169375" x2="10.771359375" y2="50.594009375" width="0.6096" layer="1"/>
</signal>
<signal name="M1+">
<contactref element="IC1" pad="4"/>
<contactref element="U$4" pad="C"/>
<contactref element="U$3" pad="A"/>
<contactref element="U$1" pad="P$1"/>
<wire x1="21.75345" y1="41.053" x2="21.69879375" y2="41.050053125" width="1.4224" layer="1"/>
<wire x1="21.69879375" y1="41.050053125" x2="17.799103125" y2="41.053" width="1.4224" layer="1"/>
<wire x1="17.799103125" y1="41.053" x2="15.35361875" y2="43.4955375" width="1.4224" layer="1"/>
<wire x1="15.35361875" y1="43.4955375" x2="12.78159375" y2="43.434" width="1.4224" layer="1"/>
<wire x1="21.75345" y1="41.053" x2="23.215921875" y2="39.6422375" width="1.4224" layer="1"/>
<wire x1="23.215921875" y1="39.6422375" x2="23.215921875" y2="38.48509375" width="1.4224" layer="1"/>
<wire x1="23.215921875" y1="38.48509375" x2="23.215921875" y2="38.3003625" width="1.4224" layer="1"/>
<wire x1="25.441503125" y1="37.6428" x2="24.062753125" y2="37.6382625" width="0.6096" layer="1"/>
<wire x1="24.062753125" y1="37.6382625" x2="23.215921875" y2="38.48509375" width="0.6096" layer="1"/>
</signal>
<signal name="M1-">
<contactref element="IC1" pad="5"/>
<contactref element="U$6" pad="C"/>
<contactref element="U$5" pad="A"/>
<contactref element="U$1" pad="P$2"/>
<wire x1="12.78159375" y1="40.934" x2="12.875509375" y2="40.901621875" width="1.4224" layer="1"/>
<wire x1="12.875509375" y1="40.901621875" x2="13.996334375" y2="40.901621875" width="1.4224" layer="1"/>
<wire x1="21.696659375" y1="36.333278125" x2="23.170759375" y2="36.333278125" width="1.4224" layer="1"/>
<wire x1="25.441503125" y1="36.3728" x2="25.40651875" y2="36.333278125" width="0.6096" layer="1"/>
<wire x1="25.40651875" y1="36.333278125" x2="23.170759375" y2="36.333278125" width="0.6096" layer="1"/>
<wire x1="21.696659375" y1="36.333278125" x2="21.696659375" y2="35.6042" width="1.4224" layer="1"/>
<wire x1="17.711265625" y1="35.642309375" x2="17.711265625" y2="35.6042" width="1.4224" layer="1"/>
<wire x1="17.711265625" y1="35.6042" x2="17.711265625" y2="37.186690625" width="1.4224" layer="1"/>
<wire x1="17.711265625" y1="37.186690625" x2="13.996334375" y2="40.901621875" width="1.4224" layer="1"/>
<wire x1="21.696659375" y1="35.6042" x2="17.711265625" y2="35.6042" width="1.4224" layer="1"/>
</signal>
<signal name="M2+">
<contactref element="IC1" pad="16"/>
<contactref element="U$8" pad="C"/>
<contactref element="U$7" pad="A"/>
<contactref element="U$12" pad="P$2"/>
<wire x1="38.441503125" y1="36.3728" x2="40.503178125" y2="36.3682625" width="0.6096" layer="1"/>
<wire x1="40.503178125" y1="36.3682625" x2="40.5381625" y2="36.333278125" width="0.6096" layer="1"/>
<wire x1="41.910378125" y1="35.6042" x2="41.01875625" y2="35.90633125" width="1.4224" layer="1"/>
<wire x1="41.01875625" y1="35.90633125" x2="40.8795375" y2="35.90633125" width="1.4224" layer="1"/>
<wire x1="46.04288125" y1="35.6042" x2="46.04288125" y2="37.061228125" width="1.4224" layer="1"/>
<wire x1="46.04288125" y1="37.061228125" x2="49.883275" y2="40.901621875" width="1.4224" layer="1"/>
<wire x1="49.883275" y1="40.901621875" x2="50.98586875" y2="40.901621875" width="1.4224" layer="1"/>
<wire x1="50.98586875" y1="40.901621875" x2="51.018246875" y2="40.934" width="1.4224" layer="1"/>
<wire x1="40.5381625" y1="36.333278125" x2="40.5381625" y2="36.24770625" width="0.6096" layer="1"/>
<wire x1="40.5381625" y1="36.24770625" x2="40.8795375" y2="35.90633125" width="0.6096" layer="1"/>
<wire x1="41.910378125" y1="35.6042" x2="46.04288125" y2="35.6042" width="1.4224" layer="1"/>
</signal>
<signal name="M2-">
<contactref element="IC1" pad="17"/>
<contactref element="U$10" pad="C"/>
<contactref element="U$9" pad="A"/>
<contactref element="U$12" pad="P$1"/>
<wire x1="38.441503125" y1="37.6428" x2="38.46564375" y2="37.614121875" width="0.6096" layer="1" curve="90"/>
<wire x1="38.46564375" y1="37.614121875" x2="40.45281875" y2="37.614121875" width="0.6096" layer="1"/>
<wire x1="41.967846875" y1="41.053" x2="45.858428125" y2="41.0981" width="1.4224" layer="1"/>
<wire x1="45.858428125" y1="41.0981" x2="45.93135625" y2="41.053" width="1.4224" layer="1"/>
<wire x1="45.93135625" y1="41.053" x2="45.960815625" y2="41.2004875" width="1.4224" layer="1"/>
<wire x1="45.960815625" y1="41.2004875" x2="47.408315625" y2="41.2004875" width="1.4224" layer="1"/>
<wire x1="47.408315625" y1="41.2004875" x2="49.641828125" y2="43.434" width="1.4224" layer="1"/>
<wire x1="49.641828125" y1="43.434" x2="51.018246875" y2="43.434" width="1.4224" layer="1"/>
<wire x1="41.967846875" y1="41.053" x2="40.922209375" y2="40.0524625" width="1.4224" layer="1"/>
<wire x1="40.922209375" y1="40.0524625" x2="40.922209375" y2="37.998375" width="1.4224" layer="1"/>
<wire x1="40.922209375" y1="37.998375" x2="40.837071875" y2="37.998375" width="0.6096" layer="1"/>
<wire x1="40.837071875" y1="37.998375" x2="40.45281875" y2="37.614121875" width="0.6096" layer="1"/>
</signal>
<signal name="AUX3">
<contactref element="J3" pad="3"/>
<contactref element="COMMUNICATION" pad="6"/>
<wire x1="28.575" y1="2.54" x2="28.575" y2="4.2672" width="0.6096" layer="1"/>
<wire x1="28.575" y1="4.2672" x2="30.607" y2="6.2992" width="0.6096" layer="1"/>
</signal>
<signal name="AUX1">
<contactref element="J2" pad="3"/>
<contactref element="COMMUNICATION" pad="8"/>
<wire x1="33.655" y1="2.54" x2="33.655" y2="4.2672" width="0.6096" layer="1"/>
<wire x1="33.655" y1="4.2672" x2="35.687" y2="6.2992" width="0.6096" layer="1"/>
</signal>
<signal name="AUX2">
<contactref element="J5" pad="3"/>
<contactref element="COMMUNICATION" pad="7"/>
<wire x1="31.115" y1="2.54" x2="31.115" y2="4.2672" width="0.6096" layer="1"/>
<wire x1="31.115" y1="4.2672" x2="33.147" y2="6.2992" width="0.6096" layer="1"/>
</signal>
<signal name="AUX4">
<contactref element="J4" pad="3"/>
<contactref element="COMMUNICATION" pad="5"/>
<wire x1="26.035" y1="2.54" x2="26.035" y2="4.2672" width="0.6096" layer="1"/>
<wire x1="26.035" y1="4.2672" x2="28.067" y2="6.2992" width="0.6096" layer="1"/>
</signal>
<signal name="M3+">
<contactref element="U$11" pad="C"/>
<contactref element="U$2" pad="A"/>
<contactref element="IC2" pad="4"/>
<contactref element="U$20" pad="P$1"/>
<wire x1="57.071778125" y1="43.380578125" x2="57.01835625" y2="43.434" width="1.4224" layer="1"/>
<wire x1="57.071778125" y1="43.380578125" x2="61.25469375" y2="43.380578125" width="1.4224" layer="1"/>
<wire x1="61.25469375" y1="43.380578125" x2="63.582271875" y2="41.053" width="1.4224" layer="1"/>
<wire x1="63.582271875" y1="41.053" x2="67.563171875" y2="41.053" width="1.4224" layer="1"/>
<wire x1="67.563171875" y1="41.053" x2="67.563171875" y2="39.88730625" width="1.4224" layer="1"/>
<wire x1="67.563171875" y1="39.88730625" x2="68.83005625" y2="38.620421875" width="1.4224" layer="1"/>
<wire x1="68.83005625" y1="38.620421875" x2="69.807678125" y2="37.6428" width="0.6096" layer="1"/>
<wire x1="69.807678125" y1="37.6428" x2="71.118046875" y2="37.6428" width="0.6096" layer="1"/>
</signal>
<signal name="M3-">
<contactref element="U$14" pad="C"/>
<contactref element="U$13" pad="A"/>
<contactref element="IC2" pad="5"/>
<contactref element="U$20" pad="P$2"/>
<wire x1="57.01835625" y1="40.934" x2="57.17881875" y2="40.7735375" width="1.4224" layer="1"/>
<wire x1="57.17881875" y1="40.7735375" x2="58.37495625" y2="40.7735375" width="1.4224" layer="1"/>
<wire x1="58.37495625" y1="40.7735375" x2="60.380528125" y2="38.767965625" width="1.4224" layer="1"/>
<wire x1="60.380528125" y1="38.767965625" x2="60.380528125" y2="36.333278125" width="1.4224" layer="1"/>
<wire x1="60.380528125" y1="36.333278125" x2="61.10960625" y2="35.6042" width="1.4224" layer="1"/>
<wire x1="61.10960625" y1="35.6042" x2="63.341021875" y2="35.6042" width="1.4224" layer="1"/>
<wire x1="63.341021875" y1="35.6042" x2="67.28469375" y2="35.6042" width="1.4224" layer="1"/>
<wire x1="67.28469375" y1="35.6042" x2="67.990646875" y2="36.310153125" width="1.4224" layer="1"/>
<wire x1="67.990646875" y1="36.310153125" x2="68.953209375" y2="36.310153125" width="1.4224" layer="1"/>
<wire x1="68.953209375" y1="36.310153125" x2="69.01585625" y2="36.3728" width="0.6096" layer="1"/>
<wire x1="69.01585625" y1="36.3728" x2="71.118046875" y2="36.3728" width="0.6096" layer="1"/>
</signal>
<signal name="M4+">
<contactref element="U$16" pad="C"/>
<contactref element="U$15" pad="A"/>
<contactref element="IC2" pad="16"/>
<contactref element="U$19" pad="P$2"/>
<wire x1="97.190734375" y1="40.934" x2="97.1156625" y2="40.858928125" width="1.4224" layer="1"/>
<wire x1="97.1156625" y1="40.858928125" x2="96.182125" y2="40.858928125" width="1.4224" layer="1"/>
<wire x1="96.182125" y1="40.858928125" x2="92.838628125" y2="37.51543125" width="1.4224" layer="1"/>
<wire x1="92.838628125" y1="37.51543125" x2="92.127721875" y2="35.6042" width="1.4224" layer="1"/>
<wire x1="92.127721875" y1="35.6042" x2="88.13766875" y2="35.6042" width="1.4224" layer="1"/>
<wire x1="88.13766875" y1="35.6042" x2="88.235" y2="36.2644875" width="1.4224" layer="1"/>
<wire x1="88.235" y1="36.2644875" x2="86.321434375" y2="36.2644875" width="1.4224" layer="1"/>
<wire x1="86.321434375" y1="36.2644875" x2="86.213121875" y2="36.3728" width="0.6096" layer="1"/>
<wire x1="86.213121875" y1="36.3728" x2="84.118046875" y2="36.3728" width="0.6096" layer="1"/>
</signal>
<signal name="M4-">
<contactref element="U$18" pad="C"/>
<contactref element="U$17" pad="A"/>
<contactref element="IC2" pad="17"/>
<contactref element="U$19" pad="P$1"/>
<wire x1="88.302025" y1="41.053" x2="88.661234375" y2="40.94114375" width="1.4224" layer="1"/>
<wire x1="88.661234375" y1="40.94114375" x2="92.249690625" y2="41.053" width="1.4224" layer="1"/>
<wire x1="92.249690625" y1="41.053" x2="95.13354375" y2="43.434" width="1.4224" layer="1"/>
<wire x1="95.13354375" y1="43.434" x2="97.190734375" y2="43.434" width="1.4224" layer="1"/>
<wire x1="88.302025" y1="41.053" x2="88.583840625" y2="40.0821375" width="1.4224" layer="1"/>
<wire x1="88.583840625" y1="40.0821375" x2="86.29675625" y2="37.795053125" width="1.4224" layer="1"/>
<wire x1="86.29675625" y1="37.795053125" x2="86.144503125" y2="37.6428" width="0.6096" layer="1"/>
<wire x1="86.144503125" y1="37.6428" x2="84.118046875" y2="37.6428" width="0.6096" layer="1"/>
</signal>
<signal name="ENC">
<contactref element="IC2" pad="8"/>
<contactref element="PWML" pad="6"/>
<wire x1="51.435" y1="2.54" x2="51.435" y2="4.71224375" width="0.6096" layer="16"/>
<wire x1="74.616059375" y1="30.340215625" x2="72.393475" y2="32.5628" width="0.6096" layer="1"/>
<wire x1="72.393475" y1="32.5628" x2="71.118046875" y2="32.5628" width="0.6096" layer="1"/>
<wire x1="51.435" y1="4.71224375" x2="51.931521875" y2="5.208765625" width="0.6096" layer="16"/>
<wire x1="51.931521875" y1="5.208765625" x2="72.370159375" y2="5.208765625" width="0.6096" layer="16"/>
<wire x1="72.370159375" y1="5.208765625" x2="74.46220625" y2="7.3008125" width="0.6096" layer="16"/>
<via x="74.46220625" y="7.3008125" extent="1-16" drill="0.6"/>
<wire x1="74.46220625" y1="7.3008125" x2="74.46220625" y2="30.1863625" width="0.6096" layer="1"/>
<wire x1="74.46220625" y1="30.1863625" x2="74.616059375" y2="30.340215625" width="0.6096" layer="1"/>
</signal>
<signal name="END">
<contactref element="IC2" pad="14"/>
<contactref element="PWML" pad="5"/>
<wire x1="48.895" y1="2.54" x2="48.895" y2="4.13579375" width="0.6096" layer="16"/>
<wire x1="48.895" y1="4.13579375" x2="51.163428125" y2="6.404221875" width="0.6096" layer="16"/>
<wire x1="51.163428125" y1="6.404221875" x2="71.68568125" y2="6.404221875" width="0.6096" layer="16"/>
<wire x1="71.68568125" y1="6.404221875" x2="76.9798375" y2="11.698378125" width="0.6096" layer="16"/>
<via x="76.9798375" y="11.698378125" extent="1-16" drill="0.6"/>
<wire x1="76.9798375" y1="11.698378125" x2="76.9798375" y2="22.04509375" width="0.6096" layer="1"/>
<wire x1="84.118046875" y1="33.8328" x2="82.650753125" y2="33.8328" width="0.4064" layer="1"/>
<wire x1="82.650753125" y1="33.8328" x2="81.819565625" y2="33.0016125" width="0.4064" layer="1"/>
<wire x1="81.819565625" y1="33.0016125" x2="81.819565625" y2="26.884821875" width="0.4064" layer="1"/>
<wire x1="81.819565625" y1="26.884821875" x2="81.60630625" y2="26.6715625" width="0.4064" layer="1"/>
<wire x1="76.9798375" y1="22.04509375" x2="81.60630625" y2="26.6715625" width="0.6096" layer="1"/>
</signal>
<signal name="IN5">
<contactref element="IC2" pad="7"/>
<contactref element="PWMH" pad="5"/>
<wire x1="70.485" y1="2.54" x2="70.485" y2="27.021421875" width="0.6096" layer="1"/>
<wire x1="70.485" y1="27.021421875" x2="


text:
69.467121875" y2="28.0393" width="0.6096" layer="1"/>
<wire x1="69.467121875" y1="28.0393" x2="69.467121875" y2="32.744984375" width="0.6096" layer="1"/>
<wire x1="69.467121875" y1="32.744984375" x2="69.456734375" y2="32.755371875" width="0.6096" layer="1"/>
<wire x1="69.456734375" y1="32.755371875" x2="69.456734375" y2="33.494265625" width="0.6096" layer="1"/>
<wire x1="69.456734375" y1="33.494265625" x2="69.79526875" y2="33.8328" width="0.6096" layer="1"/>
<wire x1="69.79526875" y1="33.8328" x2="71.118046875" y2="33.8328" width="0.6096" layer="1"/>
</signal>
<signal name="IN6">
<contactref element="IC2" pad="9"/>
<contactref element="PWMH" pad="6"/>
<wire x1="73.289790625" y1="29.96680625" x2="73.289790625" y2="2.804790625" width="0.6096" layer="1"/>
<wire x1="73.289790625" y1="2.804790625" x2="73.025" y2="2.54" width="0.6096" layer="1"/>
<wire x1="73.289790625" y1="29.96680625" x2="71.963796875" y2="31.2928" width="0.6096" layer="1"/>
<wire x1="71.963796875" y1="31.2928" x2="71.118046875" y2="31.2928" width="0.6096" layer="1"/>
</signal>
<signal name="IN7">
<contactref element="IC2" pad="13"/>
<contactref element="PWMH" pad="8"/>
<wire x1="78.105" y1="17.774546875" x2="78.105" y2="2.54" width="0.6096" layer="1"/>
<wire x1="78.079246875" y1="17.8003" x2="78.105" y2="17.774546875" width="0.6096" layer="1"/>
<wire x1="84.118046875" y1="32.5628" x2="82.54250625" y2="32.5628" width="0.4064" layer="1"/>
<wire x1="82.494878125" y1="27.809046875" x2="83.418990625" y2="26.884934375" width="0.4064" layer="1"/>
<wire x1="78.079246875" y1="17.8003" x2="78.079246875" y2="21.545190625" width="0.6096" layer="1"/>
<wire x1="78.079246875" y1="21.545190625" x2="83.418990625" y2="26.884934375" width="0.6096" layer="1"/>
<wire x1="82.494878125" y1="27.809046875" x2="82.494878125" y2="32.515171875" width="0.4064" layer="1"/>
<wire x1="82.494878125" y1="32.515171875" x2="82.54250625" y2="32.5628" width="0.4064" layer="1"/>
</signal>
<signal name="IN8">
<contactref element="IC2" pad="15"/>
<contactref element="PWMH" pad="7"/>
<wire x1="75.565" y1="21.980903125" x2="75.565" y2="2.54" width="0.6096" layer="1"/>
<wire x1="84.118046875" y1="35.1028" x2="82.961040625" y2="35.1028" width="0.4064" layer="1"/>
<wire x1="82.961040625" y1="35.1028" x2="80.9665375" y2="33.108296875" width="0.4064" layer="1"/>
<wire x1="80.9665375" y1="33.108296875" x2="80.9665375" y2="27.382440625" width="0.4064" layer="1"/>
<wire x1="80.9665375" y1="27.382440625" x2="80.291221875" y2="26.707125" width="0.4064" layer="1"/>
<wire x1="75.565" y1="21.980903125" x2="80.291221875" y2="26.707125" width="0.6096" layer="1"/>
</signal>
<signal name="INCD2">
<contactref element="U$19" pad="P$5"/>
<contactref element="COMMUNICATION1" pad="8"/>
<wire x1="51.435" y1="50.8" x2="52.49533125" y2="50.8" width="0.6096" layer="1"/>
<wire x1="52.49533125" y1="50.8" x2="53.633825" y2="51.93849375" width="0.6096" layer="1"/>
<wire x1="53.633825" y1="51.93849375" x2="95.675678125" y2="51.93849375" width="0.6096" layer="1"/>
<wire x1="95.675678125" y1="51.93849375" x2="95.675678125" y2="46.032384375" width="0.6096" layer="1"/>
<via x="95.675678125" y="46.032384375" extent="1-16" drill="0.6"/>
<wire x1="95.675678125" y1="46.032384375" x2="95.646059375" y2="46.032384375" width="0.6096" layer="16"/>
<wire x1="95.646059375" y1="46.032384375" x2="95.646059375" y2="34.442775" width="0.6096" layer="16"/>
<wire x1="95.646059375" y1="34.442775" x2="96.654834375" y2="33.434" width="0.6096" layer="16"/>
<wire x1="96.654834375" y1="33.434" x2="97.190734375" y2="33.434" width="0.6096" layer="16"/>
</signal>
<signal name="INCD1">
<contactref element="U$19" pad="P$6"/>
<contactref element="COMMUNICATION1" pad="7"/>
<wire x1="48.895" y1="50.8" x2="48.895" y2="49.4105125" width="0.6096" layer="1"/>
<wire x1="48.895" y1="49.4105125" x2="48.84864375" y2="49.4105125" width="0.6096" layer="1"/>
<wire x1="48.84864375" y1="49.4105125" x2="49.925015625" y2="48.334140625" width="0.6096" layer="1"/>
<wire x1="49.925015625" y1="48.334140625" x2="51.46005" y2="48.334140625" width="0.6096" layer="1"/>
<wire x1="51.46005" y1="48.334140625" x2="51.462103125" y2="48.33619375" width="0.6096" layer="1"/>
<wire x1="51.462103125" y1="48.33619375" x2="52.34930625" y2="48.33619375" width="0.6096" layer="1"/>
<wire x1="52.34930625" y1="48.33619375" x2="54.3982875" y2="50.385175" width="0.6096" layer="1"/>
<wire x1="54.3982875" y1="50.385175" x2="94.116009375" y2="50.385175" width="0.6096" layer="1"/>
<wire x1="94.116009375" y1="50.385175" x2="94.116009375" y2="47.220453125" width="0.6096" layer="1"/>
<via x="94.116009375" y="47.220453125" extent="1-16" drill="0.6"/>
<wire x1="94.116009375" y1="47.220453125" x2="94.542646875" y2="46.793815625" width="0.6096" layer="16"/>
<wire x1="94.542646875" y1="46.793815625" x2="94.542646875" y2="32.448053125" width="0.6096" layer="16"/>
<wire x1="94.542646875" y1="32.448053125" x2="96.0567" y2="30.934" width="0.6096" layer="16"/>
<wire x1="96.0567" y1="30.934" x2="97.190734375" y2="30.934" width="0.6096" layer="16"/>
</signal>
<signal name="AUX5">
<contactref element="PWML" pad="1"/>
<contactref element="J6" pad="3"/>
<wire x1="38.735" y1="2.54" x2="38.735" y2="5.7912" width="0.6096" layer="1"/>
<wire x1="38.735" y1="5.7912" x2="38.227" y2="6.2992" width="0.6096" layer="1"/>
</signal>
<signal name="AUX6">
<contactref element="PWML" pad="2"/>
<contactref element="J7" pad="3"/>
<wire x1="41.275" y1="2.54" x2="41.275" y2="5.7912" width="0.6096" layer="1"/>
<wire x1="41.275" y1="5.7912" x2="40.767" y2="6.2992" width="0.6096" layer="1"/>
</signal>
</signals>
<errors>
<approved hash="4,1,f80894f3ca52c5ad"/>
<approved hash="4,1,cdfdf1f871a5cc58"/>
<approved hash="4,1,2af2c60c64a87755"/>
<approved hash="4,1,8fe92b102bbc6e43"/>
<approved hash="4,1,94de3024d6801178"/>
<approved hash="4,1,c6c7e23e409fc362"/>
<approved hash="4,1,2bbcc74a07e24a1f"/>
<approved hash="4,1,b0a32c5e22f67d05"/>
<approved hash="4,1,85984962a9fa2402"/>
<approved hash="4,1,e28c9e77dcd6af29"/>
<approved hash="4,1,c781e37c43d9c624"/>
<approved hash="4,1,2d76c9800f2c48d1"/>
<approved hash="4,1,b06d5494343071cf"/>
<approved hash="4,1,51d5cd2f0c895176"/>
<approved hash="4,1,b4c850333591766c"/>
<approved hash="4,1,9bbebf3bbee53b19"/>
<approved hash="4,1,e6b5824ca7e9a014"/>
<approved hash="4,1,4daae95168fcad03"/>
<approved hash="4,1,509fcc6501c35238"/>
<approved hash="4,1,a7926b690acb0736"/>
<approved hash="4,1,8278be81b3df0c23"/>
<approved hash="4,16,2128c5d6656e6093"/>
<approved hash="4,16,8e2f2ada28726b89"/>
<approved hash="4,16,93140feecf4612b6"/>
<approved hash="4,16,f80894f3ca52c5ad"/>
<approved hash="4,16,cdfdf1f871a5cc58"/>
<approved hash="4,16,2af2c60c64a87755"/>
<approved hash="4,16,8fe92b102bbc6e43"/>
</errors>
</board>
</drawing>
</eagle>

license: Unlicense

license_type: permissive

branch_name: refs/heads/master

extension: brd


text:
require xorg-lib-common.inc

#DESCRIPTION = ""

DEPENDS += " virtual/libx11 libxp libxt printproto libxau"

XORG_PN = "libXprintUtil"

license: MIT

extension: bb


text:
package qlang

import (
	_ "github.com/xushiwei/qlang/cl"
	_ "github.com/xushiwei/qlang/lib/qlang.all"
)

repository: dxxfire/qlang

repo_name: dxxfire/qlang

branch_name: refs/heads/main

extension: go


text:
// Copyright (c) 2018 Yamagishi Kazutoshi <ykzts@desire.sh>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

package manael // import "manael.org/x/manael"

import (
	"crypto/sha256"
	"fmt"
	"io/ioutil"
	"net/http"
	"net/http/httptest"
	"testing"
	"time"
)

var requestTests = []struct {
	path       string
	statusCode int
}{
	{
		"/logo.png",
		http.StatusOK,
	},
	{
		"/404.png",
		http.StatusNotFound,
	},
}

func TestRequest(t *testing.T) {
	mux := http.NewServeMux()
	mux.HandleFunc("/logo.png", func(w http.ResponseWriter, r *http.Request) {
		w.WriteHeader(http.StatusOK)
	})

	ts := httptest.NewServer(mux)
	defer ts.Close()

	for _, tc := range requestTests {
		req := httptest.NewRequest(http.MethodGet, tc.path, nil)

		resp, err := request(fmt.Sprintf("%s%s", ts.URL, tc.path), req)
		if err != nil {
			t.Fatal(err)
		}

		if got, want := resp.StatusCode, tc.statusCode; got != want {
			t.Errorf("Status code is %d, want %d", got, want)
		}
	}
}

var requestTests2 = []struct {
	path       string
	modtime    time.Time
	statusCode int
}{
	{
		"/logo.png",
		time.Date(2018, time.June, 30, 14, 4, 31, 0, time.UTC),
		http.StatusNotModified,
	},
	{
		"/logo.png",
		time.Time{},
		http.StatusOK,
	},
	{
		"/logo.png",
		time.Date(2018, time.June, 30, 14, 3, 31, 0, time.UTC),
		http.StatusOK,
	},
	{
		"/logo.png",
		time.Date(2018, time.June, 30, 14, 5, 31, 0, time.UTC),
		http.StatusNotModified,
	},
}

func TestRequest_ifModifiedSince(t *testing.T) {
	mux := http.NewServeMux()
	mux.HandleFunc("/logo.png", func(w http.ResponseWriter, r *http.Request) {
		modtime := time.Date(2018, time.June, 30, 14, 4, 31, 0, time.UTC)

		ims := r.Header.Get("If-Modified-Since")
		t, _ := time.Parse(http.TimeFormat, ims)

		if t.IsZero() || t.Before(modtime) {
			w.WriteHeader(http.StatusOK)
		} else {
			w.WriteHeader(http.StatusNotModified)
		}
	})

	ts := httptest.NewServer(mux)
	defer ts.Close()

	for _, tc := range requestTests2 {
		req := httptest.NewRequest(http.MethodGet, tc.path, nil)

		if !tc.modtime.IsZero() {
			req.Header.Add("If-Modified-Since", tc.modtime.Format(http.TimeFormat))
		}

		resp, err := request(fmt.Sprintf("%s%s", ts.URL, tc.path), req)
		if err != nil {
			t.Fatal(err)
		}

		if got, want := resp.StatusCode, tc.statusCode; got != want {
			t.Errorf("Status code is %d, want %d", got, want)
		}
	}
}

var requestTests3 = []struct {
	path       string
	etag       string
	statusCode int
}{
	{
		"/logo.png",
		`W/"fcaec3a55087c997f24ba2a70383ed9b7607fd85f0ae2e0dccb5ec094c75f009"`,
		http.StatusNotModified,
	},
	{
		"/logo.png",
		"",
		http.StatusOK,
	},
	{
		"/logo.png",
		"invalidETag",
		http.StatusOK,
	},
}

func TestRequest_ifNoneMatch(t *testing.T) {
	mux := http.NewServeMux()
	mux.HandleFunc("/logo.png", func(w http.ResponseWriter, r *http.Request) {
		if r.Header.Get("If-None-Match") != fmt.Sprintf(`W/"%x"`, sha256.Sum256([]byte("etag"))) {
			w.WriteHeader(http.StatusOK)
		} else {
			w.WriteHeader(http.StatusNotModified)
		}
	})

	ts := httptest.NewServer(mux)
	defer ts.Close()

	for _, tc := range requestTests3 {
		req := httptest.NewRequest(http.MethodGet, tc.path, nil)

		if tc.etag != "" {
			req.Header.Add("If-None-Match", tc.etag)
		}

		resp, err := request(fmt.Sprintf("%s%s", ts.URL, tc.path), req)
		if err != nil {
			t.Fatal(err)
		}

		if got, want := resp.StatusCode, tc.statusCode; got != want {
			t.Errorf("Status code is %d, want %d", got, want)
		}
	}
}

var requestTests4 = []struct {
	path string
	xff1 string
	xff2 string
}{
	{
		"/logo.png",
		"",
		"203.0.113.57",
	},
	{
		"/logo.png",
		"203.0.113.124",
		"203.0.113.124,203.0.113.57",
	},
}

func TestRequest_xForwardedFor(t *testing.T) {
	mux := http.NewServeMux()
	mux.HandleFunc("/logo.png", func(w http.ResponseWriter, r *http.Request) {
		w.WriteHeader(http.StatusOK)
		fmt.Fprintf(w, "%s", r.Header.Get("X-Forwarded-For"))
	})

	ts := httptest.NewServer(mux)
	defer ts.Close()

	for _, tc := range requestTests4 {
		req := httptest.NewRequest(http.MethodGet, tc.path, nil)
		req.RemoteAddr = "203.0.113.57"

		if tc.xff1 != "" {
			req.Header.Add("X-Forwarded-For", tc.xff1)
		}

		resp, err := request(fmt.Sprintf("%s%s", ts.URL, tc.path), req)
		if err != nil {
			t.Fatal(err)
		}
		defer resp.Body.Close()

		body, _ := ioutil.ReadAll(resp.Body)

		if got, want := string(body), tc.xff2; got != want {
			t.Errorf("X-Forwareded-For is %s, want %s", got, want)
		}
	}
}

repository: ksharpdabu/manael

repo_name: ksharpdabu/manael