text:
.4" y1="2.159" x2="26.416" y2="1.143" width="0.254" layer="2"/>
<wire x1="26.416" y1="1.143" x2="50.546" y2="1.143" width="0.254" layer="2"/>
<via x="51.816" y="2.921" extent="1-16" drill="0.2"/>
<wire x1="25.4" y1="10.541" x2="24.13" y2="11.811" width="0.254" layer="2"/>
<wire x1="24.13" y1="11.811" x2="24.13" y2="13.208" width="0.254" layer="2"/>
<wire x1="24.13" y1="13.208" x2="23.495" y2="13.843" width="0.254" layer="2"/>
<wire x1="51.815" y1="2.922" x2="51.816" y2="2.921" width="0.254" layer="1"/>
<wire x1="50.546" y1="1.143" x2="51.816" y2="2.413" width="0.254" layer="2"/>
<wire x1="51.816" y1="2.413" x2="51.816" y2="2.921" width="0.254" layer="2"/>
<contactref element="X5" pad="2"/>
<wire x1="51.815" y1="3.763" x2="51.816" y2="3.762" width="0.254" layer="1"/>
<wire x1="51.816" y1="3.762" x2="51.816" y2="2.921" width="0.254" layer="1"/>
<wire x1="15.24" y1="19.1008" x2="16.1036" y2="18.2372" width="0.254" layer="2"/>
<wire x1="16.1036" y1="18.2372" x2="18.3896" y2="18.2372" width="0.254" layer="2"/>
<wire x1="18.3896" y1="18.2372" x2="18.9484" y2="17.6784" width="0.254" layer="2"/>
<wire x1="18.9484" y1="17.6784" x2="18.9484" y2="15.2908" width="0.254" layer="2"/>
<wire x1="18.9484" y1="15.2908" x2="20.4724" y2="13.8176" width="0.254" layer="2"/>
<wire x1="20.4724" y1="13.8176" x2="23.4696" y2="13.8176" width="0.254" layer="2"/>
<wire x1="23.4696" y1="13.8176" x2="23.495" y2="13.843" width="0.254" layer="2"/>
</signal>
<signal name="TG_W_TTL">
<contactref element="IC7" pad="39"/>
<via x="15.2908" y="19.9644" extent="1-16" drill="0.2"/>
<wire x1="25.908" y1="10.668" x2="25.908" y2="2.413" width="0.254" layer="2"/>
<wire x1="25.908" y1="2.413" x2="26.67" y2="1.651" width="0.254" layer="2"/>
<wire x1="26.67" y1="1.651" x2="50.419" y2="1.651" width="0.254" layer="2"/>
<via x="52.07" y="4.826" extent="1-16" drill="0.2"/>
<wire x1="25.908" y1="10.668" x2="24.638" y2="11.938" width="0.254" layer="2"/>
<wire x1="24.638" y1="11.938" x2="24.638" y2="13.335" width="0.254" layer="2"/>
<wire x1="24.638" y1="13.335" x2="23.5966" y2="14.3764" width="0.254" layer="2"/>
<wire x1="50.419" y1="1.651" x2="50.927" y2="2.159" width="0.254" layer="2"/>
<wire x1="50.927" y1="2.159" x2="50.927" y2="3.048" width="0.254" layer="2"/>
<wire x1="50.927" y1="3.048" x2="52.07" y2="4.191" width="0.254" layer="2"/>
<wire x1="52.07" y1="4.191" x2="52.07" y2="4.826" width="0.254" layer="2"/>
<contactref element="X5" pad="3"/>
<wire x1="51.815" y1="5.763" x2="52.07" y2="5.762" width="0.254" layer="1"/>
<wire x1="52.07" y1="5.762" x2="52.07" y2="4.826" width="0.254" layer="1"/>
<wire x1="14.9352" y1="20.32" x2="15.2908" y2="19.9644" width="0.254" layer="16"/>
<wire x1="14.9352" y1="20.32" x2="14.9352" y2="21.5392" width="0.254" layer="16"/>
<wire x1="14.9352" y1="21.5392" x2="14.986" y2="21.59" width="0.254" layer="16"/>
<wire x1="14.986" y1="21.59" x2="14.986" y2="22.2504" width="0.254" layer="16"/>
<wire x1="15.2908" y1="19.9644" x2="16.4592" y2="18.796" width="0.254" layer="2"/>
<wire x1="16.4592" y1="18.796" x2="19.05" y2="18.796" width="0.254" layer="2"/>
<wire x1="19.05" y1="18.796" x2="19.4564" y2="18.3896" width="0.254" layer="2"/>
<wire x1="19.4564" y1="18.3896" x2="19.4564" y2="15.5448" width="0.254" layer="2"/>
<wire x1="19.4564" y1="15.5448" x2="20.6248" y2="14.3764" width="0.254" layer="2"/>
<wire x1="20.6248" y1="14.3764" x2="23.5966" y2="14.3764" width="0.254" layer="2"/>
</signal>
<signal name="BG_U_TTL">
<contactref element="IC7" pad="23"/>
<via x="11.7602" y="16.3068" extent="1-16" drill="0.2"/>
<wire x1="0.8636" y1="3.3274" x2="3.429" y2="0.762" width="0.254" layer="2"/>
<wire x1="3.429" y1="0.762" x2="24.9936" y2="0.762" width="0.254" layer="2"/>
<via x="24.9936" y="0.762" extent="1-16" drill="0.2"/>
<wire x1="24.9936" y1="0.762" x2="45.593" y2="0.762" width="0.254" layer="1"/>
<wire x1="10.1346" y1="15.875" x2="11.3538" y2="15.875" width="0.254" layer="16"/>
<contactref element="X5" pad="20"/>
<wire x1="45.593" y1="0.762" x2="46.594" y2="1.763" width="0.254" layer="1"/>
<wire x1="46.594" y1="1.763" x2="47.245" y2="1.763" width="0.254" layer="1"/>
<wire x1="11.3538" y1="15.875" x2="11.8364" y2="16.3576" width="0.254" layer="16"/>
<wire x1="11.8364" y1="16.3576" x2="11.7602" y2="16.3068" width="0.254" layer="16"/>
<wire x1="0.8636" y1="3.3274" x2="0.8636" y2="11.684" width="0.254" layer="2"/>
<wire x1="2.1336" y1="15.0368" x2="10.4902" y2="15.0368" width="0.254" layer="2"/>
<wire x1="10.4902" y1="15.0368" x2="11.7602" y2="16.3068" width="0.254" layer="2"/>
<wire x1="0.8636" y1="11.684" x2="1.8288" y2="12.6492" width="0.254" layer="2"/>
<wire x1="1.8288" y1="12.6492" x2="1.8288" y2="14.732" width="0.254" layer="2"/>
<wire x1="1.8288" y1="14.732" x2="2.1336" y2="15.0368" width="0.254" layer="2"/>
</signal>
<signal name="BG_V_TTL">
<contactref element="IC7" pad="26"/>
<wire x1="45.085" y1="2.159" x2="45.085" y2="1.524" width="0.254" layer="1"/>
<wire x1="45.085" y1="1.524" x2="44.831" y2="1.27" width="0.254" layer="1"/>
<wire x1="44.831" y1="1.27" x2="26.7208" y2="1.27" width="0.254" layer="1"/>
<wire x1="26.7208" y1="1.27" x2="26.3398" y2="1.651" width="0.254" layer="1"/>
<wire x1="26.3398" y1="1.651" x2="24.6126" y2="1.651" width="0.254" layer="1"/>
<wire x1="24.6126" y1="1.651" x2="24.3586" y2="1.397" width="0.254" layer="1"/>
<via x="24.3586" y="1.397" extent="1-16" drill="0.2"/>
<wire x1="24.3586" y1="1.397" x2="23.4696" y2="0.508" width="0.254" layer="15"/>
<wire x1="23.4696" y1="0.508" x2="3.302" y2="0.508" width="0.254" layer="15"/>
<wire x1="3.302" y1="0.508" x2="0.7366" y2="3.0734" width="0.254" layer="15"/>
<wire x1="0.7366" y1="3.0734" x2="0.7366" y2="12.4206" width="0.254" layer="15"/>
<via x="1.2446" y="12.9286" extent="1-16" drill="0.2"/>
<via x="11.557" y="17.8816" extent="1-16" drill="0.2"/>
<wire x1="11.049" y1="17.399" x2="10.1346" y2="17.399" width="0.254" layer="16"/>
<wire x1="0.7366" y1="12.4206" x2="1.2446" y2="12.9286" width="0.254" layer="15"/>
<contactref element="X5" pad="19"/>
<wire x1="45.085" y1="2.159" x2="46.689" y2="3.763" width="0.254" layer="1"/>
<wire x1="46.689" y1="3.763" x2="47.245" y2="3.763" width="0.254" layer="1"/>
<wire x1="11.049" y1="17.399" x2="11.557" y2="17.8816" width="0.254" layer="16"/>
<wire x1="1.5748" y1="17.3228" x2="1.1684" y2="16.9164" width="0.254" layer="2"/>
<wire x1="1.1684" y1="16.9164" x2="1.1684" y2="13.1064" width="0.254" layer="2"/>
<wire x1="1.1684" y1="13.1064" x2="1.2446" y2="12.9286" width="0.254" layer="2"/>
<wire x1="11.557" y1="17.8816" x2="10.9982" y2="17.3228" width="0.254" layer="2"/>
<wire x1="10.9982" y1="17.3228" x2="1.5748" y2="17.3228" width="0.254" layer="2"/>
</signal>
<signal name="TG_U_TTL">
<contactref element="IC7" pad="37"/>
<wire x1="13.9954" y1="22.2504" x2="13.9954" y2="19.431" width="0.254" layer="16"/>
<wire x1="13.9954" y1="19.431" x2="15.2908" y2="18.1356" width="0.254" layer="16"/>
<via x="15.2908" y="18.1356" extent="1-16" drill="0.2"/>
<wire x1="24.892" y1="10.414" x2="24.892" y2="2.032" width="0.254" layer="2"/>
<wire x1="24.892" y1="2.032" x2="26.289" y2="0.635" width="0.254" layer="2"/>
<wire x1="26.289" y1="0.635" x2="51.308" y2="0.635" width="0.254" layer="2"/>
<via x="51.308" y="0.889" extent="1-16" drill="0.2"/>
<wire x1="24.892" y1="10.414" x2="23.622" y2="11.684" width="0.254" layer="2"/>
<wire x1="23.622" y1="11.684" x2="23.622" y2="12.954" width="0.254" layer="2"/>
<wire x1="23.622" y1="12.954" x2="23.2156" y2="13.3604" width="0.254" layer="2"/>
<wire x1="51.308" y1="0.635" x2="51.308" y2="0.889" width="0.254" layer="2"/>
<contactref element="X5" pad="1"/>
<wire x1="51.308" y1="0.889" x2="51.815" y2="0.889" width="0.254" layer="1"/>
<wire x1="51.815" y1="0.889" x2="51.815" y2="1.763" width="0.254" layer="1"/>
<wire x1="15.2908" y1="18.1356" x2="16.1036" y2="17.3228" width="0.254" layer="2"/>
<wire x1="16.1036" y1="17.3228" x2="17.9832" y2="17.3228" width="0.254" layer="2"/>
<wire x1="17.9832" y1="17.3228" x2="18.3388" y2="16.9672" width="0.254" layer="2"/>
<wire x1="18.3388" y1="16.9672" x2="18.3388" y2="15.24" width="0.254" layer="2"/>
<wire x1="18.3388" y1="15.24" x2="20.2184" y2="13.3604" width="0.254" layer="2"/>
<wire x1="20.2184" y1="13.3604" x2="23.2156" y2="13.3604" width="0.254" layer="2"/>
</signal>
<signal name="BG_W_TTL">
<contactref element="IC7" pad="27"/>
<wire x1="44.577" y1="3.81" x2="44.577" y2="2.032" width="0.254" layer="1"/>
<wire x1="44.577" y1="2.032" x2="44.323" y2="1.778" width="0.254" layer="1"/>
<wire x1="44.323" y1="1.778" x2="26.9748" y2="1.778" width="0.254" layer="1"/>
<wire x1="26.9748" y1="1.778" x2="26.5938" y2="2.159" width="0.254" layer="1"/>
<wire x1="26.5938" y1="2.159" x2="24.13" y2="2.159" width="0.254" layer="1"/>
<wire x1="24.13" y1="2.159" x2="22.479" y2="0.508" width="0.254" layer="1"/>
<wire x1="22.479" y1="0.508" x2="14.5034" y2="0.508" width="0.254" layer="1"/>
<wire x1="14.5034" y1="0.508" x2="13.6144" y2="1.397" width="0.254" layer="1"/>
<via x="13.6144" y="1.397" extent="1-16" drill="0.2"/>
<wire x1="13.6144" y1="1.397" x2="13.2588" y2="1.016" width="0.254" layer="15"/>
<wire x1="13.2588" y1="1.016" x2="4.064" y2="1.016" width="0.254" layer="15"/>
<wire x1="4.064" y1="1.016" x2="1.3716" y2="3.7084" width="0.254" layer="15"/>
<via x="1.5748" y="7.9502" extent="1-16" drill="0.2"/>
<wire x1="1.5748" y1="7.9502" x2="1.4224" y2="7.9756" width="0.254" layer="1"/>
<wire x1="1.4224" y1="7.9756" x2="0.635" y2="8.763" width="0.254" layer="1"/>
<via x="3.7084" y="18.0848" extent="1-16" drill="0.2"/>
<contactref element="X5" pad="18"/>
<wire x1="44.577" y1="3.81" x2="46.53" y2="5.763" width="0.254" layer="1"/>
<wire x1="46.53" y1="5.763" x2="47.245" y2="5.763" width="0.254" layer="1"/>
<wire x1="10.1346" y1="17.8816" x2="8.8392" y2="17.8816" width="0.254" layer="16"/>
<wire x1="8.8392" y1="17.8816" x2="8.7376" y2="17.7292" width="0.254" layer="16"/>
<wire x1="8.7376" y1="17.7292" x2="4.064" y2="17.7292" width="0.254" layer="16"/>
<wire x1="4.064" y1="17.7292" x2="3.7084" y2="18.0848" width="0.254" layer="16"/>
<wire x1="1.5748" y1="7.9502" x2="1.5748" y2="6.7056" width="0.254" layer="15"/>
<wire x1="1.5748" y1="6.7056" x2="1.3716" y2="6.5024" width="0.254" layer="15"/>
<wire x1="1.3716" y1="6.5024" x2="1.3716" y2="3.7084" width="0.254" layer="15"/>
<wire x1="0.635" y1="8.763" x2="0.635" y2="12.9794" width="0.254" layer="1"/>
<wire x1="0.635" y1="12.9794" x2="0.5588" y2="13.2588" width="0.254" layer="1"/>
<via x="0.5588" y="13.2588" extent="1-16" drill="0.2"/>
<wire x1="0.5588" y1="13.2588" x2="0.5588" y2="17.3736" width="0.254" layer="2"/>
<wire x1="0.5588" y1="17.3736" x2="1.27" y2="18.0848" width="0.254" layer="2"/>
<wire x1="1.27" y1="18.0848" x2="3.7084" y2="18.0848" width="0.254" layer="2"/>
</signal>
<signal name="AD_TEMP_FET">
<contactref element="R1" pad="1"/>
<contactref element="IC7" pad="9"/>
<contactref element="C1" pad="2"/>
<wire x1="8.2178" y1="11.6332" x2="8.2178" y2="10.1854" width="0.254" layer="1"/>
<via x="15.5956" y="13.2588" extent="1-16" drill="0.2"/>
<wire x1="15.5956" y1="13.2588" x2="8.636" y2="13.2588" width="0.254" layer="15"/>
<via x="8.636" y="13.2588" extent="1-16" drill="0.2"/>
<wire x1="15.494" y1="11.0236" x2="15.494" y2="13.1572" width="0.254" layer="16"/>
<wire x1="15.494" y1="13.1572" x2="15.5956" y2="13.2588" width="0.254" layer="16"/>
<wire x1="8.2178" y1="11.6332" x2="8.2178" y2="12.8406" width="0.254" layer="1"/>
<wire x1="8.2178" y1="12.8406" x2="8.636" y2="13.2588" width="0.254" layer="1"/>
</signal>
<signal name="AD_U_BAT">
<via x="8.9154" y="6.1976" extent="1-16" drill="0.2"/>
<wire x1="9.017" y1="6.096" x2="8.9154" y2="6.1976" width="0.254" layer="1"/>
<contactref element="D4" pad="3"/>
<wire x1="9.695" y1="7.112" x2="8.9154" y2="7.112" width="0.3048" layer="16"/>
<wire x1="8.9154" y1="7.3406" x2="8.9154" y2="7.112" width="0.3048" layer="16"/>
<contactref element="IC7" pad="22"/>
<wire x1="8.9154" y1="7.112" x2="8.9154" y2="6.1976" width="0.3048" layer="16"/>
<wire x1="10.1346" y1="15.3924" x2="11.6078" y2="15.3924" width="0.254" layer="16"/>
<via x="12.4968" y="16.2814" extent="1-16" drill="0.2"/>
<via x="6.3754" y="12.7" extent="1-16" drill="0.2"/>
<wire x1="7.2136" y1="8.8646" x2="8.7376" y2="7.3406" width="0.254" layer="16"/>
<wire x1="8.7376" y1="7.3406" x2="8.9154" y2="7.3406" width="0.254" layer="16"/>
<contactref element="R42" pad="2"/>
<contactref element="C35" pad="2"/>
<wire x1="9.017" y1="6.096" x2="9.8434" y2="6.096" width="0.254" layer="1"/>
<wire x1="10.5528" y1="7.4168" x2="10.1854" y2="7.4168" width="0.254" layer="1"/>
<wire x1="10.1854" y1="7.4168" x2="10.1854" y2="6.096" width="0.254" layer="1"/>
<wire x1="10.1854" y1="6.096" x2="9.8434" y2="6.096" width="0.254" layer="1"/>
<wire x1="7.2136" y1="8.8646" x2="7.2136" y2="11.8618" width="0.254" layer="16"/>
<wire x1="7.2136" y1="11.8618" x2="6.3754" y2="12.7" width="0.254" layer="16"/>
<wire x1="11.6078" y1="15.3924" x2="12.4968" y2="16.2814" width="0.254" layer="16"/>
<wire x1="6.3754" y1="12.7" x2="6.3754" y2="13.4366" width="0.254" layer="15"/>
<wire x1="6.3754" y1="13.4366" x2="6.858" y2="13.9192" width="0.254" layer="15"/>
<wire x1="6.858" y1="13.9192" x2="10.1346" y2="13.9192" width="0.254" layer="15"/>
<wire x1="10.1346" y1="13.9192" x2="12.4968" y2="16.2814" width="0.254" layer="15"/>
</signal>
<signal name="AD_TEMP_COIL">
<contactref element="R2" pad="1"/>
<contactref element="IC7" pad="8"/>
<wire x1="16.002" y1="11.0236" x2="16.002" y2="12.319" width="0.254" layer="16"/>
<wire x1="16.002" y1="12.319" x2="16.1036" y2="12.4714" width="0.254" layer="16"/>
<wire x1="16.1036" y1="12.4714" x2="16.129" y2="12.4714" width="0.254" layer="16"/>
<via x="16.129" y="12.4714" extent="1-16" drill="0.2"/>
<via x="10.9982" y="10.8712" extent="1-16" drill="0.2"/>
<wire x1="10.795" y1="10.668" x2="9.867" y2="10.668" width="0.254" layer="16"/>
<wire x1="10.795" y1="10.668" x2="10.9982" y2="10.8712" width="0.254" layer="16"/>
<wire x1="11.049" y1="10.922" x2="10.9982" y2="10.8712" width="0.254" layer="16"/>
<contactref element="C2" pad="2"/>
<wire x1="9.867" y1="10.668" x2="8.675" y2="9.476" width="0.254" layer="16"/>
<wire x1="8.675" y1="9.476" x2="8.675" y2="9.398" width="0.254" layer="16"/>
<wire x1="16.002" y1="12.3444" x2="16.129" y2="12.4714" width="0.254" layer="15"/>
<wire x1="16.002" y1="12.3444" x2="16.002" y2="11.2776" width="0.254" layer="15"/>
<wire x1="16.002" y1="11.2776" x2="15.5956" y2="10.8712" width="0.254" layer="15"/>
<wire x1="15.5956" y1="10.8712" x2="10.9982" y2="10.8712" width="0.254" layer="15"/>
</signal>
<signal name="DMS_SNGL_CONV">
<contactref element="IC7" pad="34"/>
</signal>
<signal name="DMS_INT">
<contactref element="IC7" pad="33"/>
</signal>
<signal name="DMS_RESET">
<contactref element="IC7" pad="54"/>
</signal>
<signal name="N$4">
<contactref element="R34" pad="2"/>
<contactref element="X1" pad="3"/>
<contactref element="R3" pad="2"/>
<wire x1="45.72" y1="27.393" x2="46.99" y2="28.663" width="0.6096" layer="16"/>
<wire x1="46.99" y1="28.663" x2="46.99" y2="32.258" width="0.6096" layer="16"/>
<wire x1="45.847" y1="27.647" x2="46.99" y2="28.79" width="0.6096" layer="1"/>
<wire x1="46.99" y1="28.79" x2="46.99" y2="32.258" width="0.6096" layer="1"/>
</signal>
<signal name="N$5">
<contactref element="R35" pad="2"/>
<contactref element="X1" pad="4"/>
<contactref element="R4" pad="2"/>
<wire x1="44.45" y1="27.393" x2="44.49" y2="27.433" width="0.6096" layer="16"/>
<wire x1="44.49" y1="27.433" x2="44.49" y2="32.258" width="0.6096" layer="16"/>
<wire x1="44.45" y1="27.647" x2="44.49" y2="27.687" width="0.6096" layer="1"/>
<wire x1="44.49" y1="27.687" x2="44.49" y2="32.258" width="0.6096" layer="1"/>
</signal>
<signal name="N$6">
<contactref element="R36" pad="2"/>
<contactref element="X1" pad="5"/>
<contactref element="R5" pad="2"/>
<wire x1="43.18" y1="27.393" x2="41.99" y2="28.583" width="0.6096" layer="16"/>
<wire x1="41.99" y1="28.583" x2="41.99" y2="32.258" width="0.6096" layer="16"/>
<wire x1="43.053" y1="27.647" x2="41.99" y2="28.71" width="0.6096" layer="1"/>
<wire x1="41.99" y1="28.71" x2="41.99" y2="32.258" width="0.6096" layer="1"/>
</signal>
<signal name="U_BAT">
<contactref element="X5" pad="8"/>
<contactref element="R42" pad="1"/>
<wire x1="51.815" y1="15.763" x2="51.83" y2="15.748" width="0.254" layer="1"/>
<wire x1="51.83" y1="15.748" x2="53.34" y2="15.748" width="0.254" layer="1"/>
<via x="53.34" y="15.748" extent="1-16" drill="0.2"/>
<wire x1="53.34" y1="15.748" x2="53.34" y2="13.843" width="0.254" layer="2"/>
<wire x1="53.34" y1="13.843" x2="52.578" y2="13.081" width="0.254" layer="2"/>
<wire x1="52.578" y1="13.081" x2="52.578" y2="7.112" width="0.254" layer="2"/>
<wire x1="52.578" y1="7.112" x2="51.308" y2="5.842" width="0.254" layer="2"/>
<wire x1="51.308" y1="5.842" x2="51.308" y2="4.191" width="0.254" layer="2"/>
<wire x1="51.308" y1="4.191" x2="50.419" y2="3.302" width="0.254" layer="2"/>
<wire x1="50.419" y1="3.302" x2="50.419" y2="2.286" width="0.254" layer="2"/>
<wire x1="50.419" y1="2.286" x2="50.292" y2="2.159" width="0.254" layer="2"/>
<wire x1="50.292" y1="2.159" x2="27.559" y2="2.159" width="0.254" layer="2"/>
<wire x1="27.559" y1="2.159" x2="27.305" y2="2.413" width="0.254" layer="2"/>
<via x="27.305" y="2.413" extent="1-16" drill="0.2"/>
<wire x1="27.305" y1="2.413" x2="27.0764" y2="2.6416" width="0.254" layer="1"/>
<wire x1="27.0764" y1="2.6416" x2="23.7744" y2="2.6416" width="0.254" layer="1"/>
<wire x1="23.7744" y1="2.6416" x2="22.1488" y2="1.016" width="0.254" layer="1"/>
<wire x1="22.1488" y1="1.016" x2="15.0368" y2="1.016" width="0.254" layer="1"/>
<wire x1="15.0368" y1="1.016" x2="13.589" y2="2.4638" width="0.254" layer="1"/>
<via x="13.589" y="2.4638" extent="1-16" drill="0.2"/>
<wire x1="11.684" y1="2.7432" x2="11.684" y2="7.0866" width="0.254" layer="15"/>
<via x="11.684" y="7.0866" extent="1-16" drill="0.2"/>
<wire x1="11.684" y1="7.0866" x2="11.7094" y2="6.096" width="0.254" layer="1"/>
<wire x1="11.7094" y1="6.096" x2="11.5434" y2="6.096" width="0.254" layer="1"/>
<wire x1="11.684" y1="2.7432" x2="11.938" y2="2.4892" width="0.254" layer="15"/>
<wire x1="11.938" y1="2.4892" x2="13.5636" y2="2.4892" width="0.254" layer="15"/>
<wire x1="13.5636" y1="2.4892" x2="13.589" y2="2.4638" width="0.254" layer="15"/>
</signal>
<signal name="DAC_1">
<contactref element="IC7" pad="20"/>
<contactref element="X6" pad="3"/>
<wire x1="5.6896" y1="6.731" x2="4.699" y2="6.731" width="0.254" layer="2"/>
<via x="4.2164" y="7.2136" extent="1-16" drill="0.2"/>
<wire x1="5.9436" y1="7.5184" x2="5.9436" y2="6.985" width="0.254" layer="2"/>
<wire x1="5.9436" y1="6.985" x2="5.6896" y2="6.731" width="0.254" layer="2"/>
<wire x1="4.191" y1="5.533" x2="4.191" y2="7.1882" width="0.254" layer="16"/>
<wire x1="4.191" y1="7.1882" x2="4.2164" y2="7.2136" width="0.254" layer="16"/>
<wire x1="4.699" y1="6.731" x2="4.2164" y2="7.2136" width="0.254" layer="2"/>
<wire x1="10.1346" y1="14.3764" x2="12.3444" y2="14.3764" width="0.254" layer="16"/>
<wire x1="12.3444" y1="14.3764" x2="12.8524" y2="13.8684" width="0.254" layer="16"/>
<wire x1="12.8524" y1="13.8684" x2="12.8524" y2="12.7" width="0.254" layer="16"/>
<via x="12.8524" y="12.7" extent="1-16" drill="0.2"/>
<wire x1="5.9436" y1="7.5184" x2="7.9248" y2="9.4996" width="0.254" layer="2"/>
<wire x1="7.9248" y1="9.4996" x2="9.3472" y2="9.4996" width="0.254" layer="2"/>
<wire x1="9.3472" y1="9.4996" x2="9.6012" y2="9.7536" width="0.254" layer="2"/>
<wire x1="9.6012" y1="9.7536" x2="9.6012" y2="12.3952" width="0.254" layer="2"/>
<wire x1="9.6012" y1="12.3952" x2="10.8204" y2="13.6144" width="0.254" layer="2"/>
<wire x1="10.8204" y1="13.6144" x2="12.5476" y2="13.6144" width="0.254" layer="2"/>
<wire x1="12.5476" y1="13.6144" x2="12.8524" y2="13.3096" width="0.254" layer="2"/>
<wire x1="12.8524" y1="13.3096" x2="12.8524" y2="12.7" width="0.254" layer="2"/>
</signal>
<signal name="SPI2_SCK">
<contactref element="IC7" pad="29"/>
<wire x1="10.1346" y1="18.8976" x2="5.1308" y2="18.8976" width="0.254" layer="16"/>
<contactref element="X8" pad="5"/>
<wire x1="4.1952" y1="32.766" x2="4.1656" y2="32.584" width="0.254" layer="16"/>
<via x="3.7084" y="30.7848" extent="1-16" drill="0.2"/>
<wire x1="4.1952" y1="32.766" x2="4.1952" y2="31.2716" width="0.254" layer="16"/>
<wire x1="4.1952" y1="31.2716" x2="3.7084" y2="30.7848" width="0.254" layer="16"/>
<wire x1="5.1308" y1="18.8976" x2="4.7244" y2="19.304" width="0.254" layer="16"/>
<wire x1="4.7244" y1="19.304" x2="4.7244" y2="23.7236" width="0.254" layer="16"/>
<wire x1="4.7244" y1="23.7236" x2="3.7592" y2="24.6888" width="0.254" layer="16"/>
<via x="3.7592" y="24.6888" extent="1-16" drill="0.2"/>
<wire x1="3.7592" y1="24.6888" x2="3.7592" y2="30.734" width="0.254" layer="1"/>
<wire x1="3.7592" y1="30.734" x2="3.7084" y2="30.7848" width="0.254" layer="1"/>
</signal>
<signal name="SPI2_MISO">
<contactref element="IC7" pad="10"/>
<wire x1="12.5984" y1="20.32" x2="12.5984" y2="20.5486" width="0.254" layer="16"/>
<contactref element="X8" pad="4"/>
<wire x1="14.986" y1="11.0236" x2="14.986" y2="17.526" width="0.254" layer="16"/>
<wire x1="14.986" y1="17.526" x2="13.4112" y2="19.1008" width="0.254" layer="16"/>
<wire x1="13.4112" y1="19.1008" x2="13.4112" y2="19.5072" width="0.254" layer="16"/>
<wire x1="13.4112" y1="19.5072" x2="12.5984" y2="20.32" width="0.254" layer="16"/>
<wire x1="11.5824" y1="21.59" x2="11.5824" y2="26.8224" width="0.254" layer="2"/>
<wire x1="11.5824" y1="26.8224" x2="11.3792" y2="27.0256" width="0.254" layer="2"/>
<wire x1="11.3792" y1="27.0256" x2="2.8956" y2="27.0256" width="0.254" layer="2"/>
<via x="2.8956" y="27.0256" extent="1-16" drill="0.2"/>
<wire x1="2.8956" y1="27.0256" x2="2.8956" y2="28.884" width="0.254" layer="16"/>
<wire x1="11.5824" y1="21.59" x2="12.192" y2="20.9804" width="0.254" layer="2"/>
<via x="12.192" y="20.9804" extent="1-16" drill="0.2"/>
<wire x1="12.192" y1="20.9804" x2="12.192" y2="20.955" width="0.254" layer="16"/>
<wire x1="12.192" y1="20.955" x2="12.5984" y2="20.5486" width="0.254" layer="16"/>
</signal>
<signal name="SPI2_MOSI">
<contactref element="IC7" pad="11"/>
<via x="11.9126" y="20.2692" extent="1-16" drill="0.2"/>
<wire x1="12.8016" y1="19.3802" x2="11.9126" y2="20.2692" width="0.254" layer="16"/>
<contactref element="X8" pad="3"/>
<wire x1="14.5034" y1="11.0236" x2="14.5034" y2="17.145" width="0.254" layer="16"/>
<wire x1="14.5034" y1="17.145" x2="12.8016" y2="18.8468" width="0.254" layer="16"/>
<wire x1="12.8016" y1="18.8468" x2="12.8016" y2="19.3802" width="0.254" layer="16"/>
<wire x1="11.9126" y1="20.2692" x2="10.922" y2="21.2598" width="0.254" layer="2"/>
<wire x1="10.922" y1="21.2598" x2="10.922" y2="25.3492" width="0.254" layer="2"/>
<wire x1="10.922" y1="25.3492" x2="10.5156" y2="25.7556" width="0.254" layer="2"/>
<wire x1="10.5156" y1="25.7556" x2="2.8448" y2="25.7556" width="0.254" layer="2"/>
<wire x1="2.8448" y1="25.7556" x2="2.286" y2="26.3652" width="0.254" layer="2"/>
<wire x1="2.286" y1="26.3652" x2="2.286" y2="30.734" width="0.254" layer="2"/>
<via x="2.286" y="30.734" extent="1-16" drill="0.2"/>
<wire x1="2.8956" y1="32.584" x2="2.8956" y2="31.2928" width="0.254" layer="16"/>
<wire x1="2.8956" y1="31.2928" x2="2.286" y2="30.734" width="0.254" layer="16"/>
</signal>
<signal name="SPI3_SCK">
<contactref element="IC7" pad="51"/>
<via x="22.606" y="19.304" extent="1-16" drill="0.2"/>
<wire x1="21.3614" y1="19.3802" x2="22.5298" y2="19.3802" width="0.254" layer="16"/>
<wire x1="22.5298" y1="19.3802" x2="22.606" y2="19.304" width="0.254" layer="16"/>
<contactref element="X7" pad="5"/>
<wire x1="22.1996" y1="19.3802" x2="22.5298" y2="19.3802" width="0.254" layer="15"/>
<wire x1="22.5298" y1="19.3802" x2="22.606" y2="19.304" width="0.254" layer="15"/>
<wire x1="15.3924" y1="1.833" x2="15.3924" y2="2.3876" width="0.254" layer="16"/>
<wire x1="15.3924" y1="2.3876" x2="14.6812" y2="2.3876" width="0.254" layer="16"/>
<via x="14.6812" y="2.3876" extent="1-16" drill="0.2"/>
<wire x1="15.0876" y1="2.8448" x2="14.6812" y2="2.3876" width="0.254" layer="15"/>
<wire x1="15.0876" y1="2.8448" x2="20.574" y2="2.8448" width="0.254" layer="15"/>
<wire x1="20.574" y1="2.8448" x2="21.0312" y2="3.302" width="0.254" layer="15"/>
<wire x1="21.0312" y1="3.302" x2="21.0312" y2="7.6708" width="0.254" layer="15"/>
<wire x1="21.0312" y1="7.6708" x2="21.8948" y2="8.5344" width="0.254" layer="15"/>
<wire x1="21.8948" y1="8.5344" x2="21.8948" y2="19.0754" width="0.254" layer="15"/>
<wire x1="21.8948" y1="19.0754" x2="22.1996" y2="19.3802" width="0.254" layer="15"/>
</signal>
<signal name="SPI3_MISO">
<contactref element="IC7" pad="52"/>
<via x="20.7264" y="12.1158" extent="1-16" drill="0.2"/>
<via x="20.066" y="19.812" extent="1-16" drill="0.2"/>
<wire x1="20.828" y1="19.05" x2="20.7264" y2="12.1158" width="0.254" layer="1"/>
<wire x1="20.828" y1="19.05" x2="20.066" y2="19.812" width="0.254" layer="1"/>
<wire x1="21.3614" y1="18.8976" x2="20.4216" y2="18.8976" width="0.254" layer="16"/>
<wire x1="20.4216" y1="18.8976" x2="20.066" y2="19.2532" width="0.254" layer="16"/>
<wire x1="20.066" y1="19.2532" x2="20.066" y2="19.812" width="0.254" layer="16"/>
<contactref element="X7" pad="4"/>
<wire x1="16.6624" y1="5.533" x2="16.6624" y2="7.2136" width="0.254" layer="16"/>
<via x="16.6624" y="7.2136" extent="1-16" drill="0.2"/>
<wire x1="20.828" y1="7.2136" x2="16.6624" y2="7.2136" width="0.254" layer="2"/>
<wire x1="20.828" y1="7.2136" x2="21.1836" y2="7.5692" width="0.254" layer="2"/>
<wire x1="21.1836" y1="7.5692" x2="21.1836" y2="11.6586" width="0.254" layer="2"/>
<wire x1="21.1836" y1="11.6586" x2="20.7264" y2="12.1158" width="0.254" layer="2"/>
</signal>
<signal name="SPI3_MOSI">
<contactref element="IC7" pad="53"/>
<via x="20.0914" y="18.3642" extent="1-16" drill="0.2"/>
<wire x1="21.3614" y1="18.3896" x2="20.0406" y2="18.3896" width="0.254" layer="16"/>
<wire x1="20.0406" y1="18.3896" x2="19.9644" y2="18.415" width="0.254" layer="16"/>
<wire x1="19.9644" y1="18.415" x2="20.0914" y2="18.3642" width="0.254" layer="16"/>
<contactref element="X7" pad="3"/>
<wire x1="21.3868" y1="12.0396" x2="21.336" y2="18.1864" width="0.254" layer="15"/>
<wire x1="21.336" y1="18.1864" x2="21.1328" y2="18.3896" width="0.254" layer="15"/>
<wire x1="21.1328" y1="18.3896" x2="20.1676" y2="18.3896" width="0.254" layer="15"/>
<wire x1="20.1676" y1="18.3896" x2="20.0914" y2="18.3642" width="0.254" layer="15"/>
<wire x1="16.6624" y1="1.833" x2="16.6412" y2="2.214" width="0.254" layer="16"/>
<wire x1="16.6412" y1="2.214" x2="16.6624" y2="3.5052" width="0.254" layer="16"/>
<via x="16.6624" y="3.5052" extent="1-16" drill="0.2"/>
<wire x1="21.3868" y1="12.0396" x2="21.3868" y2="8.9916" width="0.254" layer="15"/>
<wire x1="21.3868" y1="8.9916" x2="20.4724" y2="8.0772" width="0.254" layer="15"/>
<wire x1="20.4724" y1="8.0772" x2="20.4724" y2="3.8608" width="0.254" layer="15"/>
<wire x1="20.4724" y1="3.8608" x2="20.1168" y2="3.5052" width="0.254" layer="15"/>
<wire x1="20.1168" y1="3.5052" x2="16.6624" y2="3.5052" width="0.254" layer="15"/>
</signal>
<signal name="USART1_TX">
<contactref element="IC7" pad="42"/>
<contactref element="X6" pad="8"/>
<wire x1="16.51" y1="22.2504" x2="16.51" y2="19.7866" width="0.254" layer="16"/>
<via x="16.51" y="19.7866" extent="1-16" drill="0.2"/>
<wire x1="16.51" y1="19.7866" x2="15.7226" y2="20.574" width="0.254" layer="2"/>
<via x="15.9004" y="14.1986" extent="1-16" drill="0.2"/>
<via x="18.4404" y="12.5984" extent="1-16" drill="0.2"/>
<wire x1="6.7564" y1="3.5306" x2="6.731" y2="3.556" width="0.254" layer="2"/>
<via x="6.731" y="3.556" extent="1-16" drill="0.2"/>
<wire x1="6.731" y1="3.556" x2="6.858" y2="3.556" width="0.254" layer="16"/>
<wire x1="6.858" y1="3.556" x2="6.731" y2="3.429" width="0.254" layer="16"/>
<wire x1="6.731" y1="3.429" x2="6.731" y2="1.833" width="0.254" layer="16"/>
<wire x1="15.7226" y1="20.574" x2="14.7828" y2="20.574" width="0.254" layer="2"/>
<wire x1="14.7828" y1="20.574" x2="14.605" y2="20.3962" width="0.254" layer="2"/>
<wire x1="6.7564" y1="3.5306" x2="6.7564" y2="4.318" width="0.254" layer="2"/>
<wire x1="6.7564" y1="4.318" x2="7.0104" y2="4.572" width="0.254" layer="2"/>
<wire x1="15.9004" y1="14.1986" x2="18.0086" y2="14.1986" width="0.254" layer="15"/>
<wire x1="18.0086" y1="14.1986" x2="18.4404" y2="13.7668" width="0.254" layer="15"/>
<wire x1="18.4404" y1="13.7668" x2="18.4404" y2="12.5984" width="0.254" layer="15"/>
<wire x1="7.0104" y1="4.572" x2="12.7508" y2="4.572" width="0.254" layer="2"/>
<wire x1="12.7508" y1="4.572" x2="13.6144" y2="5.4356" width="0.254" layer="2"/>
<wire x1="13.6144" y1="5.4356" x2="13.6144" y2="7.8232" width="0.254" layer="2"/>
<wire x1="13.6144" y1="7.8232" x2="14.224" y2="8.4328" width="0.254" layer="2"/>
<wire x1="14.224" y1="8.4328" x2="16.51" y2="8.4328" width="0.254" layer="2"/>
<wire x1="14.605" y1="20.3962" x2="14.605" y2="17.8562" width="0.254" layer="2"/>
<wire x1="14.605" y1="17.8562" x2="15.9004" y2="16.5608" width="0.254" layer="2"/>
<wire x1="15.9004" y1="16.5608" x2="15.9004" y2="14.1986" width="0.254" layer="2"/>
<wire x1="18.4404" y1="10.3632" x2="16.51" y2="8.4328" width="0.254" layer="2"/>
<wire x1="18.4404" y1="10.3632" x2="18.4404" y2="12.5984" width="0.254" layer="2"/>
</signal>
<signal name="USART1_RX">
<contactref element="IC7" pad="43"/>
<contactref element="X6" pad="7"/>
<wire x1="16.9926" y1="22.2504" x2="17.018" y2="22.225" width="0.254" layer="16"/>
<via x="17.145" y="19.3294" extent="1-16" drill="0.2"/>
<wire x1="17.145" y1="19.3294" x2="17.145" y2="20.701" width="0.2032" layer="2"/>
<wire x1="6.5786" y1="5.715" x2="6.731" y2="5.533" width="0.254" layer="16"/>
<wire x1="17.145" y1="19.3294" x2="17.145" y2="20.955" width="0.254" layer="16"/>
<wire x1="17.145" y1="20.955" x2="16.9926" y2="21.1074" width="0.254" layer="16"/>
<wire x1="16.9926" y1="22.2504" x2="16.9926" y2="21.1074" width="0.254" layer="16"/>
<wire x1="14.0208" y1="20.7518" x2="15.0114" y2="21.7424" width="0.254" layer="2"/>
<wire x1="15.0114" y1="21.7424" x2="16.1036" y2="21.7424" width="0.254" layer="2"/>
<wire x1="16.1036" y1="21.7424" x2="17.145" y2="20.701" width="0.254" layer="2"/>
<wire x1="8.001" y1="8.9154" x2="6.604" y2="7.5184" width="0.254" layer="2"/>
<wire x1="6.604" y1="7.5184" x2="6.604" y2="7.2136" width="0.254" layer="2"/>
<via x="6.604" y="7.2136" extent="1-16" drill="0.2"/>
<wire x1="6.604" y1="7.2136" x2="6.5786" y2="5.715" width="0.254" layer="16"/>
<wire x1="14.6304" y1="11.938" x2="14.6304" y2="16.9164" width="0.254" layer="2"/>
<wire x1="14.6304" y1="16.9164" x2="14.0208" y2="17.526" width="0.254" layer="2"/>
<wire x1="14.0208" y1="17.526" x2="14.0208" y2="20.7518" width="0.254" layer="2"/>
<wire x1="14.1224" y1="11.43" x2="14.6304" y2="11.938" width="0.254" layer="2"/>
<wire x1="8.001" y1="8.9154" x2="9.9822" y2="8.9154" width="0.254" layer="2"/>
<wire x1="9.9822" y1="8.9154" x2="10.2108" y2="9.144" width="0.254" layer="2"/>
<wire x1="10.2108" y1="9.144" x2="10.2108" y2="11.0236" width="0.254" layer="2"/>
<wire x1="10.2108" y1="11.0236" x2="10.6172" y2="11.43" width="0.254" layer="2"/>
<wire x1="10.6172" y1="11.43" x2="14.1224" y2="11.43" width="0.254" layer="2"/>
</signal>
<signal name="CS_AS5048">
<contactref element="IC7" pad="41"/>
<via x="17.8054" y="14.8336" extent="1-16" drill="0.2"/>
<wire x1="16.002" y1="22.2504" x2="16.002" y2="20.6756" width="0.254" layer="16"/>
<wire x1="16.002" y1="20.6756" x2="15.875" y2="20.5486" width="0.254" layer="16"/>
<contactref element="X7" pad="6"/>
<wire x1="15.875" y1="20.5486" x2="15.875" y2="15.113" width="0.254" layer="16"/>
<wire x1="15.875" y1="15.113" x2="16.1544" y2="14.8336" width="0.254" layer="16"/>
<wire x1="16.1544" y1="14.8336" x2="17.8054" y2="14.8336" width="0.254" layer="16"/>
<wire x1="19.1516" y1="13.4874" x2="17.8054" y2="14.8336" width="0.254" layer="2"/>
<via x="15.5956" y="7.8232" extent="1-16" drill="0.2"/>
<wire x1="15.3924" y1="5.533" x2="15.3924" y2="6.0452" width="0.254" layer="16"/>
<wire x1="15.3924" y1="6.0452" x2="15.5956" y2="6.2484" width="0.254" layer="16"/>
<wire x1="15.5956" y1="6.2484" x2="15.5956" y2="7.8232" width="0.254" layer="16"/>
<wire x1="19.1516" y1="13.4874" x2="19.1516" y2="10.414" width="0.254" layer="2"/>
<wire x1="19.1516" y1="10.414" x2="18.7452" y2="10.0076" width="0.254" layer="2"/>
<wire x1="18.7452" y1="10.0076" x2="18.7452" y2="9.0932" width="0.254" layer="2"/>
<wire x1="18.7452" y1="9.0932" x2="18.2372" y2="8.5852" width="0.254" layer="2"/>
<wire x1="18.2372" y1="8.5852" x2="17.6784" y2="8.5852" width="0.254" layer="2"/>
<wire x1="17.6784" y1="8.5852" x2="16.9164" y2="7.8232" width="0.254" layer="2"/>
<wire x1="16.9164" y1="7.8232" x2="15.5956" y2="7.8232" width="0.254" layer="2"/>
</signal>
<signal name="CS_DMS">
<contactref element="IC7" pad="36"/>
<via x="13.3858" y="20.3708" extent="1-16" drill="0.2"/>
<wire x1="13.4874" y1="22.2504" x2="13.4874" y2="20.3708" width="0.254" layer="16"/>
<wire x1="13.4874" y1="20.3708" x2="13.3858" y2="20.3708" width="0.254" layer="16"/>
<wire x1="13.3858" y1="20.3708" x2="13.5128" y2="20.4978" width="0.254" layer="2"/>
<contactref element="X8" pad="6"/>
<via x="4.8768" y="27.7368" extent="1-16" drill="0.2"/>
<wire x1="4.8768" y1="27.7368" x2="4.136" y2="27.7368" width="0.254" layer="16"/>
<wire x1="4.136" y1="27.7368" x2="4.1656" y2="28.884" width="0.254" layer="16"/>
<wire x1="13.5128" y1="20.4978" x2="13.5128" y2="27.5336" width="0.254" layer="2"/>
<wire x1="13.5128" y1="27.5336" x2="13.3096" y2="27.7368" width="0.254" layer="2"/>
<wire x1="13.3096" y1="27.7368" x2="4.8768" y2="27.7368" width="0.254" layer="2"/>
</signal>
<signal name="N$3">
<contactref element="LED1" pad="A"/>
<contactref element="R50" pad="1"/>
<wire x1="10.3242" y1="27.6098" x2="11.6246" y2="27.6098" width="0.6096" layer="16"/>
</signal>
<signal name="SHUNT-">
<contactref element="X5" pad="11"/>
<wire x1="27.94" y1="29.21" x2="37.846" y2="29.21" width="0.254" layer="1"/>
<wire x1="37.846" y1="29.21" x2="39.243" y2="30.607" width="0.254" layer="1"/>
<via x="39.243" y="30.607" extent="1-16" drill="0.2"/>
<wire x1="39.243" y1="30.607" x2="48.006" y2="30.607" width="0.254" layer="2"/>
<wire x1="48.006" y1="30.607" x2="48.133" y2="30.734" width="0.254" layer="2"/>
<via x="48.006" y="23.241" extent="1-16" drill="0.2"/>
<wire x1="47.498" y1="27.559" x2="48.006" y2="28.067" width="0.254" layer="2"/>
<via x="48.006" y="28.067" extent="1-16" drill="0.2"/>
<wire x1="48.006" y1="28.067" x2="48.006" y2="31.369" width="0.254" layer="1"/>
<via x="48.006" y="31.369" extent="1-16" drill="0.2"/>
<wire x1="48.006" y1="31.369" x2="48.006" y2="30.861" width="0.254" layer="2"/>
<wire x1="48.006" y1="30.861" x2="48.133" y2="30.734" width="0.254" layer="2"/>
<wire x1="46.609" y1="19.812" x2="46.736" y2="19.685" width="0.254" layer="1"/>
<wire x1="46.736" y1="19.685" x2="47.167" y2="19.685" width="0.254" layer="1"/>
<wire x1="47.167" y1="19.685" x2="47.245" y2="19.763" width="0.254" layer="1"/>
<contactref element="R12" pad="2"/>
<contactref element="C8" pad="2"/>
<via x="27.1526" y="28.2956" extent="1-16" drill="0.2"/>
<wire x1="15.8868" y1="26.0468" x2="15.836" y2="25.9842" width="0.254" layer="16"/>
<wire x1="27.94" y1="29.21" x2="27.1526" y2="28.4226" width="0.254" layer="1"/>
<wire x1="27.1526" y1="28.4226" x2="27.1526" y2="28.2956" width="0.254" layer="1"/>
<wire x1="24.638" y1="25.566" x2="24.98" y2="25.908" width="0.254" layer="16"/>
<wire x1="24.98" y1="25.908" x2="27.0256" y2="25.908" width="0.254" layer="16"/>
<wire x1="27.0256" y1="25.908" x2="27.1526" y2="26.035" width="0.254" layer="16"/>
<wire x1="27.1526" y1="26.035" x2="27.1526" y2="28.2956" width="0.254" layer="16"/>
<wire x1="23.6982" y1="25.8064" x2="23.6982" y2="26.8986" width="0.254" layer="16"/>
<wire x1="23.6982" y1="26.8986" x2="23.368" y2="27.2796" width="0.254" layer="16"/>
<wire x1="23.368" y1="27.2796" x2="16.1036" y2="27.2796" width="0.254" layer="16"/>
<wire x1="16.1036" y1="27.2796" x2="15.875" y2="27.0002" width="0.254" layer="16"/>
<wire x1="15.875" y1="27.0002" x2="15.875" y2="26.2264" width="0.254" layer="16"/>
<wire x1="15.875" y1="26.2264" x2="15.836" y2="25.9842" width="0.254" layer="16"/>
<contactref element="C13" pad="1"/>
<wire x1="46.609" y1="19.812" x2="47.918" y2="19.812" width="0.4064" layer="1"/>
<wire x1="47.918" y1="19.812" x2="49.569" y2="21.463" width="0.4064" layer="1"/>
<wire x1="49.569" y1="21.463" x2="49.569" y2="22.44" width="0.4064" layer="1"/>
<wire x1="49.569" y1="22.44" x2="48.768" y2="23.241" width="0.4064" layer="1"/>
<wire x1="48.768" y1="23.241" x2="48.006" y2="23.241" width="0.4064" layer="1"/>
<wire x1="47.498" y1="27.559" x2="47.498" y2="23.876" width="0.254" layer="2"/>
<wire x1="47.498" y1="23.876" x2="48.133" y2="23.241" width="0.254" layer="2"/>
<wire x1="48.133" y1="23.241" x2="48.006" y2="23.241" width="0.254" layer="2"/>
<wire x1="23.6982" y1="25.8064" x2="23.9404" y2="25.5524" width="0.254" layer="16"/>
<wire x1="23.9404" y1="25.5524" x2="24.638" y2="25.566" width="0.254" layer="16"/>
</signal>
<signal name="SHUNT+">
<contactref element="X5" pad="12"/>
<wire x1="28.194" y1="28.702" x2="38.608" y2="28.702" width="0.254" layer="1"/>
<wire x1="38.608" y1="28.702" x2="39.878" y2="29.972" width="0.254" layer="1"/>
<via x="39.878" y="29.972" extent="1-16" drill="0.2"/>
<wire x1="39.878" y1="29.972" x2="48.26" y2="29.972" width="0.254" layer="2"/>
<wire x1="47.245" y1="17.763" x2="48.37" y2="17.763" width="0.254" layer="1"/>
<via x="52.324" y="21.59" extent="1-16" drill="0.2"/>
<wire x1="49.403" y1="22.479" x2="49.403" y2="22.606" width="0.3048" layer="2"/>
<wire x1="49.403" y1="22.606" x2="48.26" y2="23.749" width="0.254" layer="2"/>
<wire x1="48.26" y1="23.749" x2="48.26" y2="27.051" width="0.254" layer="2"/>
<wire x1="48.26" y1="27.051" x2="50.165" y2="28.956" width="0.254" layer="2"/>
<via x="50.165" y="28.956" extent="1-16" drill="0.2"/>
<wire x1="50.165" y1="28.956" x2="50.165" y2="29.718" width="0.254" layer="1"/>
<wire x1="50.165" y1="29.718" x2="49.022" y2="30.861" width="0.254" layer="1"/>
<via x="49.022" y="30.861" extent="1-16" drill="0.2"/>
<wire x1="49.022" y1="30.861" x2="49.022" y2="30.734" width="0.3048" layer="2"/>
<wire x1="49.022" y1="30.734" x2="48.26" y2="29.972" width="0.254" layer="2"/>
<wire x1="48.37" y1="17.763" x2="49.784" y2="19.177" width="0.254" layer="1"/>
<contactref element="R13" pad="2"/>
<contactref element="C9" pad="2"/>
<via x="27.6352" y="25.4" extent="1-16" drill="0.2"/>
<wire x1="25.996" y1="24.638" x2="22.9108" y2="24.638" width="0.254" layer="16"/>
<wire x1="22.9108" y1="24.638" x2="22.7448" y2="24.804" width="0.254" layer="16"/>
<wire x1="22.7448" y1="24.804" x2="22.7448" y2="25.654" width="0.254" layer="16"/>
<wire x1="28.194" y1="28.702" x2="27.94" y2="28.448" width="0.254" layer="1"/>
<wire x1="27.94" y1="28.448" x2="27.94" y2="25.7048" width="0.254" layer="1"/>
<wire x1="27.94" y1="25.7048" x2="27.6352" y2="25.4" width="0.254" layer="1"/>
<wire x1="25.996" y1="24.638" x2="26.162" y2="25.058" width="0.254" layer="16"/>
<wire x1="26.162" y1="25.058" x2="26.25" y2="25.4" width="0.254" layer="16"/>
<wire x1="26.25" y1="25.4" x2="27.6352" y2="25.4" width="0.254" layer="16"/>
<contactref element="C13" pad="2"/>
<wire x1="49.784" y1="19.177" x2="49.784" y2="20.32" width="0.254" layer="1"/>
<wire x1="49.784" y1="20.32" x2="49.911" y2="20.447" width="0.254" layer="1"/>
<wire x1="49.911" y1="20.447" x2="50.673" y2="20.447" width="0.254" layer="1"/>
<wire x1="50.673" y1="20.447" x2="50.8" y2="20.574" width="0.254" layer="1"/>
<wire x1="50.8" y1="20.574" x2="50.8" y2="21.082" width="0.254" layer="1"/>
<wire x1="50.8" y1="21.082" x2="51.181" y2="21.463" width="0.254" layer="1"/>
<wire x1="51.181" y1="21.463" x2="51.269" y2="21.463" width="0.254" layer="1"/>
<wire x1="51.269" y1="21.463" x2="51.396" y2="21.59" width="0.254" layer="1"/>
<wire x1="51.396" y1="21.59" x2="52.324" y2="21.59" width="0.254" layer="1"/>
<wire x1="49.403" y1="22.479" x2="50.292" y2="21.59" width="0.254" layer="2"/>
<wire x1="50.292" y1="21.59" x2="52.324" y2="21.59" width="0.254" layer="2"/>
</signal>
<signal name="IMESS">
<contactref element="IC7" pad="17"/>
<via x="12.7" y="17.1958" extent="1-16" drill="0.2"/>
<wire x1="10.16" y1="12.8524" x2="10.1346" y2="12.8778" width="0.254" layer="16"/>
<contactref element="R6" pad="1"/>
<contactref element="C6" pad="2"/>
<wire x1="12.7254" y1="17.2974" x2="12.7762" y2="17.1704" width="0.254" layer="1"/>
<wire x1="12.7762" y1="17.1704" x2="12.7" y2="17.1958" width="0.254" layer="1"/>
<wire x1="12.7254" y1="17.2974" x2="12.7254" y2="17.1958" width="0.254" layer="1"/>
<wire x1="12.7254" y1="17.1958" x2="12.7508" y2="17.2212" width="0.254" layer="1"/>
<wire x1="10.3124" y1="17.526" x2="10.5664" y2="17.7918" width="0.254" layer="1"/>
<wire x1="10.5664" y1="17.7918" x2="10.3124" y2="17.8952" width="0.254" layer="1"/>
<wire x1="10.287" y1="19.4446" x2="10.287" y2="17.8172" width="0.254" layer="1"/>
<wire x1="10.287" y1="17.8172" x2="10.5664" y2="17.7918" width="0.254" layer="1"/>
<wire x1="10.3124" y1="17.526" x2="10.4902" y2="17.526" width="0.254" layer="1"/>
<wire x1="10.4902" y1="17.526" x2="10.8204" y2="17.1958" width="0.254" layer="1"/>
<wire x1="10.8204" y1="17.1958" x2="12.7" y2="17.1958" width="0.254" layer="1"/>
<wire x1="10.16" y1="12.8524" x2="10.16" y2="12.3444" width="0.254" layer="16"/>
<wire x1="10.16" y1="12.3444" x2="10.3632" y2="12.1412" width="0.254" layer="16"/>
<wire x1="10.3632" y1="12.1412" x2="13.1572" y2="12.1412" width="0.254" layer="16"/>
<wire x1="13.1572" y1="12.1412" x2="13.3604" y2="12.3444" width="0.254" layer="16"/>
<wire x1="13.3604" y1="12.3444" x2="13.3604" y2="14.9352" width="0.254" layer="16"/>
<wire x1="13.3604" y1="14.9352" x2="13.1064" y2="15.1892" width="0.254" layer="16"/>
<wire x1="13.1064" y1="15.1892" x2="13.1064" y2="16.7894" width="0.254" layer="16"/>
<wire x1="13.1064" y1="16.7894" x2="12.7" y2="17.1958" width="0.254" layer="16"/>
</signal>
<signal name="DAC_2">
<contactref element="IC7" pad="21"/>
<contactref element="X6" pad="5"/>
<via x="5.2578" y="7.3152" extent="1-16" drill="0.2"/>
<wire x1="7.8232" y1="10.0584" x2="5.2324" y2="7.4676" width="0.254" layer="2"/>
<wire x1="5.2324" y1="7.4676" x2="5.2324" y2="7.3406" width="0.254" layer="2"/>
<wire x1="5.2324" y1="7.3406" x2="5.2578" y2="7.3152" width="0.254" layer="2"/>
<wire x1="5.461" y1="5.533" x2="5.461" y2="7.112" width="0.254" layer="16"/>
<wire x1="5.461" y1="7.112" x2="5.2578" y2="7.3152" width="0.254" layer="16"/>
<wire x1="10.1346" y1="14.8844" x2="11.938" y2="14.8844" width="0.254" layer="16"/>
<wire x1="11.938" y1="14.8844" x2="12.5476" y2="15.494" width="0.254" layer="16"/>
<via x="12.5476" y="15.494" extent="1-16" drill="0.2"/>
<wire x1="7.8232" y1="10.0584" x2="8.7884" y2="10.0584" width="0.254" layer="2"/>
<wire x1="8.7884" y1="10.0584" x2="9.0932" y2="10.3632" width="0.254" layer="2"/>
<wire x1="9.0932" y1="10.3632" x2="9.0932" y2="12.6492" width="0.254" layer="2"/>
<wire x1="9.0932" y1="12.6492" x2="11.9888" y2="15.494" width="0.254" layer="2"/>
<wire x1="11.9888" y1="15.494" x2="12.5476" y2="15.494" width="0.254" layer="2"/>
</signal>
<signal name="USER_BTN">
<contactref element="IC7" pad="24"/>
<contactref element="R7" pad="1"/>
<contactref element="S1" pad="P$2"/>
<contactref element="C7" pad="1"/>
<wire x1="6.0588" y1="20.828" x2="6.0588" y2="22.3266" width="0.254" layer="16"/>
<wire x1="10.1346" y1="16.383" x2="10.9728" y2="16.383" width="0.254" layer="16"/>
<wire x1="1.4276" y1="26.0604" x2="1.2" y2="25.3746" width="0.3048" layer="16"/>
<wire x1="6.0588" y1="22.3266" x2="5.8166" y2="22.4282" width="0.254" layer="16"/>
<wire x1="5.588" y1="25.146" x2="5.1816" y2="25.5524" width="0.254" layer="16"/>
<wire x1="5.1816" y1="25.5524" x2="1.3716" y2="25.5524" width="0.254" layer="16"/>
<wire x1="1.3716" y1="25.5524" x2="1.3716" y2="25.8624" width="0.254" layer="16"/>
<wire x1="1.3716" y1="25.8624" x2="1.2" y2="25.3746" width="0.254" layer="16"/>
<via x="12.2428" y="18.542" extent="1-16" drill="0.2"/>
<wire x1="6.0588" y1="20.828" x2="6.0588" y2="20.0016" width="0.254" layer="16"/>
<wire x1="6.0588" y1="20.0016" x2="6.096" y2="19.8628" width="0.254" layer="16"/>
<via x="6.096" y="19.8628" extent="1-16" drill="0.2"/>
<wire x1="10.922" y1="18.9484" x2="11.3284" y2="18.542" width="0.254" layer="2"/>
<wire x1="11.3284" y1="18.542" x2="12.2428" y2="18.542" width="0.254" layer="2"/>
<wire x1="10.9728" y1="16.383" x2="12.2428" y2="17.653" width="0.254" layer="16"/>
<wire x1="12.2428" y1="17.653" x2="12.2428" y2="18.542" width="0.254" layer="16"/>
<wire x1="10.922" y1="18.9484" x2="10.922" y2="19.9136" width="0.254" layer="2"/>
<wire x1="10.922" y1="19.9136" x2="10.668" y2="20.1168" width="0.254" layer="2"/>
<wire x1="5.588" y1="25.146" x2="5.588" y2="24.384" width="0.254" layer="16"/>
<wire x1="5.588" y1="24.384" x2="6.0452" y2="23.9268" width="0.254" layer="16"/>
<wire x1="6.0452" y1="23.9268" x2="6.0452" y2="22.3402" width="0.254" layer="16"/>
<wire x1="6.0452" y1="22.3402" x2="6.0588" y2="22.3266" width="0.254" layer="16"/>
<wire x1="10.668" y1="20.1168" x2="6.35" y2="20.1168" width="0.254" layer="2"/>
<wire x1="6.35" y1="20.1168" x2="6.096" y2="19.8628" width="0.254" layer="2"/>
</signal>
<signal name="N$7">
<contactref element="IC6" pad="4"/>
<contactref element="R6" pad="2"/>
<wire x1="13.322" y1="22.553" x2="11.4786" y2="22.553" width="0.3048" layer="1"/>
<wire x1="10.2616" y1="21.336" x2="10.2616" y2="20.916" width="0.3048" layer="1"/>
<wire x1="10.2616" y1="20.916" x2="10.287" y2="21.1446" width="0.3048" layer="1"/>
<wire x1="11.4786" y1="22.553" x2="10.2616" y2="21.336" width="0.3048" layer="1"/>
</signal>
<signal name="N$8">
<contactref element="IC5" pad="5"/>
<contactref element="IC6" pad="3"/>
<wire x1="23.065" y1="24.557" x2="21.717" y2="24.557" width="0.3048" layer="1"/>
<via x="21.717" y="24.557" extent="1-16" drill="0.2"/>
<wire x1="21.717" y1="24.557" x2="17.0434" y2="24.557" width="0.3048" layer="2"/>
<wire x1="17.0434" y1="24.557" x2="16.2814" y2="23.7998" width="0.3048" layer="2"/>
<via x="16.2814" y="23.7998" extent="1-16" drill="0.2"/>
<wire x1="15.6718" y1="22.987" x2="15.24" y2="22.987" width="0.3048" layer="1"/>
<wire x1="15.24" y1="22.987" x2="14.986" y2="23.241" width="0.3048" layer="1"/>
<wire x1="14.986" y1="23.241" x2="13.36" y2="23.241" width="0.3048" layer="1"/>
<wire x1="13.36" y1="23.241" x2="13.322" y2="23.203" width="0.3048" layer="1"/>
<wire x1="15.6718" y1="22.987" x2="16.2814" y2="23.5966" width="0.3048" layer="1"/>
<wire x1="16.2814" y1="23.5966" x2="16.2814" y2="23.7998" width="0.3048" layer="1"/>
</signal>
<signal name="N$10">
<contactref element="IC5" pad="1"/>
<contactref element="IC6" pad="7"/>
<wire x1="20.365" y1="24.557" x2="19.177" y2="24.557" width="0.3048" layer="1"/>
<wire x1="19.177" y1="24.557" x2="19.177" y2="23.876" width="0.3048" layer="1"/>
<wire x1="19.177" y1="23.876" x2="17.722" y2="23.876" width="0.3048" layer="1"/>
<wire x1="17.722" y1="23.876" x2="17.722" y2="23.853" width="0.3048" layer="1"/>
</signal>
<signal name="N$1">
<contactref element="IC6" pad="8"/>
<contactref element="R13" pad="1"/>
<wire x1="21.0448" y1="25.654" x2="20.0152" y2="25.654" width="0.254" layer="16"/>
<via x="20.0152" y="25.654" extent="1-16" drill="0.3"/>
<wire x1="20.0152" y1="25.654" x2="19.5072" y2="25.146" width="0.254" layer="1"/>
<wire x1="19.5072" y1="25.146" x2="18.7452" y2="25.146" width="0.254" layer="1"/>
<wire x1="18.7452" y1="25.146" x2="18.153" y2="24.503" width="0.254" layer="1"/>
<wire x1="18.153" y1="24.503" x2="17.722" y2="24.503" width="0.254" layer="1"/>
<contactref element="C14" pad="1"/>
<wire x1="16.3948" y1="26.0096" x2="16.3948" y2="24.7532" width="0.4064" layer="1"/>
<wire x1="16.3948" y1="24.7532" x2="16.6624" y2="24.4856" width="0.4064" layer="1"/>
<wire x1="16.6624" y1="24.4856" x2="17.7046" y2="24.4856" width="0.4064" layer="1"/>
<wire x1="17.7046" y1="24.4856" x2="17.722" y2="24.503" width="0.4064" layer="1"/>
</signal>
<signal name="IC6">
<contactref element="IC6" pad="1"/>
<contactref element="R12" pad="1"/>
<wire x1="14.136" y1="25.9842" x2="14.605" y2="25.5152" width="0.254" layer="16"/>
<wire x1="14.605" y1="25.5152" x2="14.605" y2="24.511" width="0.254" layer="16"/>
<via x="14.605" y="24.511" extent="1-16" drill="0.2"/>
<wire x1="14.605" y1="24.511" x2="14.597" y2="24.503" width="0.254" layer="1"/>
<wire x1="14.597" y1="24.503" x2="13.322" y2="24.503" width="0.4064" layer="1"/>
<contactref element="C14" pad="2"/>
<wire x1="14.6948" y1="26.0096" x2="14.6948" y2="24.6008" width="0.4064" layer="1"/>
<wire x1="14.6948" y1="24.6008" x2="14.605" y2="24.511" width="0.4064" layer="1"/>
</signal>
<signal name="N$2">
<via x="4" y="10.5" extent="1-16" drill="2.6" diameter="5.3"/>
</signal>
<signal name="N$11">
<via x="51.500025" y="25.500075" extent="1-16" drill="2.7" diameter="5.3"/>
</signal>
<signal name="GS1_INA225">
<contactref element="IC7" pad="35"/>
<contactref element="IC6" pad="6"/>
<wire x1="17.722" y1="23.203" x2="16.5482" y2="23.203" width="0.254" layer="1"/>
<wire x1="16.5482" y1="23.203" x2="15.0876" y2="21.7424" width="0.254" layer="1"/>
<wire x1="15.0876" y1="21.7424" x2="13.6144" y2="21.7424" width="0.254" layer="1"/>
<via x="12.954" y="21.082" extent="1-16" drill="0.2"/>
<wire x1="13.6144" y1="21.7424" x2="12.954" y2="21.082" width="0.254" layer="1"/>
<wire x1="13.0048" y1="22.2504" x2="12.954" y2="22.1996" width="0.254" layer="16"/>
<wire x1="12.954" y1="22.1996" x2="12.954" y2="21.082" width="0.254" layer="16"/>
</signal>
<signal name="GS0_INA225">
<contactref element="IC7" pad="40"/>
<contactref element="IC6" pad="5"/>
<wire x1="17.722" y1="22.553" x2="17.7198" y2="22.5552" width="0.254" layer="1"/>
<wire x1="17.7198" y1="22.5552" x2="16.51" y2="22.5552" width="0.254" layer="1"/>
<wire x1="16.51" y1="22.5552" x2="15.4432" y2="21.4884" width="0

license: MIT

license_type: permissive

branch_name: refs/heads/master

extension: brd


text:
.254" layer="1"/>
<wire x1="15.4432" y1="21.4884" x2="15.4432" y2="21.082" width="0.254" layer="1"/>
<via x="15.4432" y="21.082" extent="1-16" drill="0.2"/>
<wire x1="15.4432" y1="21.082" x2="15.494" y2="21.1836" width="0.254" layer="16"/>
<wire x1="15.494" y1="21.1836" x2="15.494" y2="22.2504" width="0.254" layer="16"/>
</signal>
</signals>
</board>
</drawing>
<compatibility>
<note version="6.3" minversion="6.2.2" severity="warning">
Since Version 6.2.2 text objects can contain more than one line,
which will not be processed correctly with this version.
</note>
</compatibility>
</eagle>


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE eagle SYSTEM "eagle.dtd">
<eagle version="7.2.0">
<drawing>
<settings>
<setting alwaysvectorfont="no"/>
<setting verticaltext="up"/>
</settings>
<grid distance="12.5" unitdist="mil" unit="mm" style="lines" multiple="1" display="no" altdistance="0.025" altunitdist="inch" altunit="mm"/>
<layers>
<layer number="1" name="Top" color="4" fill="1" visible="yes" active="yes"/>
<layer number="16" name="Bottom" color="1" fill="1" visible="yes" active="yes"/>
<layer number="17" name="Pads" color="2" fill="1" visible="yes" active="yes"/>
<layer number="18" name="Vias" color="2" fill="1" visible="yes" active="yes"/>
<layer number="19" name="Unrouted" color="6" fill="1" visible="yes" active="yes"/>
<layer number="20" name="Dimension" color="15" fill="1" visible="yes" active="yes"/>
<layer number="21" name="tPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="22" name="bPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="23" name="tOrigins" color="15" fill="1" visible="yes" active="yes"/>
<layer number="24" name="bOrigins" color="15" fill="1" visible="yes" active="yes"/>
<layer number="25" name="tNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="26" name="bNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="27" name="tValues" color="7" fill="1" visible="no" active="yes"/>
<layer number="28" name="bValues" color="7" fill="1" visible="no" active="yes"/>
<layer number="29" name="tStop" color="7" fill="3" visible="no" active="yes"/>
<layer number="30" name="bStop" color="7" fill="6" visible="no" active="yes"/>
<layer number="31" name="tCream" color="7" fill="4" visible="no" active="yes"/>
<layer number="32" name="bCream" color="7" fill="5" visible="no" active="yes"/>
<layer number="33" name="tFinish" color="6" fill="3" visible="no" active="yes"/>
<layer number="34" name="bFinish" color="6" fill="6" visible="no" active="yes"/>
<layer number="35" name="tGlue" color="7" fill="4" visible="no" active="yes"/>
<layer number="36" name="bGlue" color="7" fill="5" visible="no" active="yes"/>
<layer number="37" name="tTest" color="7" fill="1" visible="no" active="yes"/>
<layer number="38" name="bTest" color="7" fill="1" visible="no" active="yes"/>
<layer number="39" name="tKeepout" color="4" fill="11" visible="no" active="yes"/>
<layer number="40" name="bKeepout" color="1" fill="11" visible="no" active="yes"/>
<layer number="41" name="tRestrict" color="4" fill="10" visible="no" active="yes"/>
<layer number="42" name="bRestrict" color="1" fill="10" visible="no" active="yes"/>
<layer number="43" name="vRestrict" color="2" fill="10" visible="no" active="yes"/>
<layer number="44" name="Drills" color="7" fill="1" visible="no" active="yes"/>
<layer number="45" name="Holes" color="7" fill="1" visible="yes" active="yes"/>
<layer number="46" name="Milling" color="3" fill="1" visible="yes" active="yes"/>
<layer number="47" name="Measures" color="7" fill="1" visible="yes" active="yes"/>
<layer number="48" name="Document" color="7" fill="1" visible="yes" active="yes"/>
<layer number="49" name="Reference" color="7" fill="1" visible="yes" active="yes"/>
<layer number="50" name="dxf" color="7" fill="1" visible="yes" active="yes"/>
<layer number="51" name="tDocu" color="7" fill="1" visible="yes" active="yes"/>
<layer number="52" name="bDocu" color="7" fill="1" visible="yes" active="yes"/>
<layer number="91" name="Nets" color="2" fill="1" visible="no" active="no"/>
<layer number="92" name="Busses" color="1" fill="1" visible="no" active="no"/>
<layer number="93" name="Pins" color="2" fill="1" visible="no" active="no"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="no" active="no"/>
<layer number="95" name="Names" color="7" fill="1" visible="no" active="no"/>
<layer number="96" name="Values" color="7" fill="1" visible="no" active="no"/>
<layer number="97" name="Info" color="7" fill="1" visible="no" active="no"/>
<layer number="98" name="Guide" color="6" fill="1" visible="no" active="no"/>
<layer number="250" name="Descript" color="3" fill="1" visible="no" active="no"/>
<layer number="251" name="SMDround" color="12" fill="11" visible="no" active="no"/>
</layers>
<board>
<plain>
<rectangle x1="2.8575" y1="13.6525" x2="4.1275" y2="15.5575" layer="16"/>
<rectangle x1="0.9525" y1="13.6525" x2="2.2225" y2="15.5575" layer="16"/>
<wire x1="4.7625" y1="12.7" x2="4.7625" y2="0.635" width="0" layer="20"/>
<wire x1="4.7625" y1="0.635" x2="5.3975" y2="0" width="0" layer="20" curve="90"/>
<wire x1="5.3975" y1="0" x2="47.53" y2="0" width="0" layer="20"/>
<wire x1="47.53" y1="0" x2="49.53" y2="2" width="0" layer="20" curve="90"/>
<wire x1="49.53" y1="2" x2="49.53" y2="30.385" width="0" layer="20"/>
<wire x1="49.53" y1="30.385" x2="47.53" y2="32.385" width="0" layer="20" curve="90"/>
<wire x1="47.53" y1="32.385" x2="2" y2="32.385" width="0" layer="20"/>
<wire x1="2" y1="32.385" x2="0" y2="30.385" width="0" layer="20" curve="90"/>
<wire x1="0" y1="30.385" x2="0" y2="13.97" width="0" layer="20"/>
<wire x1="0" y1="13.97" x2="0.635" y2="13.335" width="0" layer="20" curve="90"/>
<wire x1="0.635" y1="13.335" x2="4.1275" y2="13.335" width="0" layer="20"/>
<wire x1="4.1275" y1="13.335" x2="4.7625" y2="12.7" width="0" layer="20" curve="-90"/>
<hole x="6.0325" y="1.27" drill="1"/>
<hole x="6.0325" y="6.0325" drill="1"/>
<hole x="6.0325" y="10.4775" drill="1"/>
<hole x="11.1125" y="29.5275" drill="3.2"/>
<hole x="11.1125" y="2.8575" drill="3.2"/>
<text x="17.145" y="24.765" size="4.2" layer="25">WaterCtrl</text>
<text x="17.145" y="19.3675" size="1.7" layer="25">MoistureMeasure v1.1</text>
<text x="17.145" y="22.225" size="1.17" layer="25">github.com/janhieber/WaterCtrl</text>
<text x="0.3175" y="15.875" size="1.27" layer="25">GND</text>
<text x="0.9525" y="15.875" size="1.27" layer="26" rot="MR90">UB</text>
<text x="2.8575" y="15.875" size="1.27" layer="26" rot="MR90">SEN</text>
<rectangle x1="1.27" y1="13.6525" x2="3.81" y2="15.5575" layer="1"/>
</plain>
<libraries>
<library name="74xx-eu">
<packages>
<package name="SO14">
<description>Small Outline package 150 mil</description>
<wire x1="4.064" y1="1.9558" x2="-4.064" y2="1.9558" width="0.1524" layer="51"/>
<wire x1="4.064" y1="-1.9558" x2="4.445" y2="-1.5748" width="0.1524" layer="21" curve="90" cap="flat"/>
<wire x1="-4.445" y1="1.5748" x2="-4.064" y2="1.9558" width="0.1524" layer="21" curve="-90" cap="flat"/>
<wire x1="4.064" y1="1.9558" x2="4.445" y2="1.5748" width="0.1524" layer="21" curve="-90" cap="flat"/>
<wire x1="-4.445" y1="-1.5748" x2="-4.064" y2="-1.9558" width="0.1524" layer="21" curve="90" cap="flat"/>
<wire x1="-4.064" y1="-1.9558" x2="4.064" y2="-1.9558" width="0.1524" layer="51"/>
<wire x1="4.445" y1="-1.5748" x2="4.445" y2="1.5748" width="0.1524" layer="21"/>
<wire x1="-4.445" y1="1.5748" x2="-4.445" y2="-1.5748" width="0.1524" layer="21"/>
<wire x1="-4.445" y1="0.508" x2="-4.445" y2="-0.508" width="0.1524" layer="21" curve="-180"/>
<wire x1="-4.445" y1="-1.6002" x2="4.445" y2="-1.6002" width="0.0508" layer="21"/>
<smd name="1" x="-3.81" y="-3.0734" dx="0.6604" dy="2.032" layer="1"/>
<smd name="14" x="-3.81" y="3.0734" dx="0.6604" dy="2.032" layer="1"/>
<smd name="2" x="-2.54" y="-3.0734" dx="0.6604" dy="2.032" layer="1"/>
<smd name="3" x="-1.27" y="-3.0734" dx="0.6604" dy="2.032" layer="1"/>
<smd name="13" x="-2.54" y="3.0734" dx="0.6604" dy="2.032" layer="1"/>
<smd name="12" x="-1.27" y="3.0734" dx="0.6604" dy="2.032" layer="1"/>
<smd name="4" x="0" y="-3.0734" dx="0.6604" dy="2.032" layer="1"/>
<smd name="11" x="0" y="3.0734" dx="0.6604" dy="2.032" layer="1"/>
<smd name="5" x="1.27" y="-3.0734" dx="0.6604" dy="2.032" layer="1"/>
<smd name="6" x="2.54" y="-3.0734" dx="0.6604" dy="2.032" layer="1"/>
<smd name="10" x="1.27" y="3.0734" dx="0.6604" dy="2.032" layer="1"/>
<smd name="9" x="2.54" y="3.0734" dx="0.6604" dy="2.032" layer="1"/>
<smd name="7" x="3.81" y="-3.0734" dx="0.6604" dy="2.032" layer="1"/>
<smd name="8" x="3.81" y="3.0734" dx="0.6604" dy="2.032" layer="1"/>
<text x="-3.175" y="-0.762" size="1.27" layer="27" ratio="10">>VALUE</text>
<text x="-4.826" y="-1.905" size="1.27" layer="25" ratio="10" rot="R90">>NAME</text>
<rectangle x1="-0.254" y1="1.9558" x2="0.254" y2="3.0988" layer="51"/>
<rectangle x1="-4.064" y1="-3.0988" x2="-3.556" y2="-1.9558" layer="51"/>
<rectangle x1="-2.794" y1="-3.0988" x2="-2.286" y2="-1.9558" layer="51"/>
<rectangle x1="-1.524" y1="-3.0734" x2="-1.016" y2="-1.9304" layer="51"/>
<rectangle x1="-0.254" y1="-3.0988" x2="0.254" y2="-1.9558" layer="51"/>
<rectangle x1="-1.524" y1="1.9558" x2="-1.016" y2="3.0988" layer="51"/>
<rectangle x1="-2.794" y1="1.9558" x2="-2.286" y2="3.0988" layer="51"/>
<rectangle x1="-4.064" y1="1.9558" x2="-3.556" y2="3.0988" layer="51"/>
<rectangle x1="1.016" y1="1.9558" x2="1.524" y2="3.0988" layer="51"/>
<rectangle x1="2.286" y1="1.9558" x2="2.794" y2="3.0988" layer="51"/>
<rectangle x1="3.556" y1="1.9558" x2="4.064" y2="3.0988" layer="51"/>
<rectangle x1="1.016" y1="-3.0988" x2="1.524" y2="-1.9558" layer="51"/>
<rectangle x1="2.286" y1="-3.0988" x2="2.794" y2="-1.9558" layer="51"/>
<rectangle x1="3.556" y1="-3.0988" x2="4.064" y2="-1.9558" layer="51"/>
</package>
</packages>
</library>
<library name="diode">
<packages>
<package name="SOD80C">
<description>DIODE</description>
<wire x1="1.3208" y1="0.7874" x2="-1.3208" y2="0.7874" width="0.1524" layer="51"/>
<wire x1="1.3208" y1="-0.7874" x2="-1.3208" y2="-0.7874" width="0.1524" layer="51"/>
<wire x1="0.627" y1="0.6" x2="-0.373" y2="0" width="0.2032" layer="21"/>
<wire x1="-0.373" y1="0" x2="0.627" y2="-0.6" width="0.2032" layer="21"/>
<wire x1="0.627" y1="-0.6" x2="0.627" y2="0.6" width="0.2032" layer="21"/>
<smd name="C" x="-1.7" y="0" dx="1.4" dy="1.8" layer="1"/>
<smd name="A" x="1.7" y="0" dx="1.4" dy="1.8" layer="1"/>
<text x="-1.524" y="1.143" size="1.27" layer="25">>NAME</text>
<text x="-1.524" y="-2.413" size="1.27" layer="27">>VALUE</text>
<rectangle x1="-1.8542" y1="-0.8636" x2="-1.2954" y2="0.8636" layer="51"/>
<rectangle x1="1.2954" y1="-0.8636" x2="1.8542" y2="0.8636" layer="51"/>
<rectangle x1="-0.8636" y1="-0.7874" x2="-0.254" y2="0.7874" layer="21"/>
</package>
</packages>
</library>
<library name="transistor-npn">
<packages>
<package name="SOT23">
<description>SOT-23</description>
<wire x1="1.4224" y1="0.6604" x2="1.4224" y2="-0.6604" width="0.1524" layer="51"/>
<wire x1="1.4224" y1="-0.6604" x2="-1.4224" y2="-0.6604" width="0.1524" layer="51"/>
<wire x1="-1.4224" y1="-0.6604" x2="-1.4224" y2="0.6604" width="0.1524" layer="51"/>
<wire x1="-1.4224" y1="0.6604" x2="1.4224" y2="0.6604" width="0.1524" layer="51"/>
<smd name="3" x="0" y="1.1" dx="1" dy="1.4" layer="1"/>
<smd name="2" x="0.95" y="-1.1" dx="1" dy="1.4" layer="1"/>
<smd name="1" x="-0.95" y="-1.1" dx="1" dy="1.4" layer="1"/>
<text x="-1.905" y="1.905" size="1.27" layer="25">>NAME</text>
<text x="-1.905" y="-3.175" size="1.27" layer="27">>VALUE</text>
<rectangle x1="-0.2286" y1="0.7112" x2="0.2286" y2="1.2954" layer="51"/>
<rectangle x1="0.7112" y1="-1.2954" x2="1.1684" y2="-0.7112" layer="51"/>
<rectangle x1="-1.1684" y1="-1.2954" x2="-0.7112" y2="-0.7112" layer="51"/>
</package>
</packages>
</library>
<library name="rcl">
<packages>
<package name="R0805">
<description>RESISTOR

chip</description>
<wire x1="-0.41" y1="0.635" x2="0.41" y2="0.635" width="0.1524" layer="51"/>
<wire x1="-0.41" y1="-0.635" x2="0.41" y2="-0.635" width="0.1524" layer="51"/>
<wire x1="-1.973" y1="0.983" x2="1.973" y2="0.983" width="0.0508" layer="39"/>
<wire x1="1.973" y1="0.983" x2="1.973" y2="-0.983" width="0.0508" layer="39"/>
<wire x1="1.973" y1="-0.983" x2="-1.973" y2="-0.983" width="0.0508" layer="39"/>
<wire x1="-1.973" y1="-0.983" x2="-1.973" y2="0.983" width="0.0508" layer="39"/>
<smd name="1" x="-0.85" y="0" dx="1.3" dy="1.5" layer="1"/>
<smd name="2" x="0.85" y="0" dx="1.3" dy="1.5" layer="1"/>
<text x="-0.762" y="1.016" size="1.27" layer="25">>NAME</text>
<text x="-0.762" y="-2.286" size="1.27" layer="27">>VALUE</text>
<rectangle x1="0.4064" y1="-0.6985" x2="1.0564" y2="0.7015" layer="51"/>
<rectangle x1="-1.0668" y1="-0.6985" x2="-0.4168" y2="0.7015" layer="51"/>
<rectangle x1="-0.1999" y1="-0.5001" x2="0.1999" y2="0.5001" layer="35"/>
</package>
<package name="A/3216-18W">
<description>Chip Capacitor Type KEMET A / EIA 3216-18 Wave solder

KEMET S / EIA 3216-12</description>
<wire x1="-1.45" y1="0.6" x2="1.45" y2="0.6" width="0.1016" layer="51"/>
<wire x1="1.45" y1="0.6" x2="1.45" y2="-0.6" width="0.1016" layer="51"/>
<wire x1="1.45" y1="-0.6" x2="-1.45" y2="-0.6" width="0.1016" layer="51"/>
<wire x1="-1.45" y1="-0.6" x2="-1.45" y2="0.6" width="0.1016" layer="51"/>
<smd name="+" x="1.475" y="0" dx="2.15" dy="1.8" layer="1"/>
<smd name="-" x="-1.475" y="0" dx="2.15" dy="1.8" layer="1"/>
<text x="-1.95" y="1" size="1.27" layer="25">>NAME</text>
<text x="-1.95" y="-2.325" size="1.27" layer="27">>VALUE</text>
<rectangle x1="-1.6" y1="-0.6" x2="-1.475" y2="0.6" layer="51"/>
<rectangle x1="1.475" y1="-0.6" x2="1.6" y2="0.6" layer="51"/>
<rectangle x1="0.8" y1="-0.625" x2="1.1" y2="0.625" layer="51"/>
</package>
<package name="C0805">
<description>CAPACITOR
</description>
<wire x1="-1.973" y1="0.983" x2="1.973" y2="0.983" width="0.0508" layer="39"/>
<wire x1="1.973" y1="-0.983" x2="-1.973" y2="-0.983" width="0.0508" layer="39"/>
<wire x1="-1.973" y1="-0.983" x2="-1.973" y2="0.983" width="0.0508" layer="39"/>
<wire x1="-0.381" y1="0.66" x2="0.381" y2="0.66" width="0.1016" layer="51"/>
<wire x1="-0.356" y1="-0.66" x2="0.381" y2="-0.66" width="0.1016" layer="51"/>
<wire x1="1.973" y1="0.983" x2="1.973" y2="-0.983" width="0.0508" layer="39"/>
<smd name="1" x="-0.95" y="0" dx="1.3" dy="1.5" layer="1"/>
<smd name="2" x="0.95" y="0" dx="1.3" dy="1.5" layer="1"/>
<text x="-1.27" y="1.27" size="1.27" layer="25">>NAME</text>
<text x="-1.27" y="-2.54" size="1.27" layer="27">>VALUE</text>
<rectangle x1="-1.0922" y1="-0.7239" x2="-0.3421" y2="0.7262" layer="51"/>
<rectangle x1="0.3556" y1="-0.7239" x2="1.1057" y2="0.7262" layer="51"/>
<rectangle x1="-0.1001" y1="-0.4001" x2="0.1001" y2="0.4001" layer="35"/>
</package>
</packages>
</library>
</libraries>
<attributes>
</attributes>
<variantdefs>
</variantdefs>
<classes>
<class number="0" name="default" width="0" drill="0">
</class>
</classes>
<designrules name="default">
<description language="de">EAGLE Design Rules

Die Standard-Design-Rules sind so gewählt, dass sie für
die meisten Anwendungen passen. Sollte ihre Platine
besondere Anforderungen haben, treffen Sie die erforderlichen
Einstellungen hier und speichern die Design Rules unter
einem neuen Namen ab.</description>
<description language="en">EAGLE Design Rules

The default Design Rules have been set to cover
a wide range of applications. Your particular design
may have different requirements, so please make the
necessary adjustments and save your customized
design rules under a new name.</description>
<param name="layerSetup" value="(1*16)"/>
<param name="mtCopper" value="0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm"/>
<param name="mtIsolate" value="1.5mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm"/>
<param name="mdWireWire" value="8mil"/>
<param name="mdWirePad" value="8mil"/>
<param name="mdWireVia" value="8mil"/>
<param name="mdPadPad" value="8mil"/>
<param name="mdPadVia" value="8mil"/>
<param name="mdViaVia" value="8mil"/>
<param name="mdSmdPad" value="8mil"/>
<param name="mdSmdVia" value="8mil"/>
<param name="mdSmdSmd" value="8mil"/>
<param name="mdViaViaSameLayer" value="8mil"/>
<param name="mnLayersViaInSmd" value="2"/>
<param name="mdCopperDimension" value="40mil"/>
<param name="mdDrill" value="8mil"/>
<param name="mdSmdStop" value="0mil"/>
<param name="msWidth" value="10mil"/>
<param name="msDrill" value="24mil"/>
<param name="msMicroVia" value="9.99mm"/>
<param name="msBlindViaRatio" value="0.5"/>
<param name="rvPadTop" value="0.25"/>
<param name="rvPadInner" value="0.25"/>
<param name="rvPadBottom" value="0.25"/>
<param name="rvViaOuter" value="0.25"/>
<param name="rvViaInner" value="0.25"/>
<param name="rvMicroViaOuter" value="0.25"/>
<param name="rvMicroViaInner" value="0.25"/>
<param name="rlMinPadTop" value="10mil"/>
<param name="rlMaxPadTop" value="20mil"/>
<param name="rlMinPadInner" value="10mil"/>
<param name="rlMaxPadInner" value="20mil"/>
<param name="rlMinPadBottom" value="10mil"/>
<param name="rlMaxPadBottom" value="20mil"/>
<param name="rlMinViaOuter" value="8mil"/>
<param name="rlMaxViaOuter" value="20mil"/>
<param name="rlMinViaInner" value="8mil"/>
<param name="rlMaxViaInner" value="20mil"/>
<param name="rlMinMicroViaOuter" value="4mil"/>
<param name="rlMaxMicroViaOuter" value="20mil"/>
<param name="rlMinMicroViaInner" value="4mil"/>
<param name="rlMaxMicroViaInner" value="20mil"/>
<param name="psTop" value="-1"/>
<param name="psBottom" value="-1"/>
<param name="psFirst" value="-1"/>
<param name="psElongationLong" value="100"/>
<param name="psElongationOffset" value="100"/>
<param name="mvStopFrame" value="1"/>
<param name="mvCreamFrame" value="0"/>
<param name="mlMinStopFrame" value="4mil"/>
<param name="mlMaxStopFrame" value="4mil"/>
<param name="mlMinCreamFrame" value="0mil"/>
<param name="mlMaxCreamFrame" value="0mil"/>
<param name="mlViaStopLimit" value="0mil"/>
<param name="srRoundness" value="0"/>
<param name="srMinRoundness" value="0mil"/>
<param name="srMaxRoundness" value="0mil"/>
<param name="slThermalIsolate" value="10mil"/>
<param name="slThermalsForVias" value="0"/>
<param name="dpMaxLengthDifference" value="10mm"/>
<param name="dpGapFactor" value="2.5"/>
<param name="checkGrid" value="0"/>
<param name="checkAngle" value="0"/>
<param name="checkFont" value="1"/>
<param name="checkRestrict" value="1"/>
<param name="useDiameter" value="13"/>
<param name="maxErrors" value="50"/>
</designrules>
<autorouter>
<pass name="Default">
<param name="RoutingGrid" value="50mil"/>
<param name="AutoGrid" value="1"/>
<param name="Efforts" value="0"/>
<param name="TopRouterVariant" value="1"/>
<param name="tpViaShape" value="round"/>
<param name="PrefDir.1" value="|"/>
<param name="PrefDir.2" value="0"/>
<param name="PrefDir.3" value="0"/>
<param name="PrefDir.4" value="0"/>
<param name="PrefDir.5" value="0"/>
<param name="PrefDir.6" value="0"/>
<param name="PrefDir.7" value="0"/>
<param name="PrefDir.8" value="0"/>
<param name="PrefDir.9" value="0"/>
<param name="PrefDir.10" value="0"/>
<param name="PrefDir.11" value="0"/>
<param name="PrefDir.12" value="0"/>
<param name="PrefDir.13" value="0"/>
<param name="PrefDir.14" value="0"/>
<param name="PrefDir.15" value="0"/>
<param name="PrefDir.16" value="-"/>
<param name="cfVia" value="8"/>
<param name="cfNonPref" value="5"/>
<param name="cfChangeDir" value="2"/>
<param name="cfOrthStep" value="2"/>
<param name="cfDiagStep" value="3"/>
<param name="cfExtdStep" value="0"/>
<param name="cfBonusStep" value="1"/>
<param name="cfMalusStep" value="1"/>
<param name="cfPadImpact" value="4"/>
<param name="cfSmdImpact" value="4"/>
<param name="cfBusImpact" value="0"/>
<param name="cfHugging" value="3"/>
<param name="cfAvoid" value="4"/>
<param name="cfPolygon" value="10"/>
<param name="cfBase.1" value="0"/>
<param name="cfBase.2" value="1"/>
<param name="cfBase.3" value="1"/>
<param name="cfBase.4" value="1"/>
<param name="cfBase.5" value="1"/>
<param name="cfBase.6" value="1"/>
<param name="cfBase.7" value="1"/>
<param name="cfBase.8" value="1"/>
<param name="cfBase.9" value="1"/>
<param name="cfBase.10" value="1"/>
<param name="cfBase.11" value="1"/>
<param name="cfBase.12" value="1"/>
<param name="cfBase.13" value="1"/>
<param name="cfBase.14" value="1"/>
<param name="cfBase.15" value="1"/>
<param name="cfBase.16" value="0"/>
<param name="mnVias" value="20"/>
<param name="mnSegments" value="9999"/>
<param name="mnExtdSteps" value="9999"/>
<param name="mnRipupLevel" value="10"/>
<param name="mnRipupSteps" value="100"/>
<param name="mnRipupTotal" value="100"/>
</pass>
<pass name="Follow-me" refer="Default" active="yes">
</pass>
<pass name="Busses" refer="Default" active="yes">
<param name="cfNonPref" value="4"/>
<param name="cfBusImpact" value="4"/>
<param name="cfHugging" value="0"/>
<param name="mnVias" value="0"/>
</pass>
<pass name="Route" refer="Default" active="yes">
</pass>
<pass name="Optimize1" refer="Default" active="yes">
<param name="cfVia" value="99"/>
<param name="cfExtdStep" value="10"/>
<param name="cfHugging" value="1"/>
<param name="mnExtdSteps" value="1"/>
<param name="mnRipupLevel" value="0"/>
</pass>
<pass name="Optimize2" refer="Optimize1" active="yes">
<param name="cfNonPref" value="0"/>
<param name="cfChangeDir" value="6"/>
<param name="cfExtdStep" value="0"/>
<param name="cfBonusStep" value="2"/>
<param name="cfMalusStep" value="2"/>
<param name="cfPadImpact" value="2"/>
<param name="cfSmdImpact" value="2"/>
<param name="cfHugging" value="0"/>
</pass>
<pass name="Optimize3" refer="Optimize2" active="yes">
<param name="cfChangeDir" value="8"/>
<param name="cfPadImpact" value="0"/>
<param name="cfSmdImpact" value="0"/>
</pass>
<pass name="Optimize4" refer="Optimize3" active="yes">
<param name="cfChangeDir" value="25"/>
</pass>
</autorouter>
<elements>
<element name="IC1" library="74xx-eu" package="SO14" value="74HC14D" x="8.89" y="19.3675" smashed="yes">
<attribute name="VALUE" x="5.715" y="18.6055" size="1.27" layer="27" ratio="10"/>
<attribute name="NAME" x="9.8425" y="18.161" size="1.27" layer="25" ratio="10"/>
</element>
<element name="D1" library="diode" package="SOD80C" value="5.6V" x="3.175" y="24.4475" smashed="yes" rot="R270">
<attribute name="NAME" x="4.318" y="26.6065" size="1.27" layer="25" rot="R270"/>
<attribute name="VALUE" x="0.762" y="25.9715" size="1.27" layer="27" rot="R270"/>
</element>
<element name="Q1" library="transistor-npn" package="SOT23" value="BC847BSMD" x="6.985" y="29.5275" smashed="yes">
<attribute name="NAME" x="6.985" y="26.3525" size="1.27" layer="25"/>
<attribute name="VALUE" x="5.08" y="26.3525" size="1.27" layer="27"/>
</element>
<element name="R1" library="rcl" package="R0805" value="1k" x="3.4925" y="29.5275" rot="R90"/>
<element name="R2" library="rcl" package="R0805" value="ca 100k" x="8.255" y="25.0825" smashed="yes" rot="R180">
<attribute name="NAME" x="12.5095" y="25.654" size="1.27" layer="25" rot="R180"/>
<attribute name="VALUE" x="9.017" y="27.3685" size="1.27" layer="27" rot="R180"/>
</element>
<element name="R3" library="rcl" package="R0805" value="100" x="6.0325" y="19.05" smashed="yes" rot="MR180">
<attribute name="NAME" x="4.6355" y="21.209" size="1.27" layer="26" rot="MR180"/>
<attribute name="VALUE" x="5.2705" y="21.336" size="1.27" layer="28" rot="MR180"/>
</element>
<element name="C1" library="rcl" package="A/3216-18W" value="10u/10V" x="12.065" y="11.7475" smashed="yes" rot="R270">
<attribute name="NAME" x="11.4775" y="9.2525" size="1.27" layer="25" rot="R270"/>
<attribute name="VALUE" x="9.74" y="13.6975" size="1.27" layer="27" rot="R270"/>
</element>
<element name="C2" library="rcl" package="C0805" value="100n" x="9.8425" y="12.7" smashed="yes" rot="R90">
<attribute name="NAME" x="10.4775" y="8.5725" size="1.27" layer="25" rot="R90"/>
<attribute name="VALUE" x="12.3825" y="11.43" size="1.27" layer="27" rot="R90"/>
</element>
</elements>
<signals>
<signal name="5VDC">
<contactref element="Q1" pad="3"/>
<contactref element="R1" pad="2"/>
<wire x1="3.4925" y1="30.3775" x2="6.735" y2="30.3775" width="0.4064" layer="1"/>
<wire x1="6.735" y1="30.3775" x2="6.985" y2="30.6275" width="0.4064" layer="1"/>
<wire x1="6.985" y1="30.6275" x2="6.985" y2="30.1625" width="0.4064" layer="1"/>
<wire x1="1.5875" y1="20.6375" x2="1.5875" y2="14.9225" width="0.6096" layer="16"/>
<wire x1="1.5875" y1="20.6375" x2="1.5875" y2="29.21" width="0.6096" layer="1"/>
<wire x1="1.5875" y1="29.21" x2="2.8575" y2="30.48" width="0.6096" layer="1"/>
<wire x1="2.8575" y1="30.48" x2="3.39" y2="30.48" width="0.4064" layer="1"/>
<wire x1="3.39" y1="30.48" x2="3.4925" y2="30.3775" width="0.4064" layer="1"/>
<via x="1.5875" y="20.6375" extent="1-16" drill="0.6"/>
</signal>
<signal name="N$2">
<contactref element="R1" pad="1"/>
<contactref element="Q1" pad="1"/>
<contactref element="D1" pad="C"/>
<wire x1="6.035" y1="28.4275" x2="3.7425" y2="28.4275" width="0.4064" layer="1"/>
<wire x1="3.7425" y1="28.4275" x2="3.4925" y2="28.6775" width="0.4064" layer="1"/>
<wire x1="3.7425" y1="28.4275" x2="3.7425" y2="26.715" width="0.4064" layer="1"/>
<wire x1="3.7425" y1="26.715" x2="3.175" y2="26.1475" width="0.4064" layer="1"/>
</signal>
<signal name="N$3">
<contactref element="Q1" pad="2"/>
<contactref element="C1" pad="+"/>
<contactref element="IC1" pad="14"/>
<contactref element="C2" pad="1"/>
<wire x1="5.08" y1="22.4409" x2="5.08" y2="25.5725" width="0.4064" layer="1"/>
<wire x1="5.08" y1="25.5725" x2="7.935" y2="28.4275" width="0.4064" layer="1"/>
<wire x1="5.08" y1="22.4409" x2="5.08" y2="20.0025" width="0.4064" layer="1"/>
<wire x1="5.08" y1="20.0025" x2="6.985" y2="18.0975" width="0.4064" layer="1"/>
<wire x1="6.985" y1="18.0975" x2="13.335" y2="18.0975" width="0.4064" layer="1"/>
<wire x1="13.335" y1="18.0975" x2="13.6525" y2="17.78" width="0.4064" layer="1"/>
<wire x1="13.6525" y1="17.78" x2="13.6525" y2="11.1125" width="0.4064" layer="1"/>
<wire x1="13.6525" y1="11.1125" x2="12.7" y2="10.16" width="0.4064" layer="1"/>
<wire x1="9.8425" y1="11.75" x2="11.32" y2="10.2725" width="0.4064" layer="1"/>
<wire x1="11.32" y1="10.2725" x2="12.065" y2="10.2725" width="0.4064" layer="1"/>
<wire x1="12.065" y1="10.2725" x2="12.7" y2="10.16" width="0" layer="19" extent="1-1"/>
</signal>
<signal name="N$5">
<contactref element="IC1" pad="2"/>
<contactref element="IC1" pad="3"/>
<wire x1="6.35" y1="16.2941" x2="7.62" y2="16.2941" width="0.4064" layer="1"/>
</signal>
<signal name="N$6">
<contactref element="IC1" pad="4"/>
<contactref element="IC1" pad="5"/>
<wire x1="8.89" y1="16.2941" x2="10.16" y2="16.2941" width="0.4064" layer="1"/>
</signal>
<signal name="GND">
<contactref element="D1" pad="A"/>
<contactref element="IC1" pad="7"/>
<contactref element="C1" pad="-"/>
<contactref element="IC1" pad="1"/>
<contactref element="C2" pad="2"/>
<wire x1="3.175" y1="22.7475" x2="3.175" y2="19.1516" width="0.6096" layer="1"/>
<wire x1="3.175" y1="19.1516" x2="5.08" y2="17.145" width="0.6096" layer="1"/>
<wire x1="5.08" y1="17.145" x2="5.08" y2="16.2941" width="0.6096" layer="1"/>
<wire x1="3.175" y1="19.1516" x2="2.54" y2="18.5166" width="0.6096" layer="1"/>
<wire x1="2.54" y1="18.5166" x2="2.54" y2="14.9225" width="0.6096" layer="1"/>
<wire x1="12.7" y1="16.2941" x2="12.7" y2="13.2225" width="0.4064" layer="1"/>
<wire x1="12.7" y1="13.2225" x2="12.065" y2="13.2225" width="0.4064" layer="1"/>
<wire x1="12.065" y1="13.2225" x2="12.065" y2="13.65" width="0.4064" layer="1"/>
<wire x1="12.065" y1="13.65" x2="9.8425" y2="13.65" width="0.4064" layer="1"/>
<wire x1="9.8425" y1="13.65" x2="6.035" y2="13.65" width="0.4064" layer="1"/>
<wire x1="6.035" y1="13.65" x2="5.08" y2="14.605" width="0.4064" layer="1"/>
<wire x1="5.08" y1="14.605" x2="5.08" y2="16.2941" width="0.4064" layer="1"/>
</signal>
<signal name="C1">
<contactref element="R2" pad="2"/>
<contactref element="IC1" pad="13"/>
<via x="28.575" y="24.13" extent="1-16" drill="0.6"/>
<via x="16.51" y="29.5275" extent="1-16" drill="0.6"/>
<via x="22.5425" y="29.5275" extent="1-16" drill="0.6"/>
<via x="16.51" y="24.13" extent="1-16" drill="0.6"/>
<via x="22.5425" y="24.13" extent="1-16" drill="0.6"/>
<via x="16.51" y="18.7325" extent="1-16" drill="0.6"/>
<via x="22.5425" y="18.7325" extent="1-16" drill="0.6"/>
<via x="34.6075" y="24.13" extent="1-16" drill="0.6"/>
<via x="28.575" y="18.7325" extent="1-16" drill="0.6"/>
<via x="40.64" y="24.13" extent="1-16" drill="0.6"/>
<via x="40.64" y="18.7325" extent="1-16" drill="0.6"/>
<via x="34.6075" y="18.7325" extent="1-16" drill="0.6"/>
<via x="28.575" y="29.5275" extent="1-16" drill="0.6"/>
<via x="34.6075" y="29.5275" extent="1-16" drill="0.6"/>
<via x="40.64" y="29.5275" extent="1-16" drill="0.6"/>
<via x="46.6725" y="29.5275" extent="1-16" drill="0.6"/>
<via x="46.6725" y="24.13" extent="1-16" drill="0.6"/>
<via x="46.6725" y="18.7325" extent="1-16" drill="0.6"/>
<wire x1="7.405" y1="25.0825" x2="7.405" y2="25.82" width="0.6096" layer="1"/>
<wire x1="7.405" y1="25.82" x2="8.255" y2="26.67" width="0.6096" layer="1"/>
<wire x1="8.255" y1="26.67" x2="16.1925" y2="26.67" width="0.6096" layer="1"/>
<wire x1="16.1925" y1="26.67" x2="16.51" y2="26.3525" width="0.6096" layer="1"/>
<wire x1="16.51" y1="26.3525" x2="16.51" y2="24.13" width="0.6096" layer="1"/>
<polygon width="0.254" layer="1" isolate="0.254">
<vertex x="14.605" y="31.75"/>
<vertex x="46.895" y="31.75" curve="-90"/>
<vertex x="48.895" y="29.75"/>
<vertex x="48.895" y="16.8275"/>
<vertex x="14.605" y="16.8275"/>
</polygon>
<polygon width="0.254" layer="16" isolate="0.254">
<vertex x="14.605" y="31.75"/>
<vertex x="46.895" y="31.75" curve="-90"/>
<vertex x="48.895" y="29.75"/>
<vertex x="48.895" y="16.8275"/>
<vertex x="14.605" y="16.8275"/>
</polygon>
<wire x1="7.405" y1="25.0825" x2="6.35" y2="24.0275" width="0.6096" layer="1"/>
<wire x1="6.35" y1="24.0275" x2="6.35" y2="22.4409" width="0.6096" layer="1"/>
</signal>
<signal name="N$8">
<contactref element="R2" pad="1"/>
<contactref element="IC1" pad="12"/>
<contactref element="IC1" pad="11"/>
<wire x1="8.89" y1="22.4409" x2="7.62" y2="22.4409" width="0.4064" layer="1"/>
<wire x1="8.89" y1="22.4409" x2="8.7875" y2="22.5434" width="0.4064" layer="1"/>
<wire x1="9.105" y1="25.0825" x2="8.89" y2="24.8675" width="0.4064" layer="1"/>
<wire x1="8.89" y1="24.8675" x2="8.89" y2="22.4409" width="0.4064" layer="1"/>
</signal>
<signal name="C2">
<contactref element="IC1" pad="10"/>
<contactref element="IC1" pad="9"/>
<wire x1="11.43" y1="22.4409" x2="10.16" y2="22.4409" width="0.4064" layer="1"/>
<via x="16.51" y="13.6525" extent="1-16" drill="0.6"/>
<via x="22.5425" y="13.6525" extent="1-16" drill="0.6"/>
<wire x1="10.16" y1="22.225" x2="10.16" y2="20.32" width="0.6096" layer="1"/>
<wire x1="10.16" y1="20.32" x2="12.7" y2="17.78" width="0.6096" layer="16"/>
<via x="10.16" y="20.32" extent="1-16" drill="0.6"/>
<wire x1="12.7" y1="17.78" x2="12.7" y2="16.1925" width="0.6096" layer="16"/>
<wire x1="12.7" y1="16.1925" x2="14.605" y2="14.2875" width="0.6096" layer="16"/>
<wire x1="14.605" y1="14.2875" x2="16.51" y2="13.97" width="0.6096" layer="16"/>
<via x="28.575" y="13.6525" extent="1-16" drill="0.6"/>
<via x="34.6075" y="13.6525" extent="1-16" drill="0.6"/>
<via x="40.64" y="13.6525" extent="1-16" drill="0.6"/>
<via x="46.6725" y="13.6525" extent="1-16" drill="0.6"/>
<via x="16.51" y="8.255" extent="1-16" drill="0.6"/>
<via x="22.5425" y="8.255" extent="1-16" drill="0.6"/>
<via x="28.575" y="8.255" extent="1-16" drill="0.6"/>
<via x="34.6075" y="8.255" extent="1-16" drill="0.6"/>
<via x="40.64" y="8.255" extent="1-16" drill="0.6"/>
<via x="46.6725" y="8.255" extent="1-16" drill="0.6"/>
<via x="16.51" y="2.8575" extent="1-16" drill="0.6"/>
<via x="22.5425" y="2.8575" extent="1-16" drill="0.6"/>
<via x="28.575" y="2.8575" extent="1-16" drill="0.6"/>
<via x="34.6075" y="2.8575" extent="1-16" drill="0.6"/>
<via x="40.64" y="2.8575" extent="1-16" drill="0.6"/>
<via x="46.6725" y="2.8575" extent="1-16" drill="0.6"/>
<polygon width="0.254" layer="16" isolate="0.254">
<vertex x="14.605" y="15.5575"/>
<vertex x="48.895" y="15.5575"/>
<vertex x="48.895" y="2.635" curve="-90"/>
<vertex x="46.895" y="0.635"/>
<vertex x="14.605" y="0.635"/>
</polygon>
<polygon width="0.254" layer="1" isolate="0.254">
<vertex x="14.605" y="15.5575"/>
<vertex x="48.895" y="15.5575"/>
<vertex x="48.895" y="2.635" curve="-90"/>
<vertex x="46.895" y="0.635"/>
<vertex x="14.605" y="0.635"/>
</polygon>
<wire x1="10.16" y1="22.225" x2="10.16" y2="22.4409" width="0" layer="19" extent="1-1"/>
</signal>
<signal name="N$10">
<contactref element="IC1" pad="8"/>
<contactref element="R3" pad="2"/>
<wire x1="12.7" y1="22.4409" x2="12.7" y2="20.6375" width="0.4064" layer="1"/>
<wire x1="12.7" y1="20.6375" x2="11.1125" y2="19.05" width="0.4064" layer="1"/>
<wire x1="11.1125" y1="19.05" x2="8.255" y2="19.05" width="0.4064" layer="1"/>
<via x="8.255" y="19.05" extent="1-16" drill="0.6"/>
<wire x1="8.255" y1="19.05" x2="6.8825" y2="19.05" width="0.4064" layer="16"/>
</signal>
<signal name="SEN">
<contactref element="R3" pad="1"/>
<wire x1="5.1825" y1="19.05" x2="5.08" y2="19.05" width="0.4064" layer="16"/>
<wire x1="5.08" y1="19.05" x2="3.4925" y2="17.4625" width="0.4064" layer="16"/>
<wire x1="3.4925" y1="17.4625" x2="3.4925" y2="15.24" width="0.4064" layer="16"/>
</signal>
<signal name="N$1">
</signal>
<signal name="N$4">
</signal>
<signal name="N$11">
<wire x1="9.2075" y1="25.0825" x2="8.89" y2="24.765" width="0.4064" layer="1"/>
</signal>
</signals>
</board>
</drawing>
</eagle>

repository: janhieber/WaterCtrl

repo_name: janhieber/WaterCtrl


text:
using System.Linq;
using commercetools.Sdk.Domain.Query;

namespace commercetools.Sdk.Client
{
    using System.Collections.Generic;
    using Domain;

    public class QueryCommand<T> : Command<PagedQueryResult<T>>
    {
        public QueryCommand()
        {
            this.Sort = new List<string>();
            this.Expand = new List<string>();
            this.Where = new List<string>();
        }

        public QueryCommand(IAdditionalParameters<T> additionalParameters)
        {
            this.Sort = new List<string>();
            this.Expand = new List<string>();
            this.Where = new List<string>();
            this.AdditionalParameters = additionalParameters;
        }

        public List<string> Expand { get; }

        public int? Limit { get; set; }

        public int? Offset { get; set; }

        public override System.Type ResourceType => typeof(T);

        public List<string> Sort { get; }

        public List<string> Where { get; }

        public void SetExpand(IEnumerable<Expansion<T>> expandPredicates)
        {
            if (expandPredicates == null)
            {
                return;
            }

            this.SetExpand(expandPredicates.Select(predicate => predicate.ToString()));
        }

        public void SetExpand(IEnumerable<string> expandPredicates)
        {
            if (expandPredicates == null)
            {
                return;
            }

            this.Expand.Clear();
            foreach (var expand in expandPredicates)
            {
                this.Expand.Add(expand);
            }
        }

        public void SetSort(IEnumerable<Sort<T>> sortPredicates)
        {
            if (sortPredicates == null)
            {
                return;
            }

            this.SetSort(sortPredicates.Select(predicate => predicate.ToString()));
        }

        public void SetSort(IEnumerable<string> sortPredicates)
        {
            if (sortPredicates == null)
            {
                return;
            }

            this.Sort.Clear();
            foreach (var sort in sortPredicates)
            {
                this.Sort.Add(sort);
            }
        }

        public void SetWhere(IEnumerable<QueryPredicate<T>> queryPredicate)
        {
            if (queryPredicate == null)
            {
                return;
            }

            this.SetWhere(queryPredicate.Select(predicate => predicate.ToString()));
        }

        public void SetWhere(IEnumerable<string> queryPredicate)
        {
            if (queryPredicate == null)
            {
                return;
            }

            this.Where.Clear();
            foreach (var query in queryPredicate)
            {
                this.Where.Add(query);
            }
        }

        public void SetWhere(QueryPredicate<T> queryPredicate)
        {
            if (queryPredicate == null)
            {
                return;
            }

            this.SetWhere(queryPredicate.ToString());
        }

        public void SetWhere(string queryPredicate)
        {
            if (queryPredicate == null)
            {
                return;
            }

            this.Where.Clear();
            this.Where.Add(queryPredicate);
        }
    }
}

repository: ivansg/commercetools-dotnet-core-sdk

repo_name: ivansg/commercetools-dotnet-core-sdk

extension: cs


text:
@inproceedings{mcphillips_cpr-comprehensible_2021,
	address = {Cham},
	series = {Lecture {Notes} in {Computer} {Science}},
	title = {{CPR}-{A} {Comprehensible} {Provenance} {Record} for {Verification} {Workflows} in {Whole} {Tale}},
	isbn = {978-3-030-80960-7},
	doi = {10.1007/978-3-030-80960-7_23},
	language = {en},
	booktitle = {Provenance and {Annotation} of {Data} and {Processes}},
	publisher = {Springer International Publishing},
	author = {McPhillips, Timothy M. and Thelen, Thomas and Willis, Craig and Kowalik, Kacper and Jones, Matthew B. and Ludäscher, Bertram},
	editor = {Glavic, Boris and Braganholo, Vanessa and Koop, David},
	year = {2021},
	pages = {263--269},
}

@inproceedings{chard_application_2019,
	title = {Application of {BagIt}-{Serialized} {Research} {Object} {Bundles} for {Packaging} and {Re}-{Execution} of {Computational} {Analyses}},
	doi = {10.1109/eScience.2019.00068},
	abstract = {In this paper we describe our experience adopting the Research Object Bundle (RO-Bundle) format with BagIt serialization (BagIt-RO) for the design and implementation of "tales" in the Whole Tale platform. A tale is an executable research object intended for the dissemination of computational scientific findings that captures information needed to facilitate understanding, transparency, and re-execution for review and computational reproducibility at the time of publication. We describe the Whole Tale platform and requirements that led to our adoption of BagIt-RO, specifics of our implementation, and discuss migrating to the emerging Research Object Crate (RO-Crate) standard.},
	booktitle = {2019 15th {International} {Conference} on {eScience} ({eScience})},
	author = {Chard, Kyle and Gaffney, Niall and Jones, Matthew B. and Kowalik, Kacper and Ludäscher, Bertram and McPhillips, Timothy and Nabrzyski, Jarek and Stodden, Victoria and Taylor, Ian and Thelen, Thomas and Turk, Matthew J. and Willis, Craig},
	month = sep,
	year = {2019},
	keywords = {Reproducibility of Results, Standards, Packag ing, Interoperability, Software, Digital Preservation},
	pages = {514--521},
	file = {IEEE Xplore Abstract Record:/Users/cwillis/Zotero/storage/C9WEHVM4/9041738.html:text/html;Submitted Version:/Users/cwillis/Zotero/storage/T7992EN9/Chard et al. - 2019 - Application of BagIt-Serialized Research Object Bu.pdf:application/pdf},
}

@article{chard_toward_2020,
	title = {Toward {Enabling} {Reproducibility} for {Data}-{Intensive} {Research} using the {Whole} {Tale} {Platform}},
	url = {http://arxiv.org/abs/2005.06087},
	doi = {10.3233/APC200107},
	abstract = {Whole Tale http://wholetale.org is a web-based, open-source platform for reproducible research supporting the creation, sharing, execution, and verification of "Tales" for the scientific research community. Tales are executable research objects that capture the code, data, and environment along with narrative and workflow information needed to re-create computational results from scientific studies. Creating reproducible research objects that enable reproducibility, transparency, and re-execution for computational experiments requiring significant compute resources or utilizing massive data is an especially challenging open problem. We describe opportunities, challenges, and solutions to facilitating reproducibility for data- and compute-intensive research, that we call "Tales at Scale," using the Whole Tale computing platform. We highlight challenges and solutions in frontend responsiveness needs, gaps in current middleware design and implementation, network restrictions, containerization, and data access. Finally, we discuss challenges in packaging computational experiment implementations for portable data-intensive Tales and outline future work.},
	urldate = {2021-01-15},
	journal = {arXiv:2005.06087 [cs]},
	author = {Chard, Kyle and Gaffney, Niall and Hategan, Mihael and Kowalik, Kacper and Ludaescher, Bertram and McPhillips, Timothy and Nabrzyski, Jarek and Stodden, Victoria and Taylor, Ian and Thelen, Thomas and Turk, Matthew J. and Willis, Craig},
	month = may,
	year = {2020},
	note = {arXiv: 2005.06087},
	keywords = {Computer Science - Distributed, Parallel, and Cluster Computing},
	file = {arXiv Fulltext PDF:/Users/cwillis/Zotero/storage/SK32VQC4/Chard et al. - 2020 - Toward Enabling Reproducibility for Data-Intensive.pdf:application/pdf;arXiv.org Snapshot:/Users/cwillis/Zotero/storage/XRW8SU7W/2005.html:text/html},
}

@inproceedings{chard_implementing_2019,
	address = {New York, NY, USA},
	series = {P-{RECS} '19},
	title = {Implementing {Computational} {Reproducibility} in the {Whole} {Tale} {Environment}},
	isbn = {978-1-4503-6756-1},
	url = {http://doi.acm.org/10.1145/3322790.3330594},
	doi = {10.1145/3322790.3330594},
	booktitle = {Proceedings of the 2nd {International} {Workshop} on {Practical} {Reproducible} {Evaluation} of {Computer} {Systems}},
	publisher = {ACM},
	author = {Chard, Kyle and Gaffney, Niall and Jones, Matthew B. and Kowalik, Kacper and Ludäscher, Bertram and Nabrzyski, Jarek and Stodden, Victoria and Taylor, Ian and Turk, Matthew J. and Willis, Craig},
	year = {2019},
	note = {event-place: Phoenix, AZ, USA},
	keywords = {computing environments, cyberinfrastructure, open code, open data, publishing standards, reproducibility},
	pages = {17--22},
}

@article{brinckman_computing_2019,
	title = {Computing environments for reproducibility: {Capturing} the “{Whole} {Tale}”},
	volume = {94},
	doi = {https://doi.org/10.1016/j.future.2017.12.029},
	journal = {Future Generation Computer Systems},
	author = {Brinckman, Adam and Chard, Kyle and Gaffney, Niall and Hategan, Mihael and Jones, Matthew B and Kowalik, Kacper and Kulasekaran, Sivakumar and Ludäscher, Bertram and Mecum, Bryce D and Nabrzyski, Jarek and {others}},
	year = {2019},
	keywords = {Whole Tale, Infrastructure},
	pages = {854--867},
}

 @article{Willis_Stodden_2020, title={Trust but Verify: How to Leverage Policies, Workflows, and Infrastructure to Ensure Computational Reproducibility in Publication}, volume={2}, ISSN={,}, url={https://hdsr.mitpress.mit.edu/pub/f0obb31j/release/1}, DOI={10.1162/99608f92.25982dcf}, abstractNote={This article distills findings from a qualitative study of seven reproducibility initiatives to enumerate nine key decision points for journals seeking to address concerns about the quality and rigor of computational research by expanding the peer review and publication process. We evaluate our guidance in light of the recent National Academies of Science, Engineering, and Medicine (NASEM, 2019) report on Reproducibility and Replicability in Science recommendation for journal reproducibility audits. We present 10 findings that clarify how reproducibility initiatives contend with a variety of social and technical factors, including significant gaps in editorial infrastructure and a lack of uniformity in how research artifacts are packaged for dissemination. We propose and define a novel concept of assessable reproducible research artifacts and point the way to an improved understanding of how changes to author incentives and dissemination requirements impact the quality, rigor, and trustworthiness of published computational research.}, number={4}, journal={Harvard Data Science Review}, publisher={PubPub}, author={Willis, Craig and Stodden, Victoria}, year={2020}, month={Dec}, language={en} }

repository: whole-tale/wt-design-docs

repo_name: whole-tale/wt-design-docs

gha_license_id: MIT

gha_language: HTML

extension: bib


text:
package imagesearchgtk

import (
	"image"
	"github.com/jamesrr39/image-search-app/imagesearch"
	"github.com/jamesrr39/image-search-app/imagesearch/chisquaredscorers"
	"github.com/jamesrr39/image-search-app/imagesearchstoragedal"
	_ "image/gif"  // decode
	_ "image/jpeg" // decode
	_ "image/png"  // decode
	"log"
	"os"

	"github.com/mattn/go-gtk/gdk"

	gtkimageextra "github.com/jamesrr39/goutil/image_gtk_image_bridge"

	"github.com/disintegration/imaging"

	"github.com/jamesrr39/goutil/image-processing/imageprocessingutil"

	"github.com/mattn/go-gtk/gtk"
)

type Window struct {
	dal               imagesearchstoragedal.ImageSearchStorageDAL
	window            *gtk.Window
	seedPicture       *gtk.Image
	matchesContainer  *MatchesContainer
	algorithmComboBox *gtk.ComboBox
}

type WindowOptions struct {
	SeedPicturePath string
	QtyBins         imagesearch.QtyBins
}

type scoringAlgorithmDisplay struct {
	text   string
	scorer imagesearch.ImageScorer
}

var scoringAlgorithms = []scoringAlgorithmDisplay{
	scoringAlgorithmDisplay{"Chi1", &chisquaredscorers.ChiDistanceSearchImpl1{}},
}

func NewWindow(dal imagesearchstoragedal.ImageSearchStorageDAL, options *WindowOptions) *Window {
	window := &Window{dal, gtk.NewWindow(gtk.WINDOW_TOPLEVEL), gtk.NewImage(), NewMatchesContainer(), gtk.NewComboBoxNewText()}
	for i := 0; i < len(scoringAlgorithms); i++ {
		window.algorithmComboBox.AppendText(scoringAlgorithms[i].text)
	}
	window.algorithmComboBox.SetActive(0)

	fileChooserBtn := gtk.NewFileChooserButton("choose file", gtk.FILE_CHOOSER_ACTION_OPEN)
	fileChooserBtn.Connect("file-set", func() {
		window.setMainPicture(fileChooserBtn.GetFilename(), options.QtyBins)
	})

	windowVBox := gtk.NewVBox(false, 0)

	window.window.Connect("destroy", func() {
		gtk.MainQuit()
	})

	windowVBox.PackStart(fileChooserBtn, false, false, 0)
	windowVBox.PackStart(window.seedPicture, false, true, 0)
	windowVBox.PackStart(window.algorithmComboBox, false, false, 0)
	windowVBox.PackStart(window.matchesContainer.Container, true, true, 0)

	window.window.Add(windowVBox)

	window.window.SetSizeRequest(1024, 960)
	window.window.ShowAll()

	return window

}

func (window *Window) getScoringAlgorithm() imagesearch.ImageScorer {
	index := window.algorithmComboBox.GetActive()
	return scoringAlgorithms[index].scorer
}

func getImage(path string, xSize, ySize int) (image.Image, error) {
	file, err := os.Open(path)
	if nil != err {
		return nil, err
	}
	defer file.Close()
	log.Printf("getting image %s\n", path)
	picture, err := imageprocessingutil.RotateAndTransformPicture(file)
	if nil != err {
		return nil, err
	}

	if nil == picture {
		panic("nil picture: " + path)
	}

	return imaging.Resize(picture, xSize, ySize, imaging.Lanczos), nil

}

func (window *Window) setMainPicture(path string, qtyBins imagesearch.QtyBins) {

	picture, err := getImage(path, 400, 400)
	if nil != err {
		panic(err)
	}
	pixBuf := gtkimageextra.NewGdkPixBufFromImage(picture)
	window.seedPicture.SetFromPixbuf(pixBuf)

	window.window.ShowAll()

	go func(seedPicturePath string, qtyBins imagesearch.QtyBins) {
		file, err := os.Open(seedPicturePath)
		if nil != err {
			panic(err)
		}
		defer file.Close()
		log.Println("searching")
		matches, err := window.dal.Search(file, qtyBins, window.getScoringAlgorithm(), imagesearch.NewLocalLocation(path))
		if nil != err {
			panic(err)
		}
		log.Printf("matches: %v\n", matches)
		gdk.ThreadsEnter()
		window.matchesContainer.SetMatchesPictures(matches)
		gdk.ThreadsLeave()
	}(path, qtyBins)
}

gha_language: Go

extension: go