text:
y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-46.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-47.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-48.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-49.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-50.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-51.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-52.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-53.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-28.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-29.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-30.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-31.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-32.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-33.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-34.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-35.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-36.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-37.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-38.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-39.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-40.5" y="6" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-53.5" y="5" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-53.5" y="4" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-53.5" y="3" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-53.5" y="2" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-53.5" y="1" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-53.5" y="0" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-53.5" y="-1" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-53.5" y="-2" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-53.5" y="-3" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-54.5" y="-3" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-55.5" y="-3" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-56.5" y="-3" extent="1-16" drill="0.35" diameter="0.35"/>
<via x="-57.5" y="-3" extent="1-16" drill="0.35" diameter="0.35"/>
<contactref element="J7" pad="2"/>
<contactref element="J8" pad="2"/>
<contactref element="J9" pad="2"/>
<wire x1="-16.8" y1="71.45" x2="-16.5" y2="71.45" width="0.2" layer="1"/>
<wire x1="-16.5" y1="71.45" x2="-16.5" y2="72.5" width="0.2" layer="1"/>
<polygon width="0.2" layer="1">
<vertex x="23.5" y="45"/>
<vertex x="24" y="45"/>
<vertex x="24" y="56.5"/>
<vertex x="16" y="56.5"/>
<vertex x="16" y="68.5"/>
<vertex x="-2" y="68.5"/>
<vertex x="-2" y="56.5"/>
<vertex x="-9.5" y="56.5"/>
<vertex x="-9.5" y="68.5"/>
<vertex x="-11" y="68.5"/>
<vertex x="-11" y="68"/>
<vertex x="-10" y="68"/>
<vertex x="-10" y="56"/>
<vertex x="-1.5" y="56"/>
<vertex x="-1.5" y="68"/>
<vertex x="15.5" y="68"/>
<vertex x="15.5" y="56"/>
<vertex x="23.5" y="56"/>
</polygon>
<via x="-9.75" y="68.25" extent="1-16" drill="0.35" diameter="0.35"/>
<polygon width="0.2" layer="1">
<vertex x="-21" y="68.5"/>
<vertex x="-27" y="68.5"/>
<vertex x="-27.5" y="68"/>
<vertex x="-27.5" y="56.25"/>
<vertex x="-27" y="56.25"/>
<vertex x="-27" y="67.5"/>
<vertex x="-26.5" y="68"/>
<vertex x="-21" y="68"/>
</polygon>
<via x="-27.25" y="48.25" extent="1-16" drill="0.35" diameter="0.35"/>
<polygon width="0.2" layer="1">
<vertex x="-20" y="68.5"/>
<vertex x="-12" y="68.5"/>
<vertex x="-12" y="68"/>
<vertex x="-20" y="68"/>
</polygon>
</signal>
<signal name="CHARGE">
<contactref element="U2" pad="9"/>
<contactref element="R7" pad="2"/>
<contactref element="R16" pad="2"/>
<wire x1="-60" y1="32.075" x2="-60" y2="31.5" width="0.2" layer="1"/>
<wire x1="-60" y1="31.5" x2="-59.5" y2="31" width="0.2" layer="1"/>
<via x="-59.5" y="31" extent="1-16" drill="0.35"/>
<via x="-62.25" y="31" extent="1-16" drill="0.35"/>
<wire x1="-62.25" y1="31" x2="-59.5" y2="31" width="0.2" layer="16"/>
<wire x1="-62.25" y1="31" x2="-63.85" y2="31" width="0.2" layer="1"/>
<wire x1="-64.5" y1="31.65" x2="-65.4" y2="31.65" width="0.2" layer="1"/>
<wire x1="-65.4" y1="31.65" x2="-65.75" y2="32" width="0.2" layer="1"/>
<wire x1="-63.85" y1="31" x2="-64.5" y2="31.65" width="0.2" layer="1"/>
<wire x1="-65.75" y1="41.25" x2="-52" y2="55" width="0.2" layer="1"/>
<wire x1="-65.75" y1="32" x2="-65.75" y2="41.25" width="0.2" layer="1"/>
<wire x1="-52" y1="61.25" x2="-50.25" y2="63" width="0.2" layer="1"/>
<via x="-50.25" y="63" extent="1-16" drill="0.35"/>
<wire x1="-50.25" y1="63" x2="-46.75" y2="63" width="0.2" layer="16"/>
<via x="-46.75" y="63" extent="1-16" drill="0.35"/>
<wire x1="-52" y1="55" x2="-52" y2="61.25" width="0.2" layer="1"/>
<wire x1="40.825" y1="40.175" x2="38.75" y2="42.25" width="0.2" layer="1"/>
<wire x1="28" y1="51" x2="28" y2="63.5" width="0.2" layer="1"/>
<wire x1="33.25" y1="45.75" x2="28" y2="51" width="0.2" layer="1"/>
<wire x1="-11.75" y1="76.75" x2="-5.5" y2="70.5" width="0.2" layer="1"/>
<wire x1="-36.25" y1="76.75" x2="-11.75" y2="76.75" width="0.2" layer="1"/>
<wire x1="-37.85" y1="71.75" x2="-37.85" y2="75.15" width="0.2" layer="1"/>
<wire x1="-37.85" y1="75.15" x2="-36.25" y2="76.75" width="0.2" layer="1"/>
<wire x1="38.75" y1="45" x2="38" y2="45.75" width="0.2" layer="1"/>
<wire x1="38.75" y1="42.25" x2="38.75" y2="45" width="0.2" layer="1"/>
<wire x1="38" y1="45.75" x2="33.25" y2="45.75" width="0.2" layer="1"/>
<wire x1="28" y1="63.5" x2="23.75" y2="67.75" width="0.2" layer="1"/>
<wire x1="23.75" y1="67.75" x2="22.75" y2="67.75" width="0.2" layer="1"/>
<wire x1="20.5" y1="70" x2="22.75" y2="67.75" width="0.2" layer="1"/>
<wire x1="-1" y1="70.5" x2="-0.5" y2="70" width="0.2" layer="1"/>
<wire x1="-0.5" y1="70" x2="20.5" y2="70" width="0.2" layer="1"/>
<wire x1="-5.5" y1="70.5" x2="-1" y2="70.5" width="0.2" layer="1"/>
<contactref element="U4" pad="18"/>
<wire x1="40.825" y1="33.6" x2="40.825" y2="40.175" width="0.2" layer="1"/>
<wire x1="-38" y1="71.75" x2="-37.85" y2="71.75" width="0.2" layer="1"/>
<wire x1="-46.75" y1="63" x2="-38" y2="71.75" width="0.2" layer="1"/>
</signal>
<signal name="SOFT-START">
<contactref element="U2" pad="3"/>
<contactref element="C7" pad="1"/>
<wire x1="-60.5" y1="34.925" x2="-60.5" y2="38.6" width="0.2" layer="1"/>
<wire x1="-60.5" y1="38.6" x2="-61.4" y2="39.5" width="0.2" layer="1"/>
</signal>
<signal name="RTOP12">
<contactref element="R3" pad="1"/>
<contactref element="R5" pad="2"/>
<wire x1="-40.4" y1="54" x2="-38.65" y2="54" width="0.2" layer="1"/>
<wire x1="-38.65" y1="54" x2="-38.25" y2="53.6" width="0.2" layer="1"/>
</signal>
<signal name="RTOP23">
<contactref element="R5" pad="1"/>
<contactref element="R10" pad="2"/>
<wire x1="-43.65" y1="54" x2="-42.1" y2="54" width="0.2" layer="1"/>
</signal>
<signal name="V+">
<contactref element="R3" pad="2"/>
<contactref element="D10" pad="C"/>
<contactref element="D8" pad="C"/>
<contactref element="R17" pad="2"/>
<contactref element="R18" pad="2"/>
<contactref element="D1" pad="C"/>
<contactref element="R19" pad="2"/>
<contactref element="R13" pad="2"/>
<polygon width="0.2" layer="1" isolate="0.5" thermals="no">
<vertex x="-20" y="-10.5"/>
<vertex x="-70" y="-10.5"/>
<vertex x="-70" y="-5.5"/>
<vertex x="-42" y="-5.5"/>
<vertex x="-42" y="4.5"/>
<vertex x="-26" y="4.5"/>
<vertex x="-26" y="45"/>
<vertex x="-38.75" y="45"/>
<vertex x="-38.75" y="52.25"/>
<vertex x="-28.5" y="52.25"/>
<vertex x="-28.5" y="46.5"/>
<vertex x="-19" y="46.5"/>
<vertex x="-19" y="43"/>
<vertex x="22.5" y="43"/>
<vertex x="22.5" y="40"/>
<vertex x="26" y="36.5"/>
<vertex x="26" y="4.5"/>
<vertex x="42" y="4.5"/>
<vertex x="42" y="-5.5"/>
<vertex x="70" y="-5.5"/>
<vertex x="70" y="-10.5"/>
<vertex x="20" y="-10.5"/>
<vertex x="20" y="34"/>
<vertex x="-20" y="34"/>
</polygon>
<contactref element="C10" pad="+"/>
<contactref element="C11" pad="+"/>
<contactref element="C12" pad="+"/>
<contactref element="C13" pad="+"/>
<contactref element="J2" pad="1"/>
<contactref element="J4" pad="2"/>
<wire x1="7.54" y1="50.83" x2="7.54" y2="48.04" width="1" layer="1"/>
<wire x1="7.54" y1="48.04" x2="5.5" y2="46" width="1" layer="1"/>
<wire x1="5.5" y1="46" x2="5.5" y2="42" width="1" layer="1"/>
<contactref element="R14" pad="2"/>
<contactref element="R27" pad="2"/>
<wire x1="41" y1="6.05" x2="41" y2="4" width="0.2" layer="1"/>
</signal>
<signal name="+18.5V">
<contactref element="C4" pad="+"/>
<contactref element="U2" pad="10"/>
<contactref element="T1" pad="3"/>
<contactref element="T1" pad="4"/>
<contactref element="T1" pad="5"/>
<contactref element="T1" pad="6"/>
<contactref element="C14" pad="1"/>
<contactref element="C15" pad="1"/>
<contactref element="R2" pad="1"/>
<contactref element="U3" pad="6"/>
<contactref element="U1" pad="1"/>
<contactref element="C1" pad="1"/>
<contactref element="F1" pad="2"/>
<polygon width="0.2" layer="1">
<vertex x="-49.5" y="34"/>
<vertex x="-36.5" y="34"/>
<vertex x="-36.5" y="38.5"/>
<vertex x="-39.5" y="38.5"/>
<vertex x="-41" y="40"/>
<vertex x="-41" y="44"/>
<vertex x="-47.5" y="44"/>
<vertex x="-47.5" y="66"/>
<vertex x="-49.5" y="66"/>
</polygon>
<wire x1="-57.925" y1="32.075" x2="-59.5" y2="32.075" width="0.2" layer="1"/>
<wire x1="-56.2" y1="33.8" x2="-55.5" y2="33.8" width="0.2" layer="1"/>
<wire x1="-56.2" y1="33.8" x2="-57.925" y2="32.075" width="0.2" layer="1"/>
<wire x1="-55.5" y1="33.8" x2="-52.8" y2="36.5" width="1" layer="1"/>
<wire x1="-52.8" y1="36.5" x2="-48.5" y2="36.5" width="1" layer="1"/>
<contactref element="R21" pad="2"/>
<wire x1="31" y1="43.9" x2="29.15" y2="43.9" width="0.4" layer="1"/>
<wire x1="29.15" y1="43.9" x2="28.75" y2="44.3" width="0.4" layer="1"/>
<polygon width="0.2" layer="16" thermals="no">
<vertex x="-49.5" y="66"/>
<vertex x="-38.5" y="77"/>
<vertex x="38.5" y="77"/>
<vertex x="51" y="64.5"/>
<vertex x="51" y="62.5"/>
<vertex x="49" y="62.5"/>
<vertex x="49" y="64.5"/>
<vertex x="38.5" y="75"/>
<vertex x="-38.5" y="75"/>
<vertex x="-47.5" y="66"/>
<vertex x="-47.5" y="64"/>
<vertex x="-49.5" y="64"/>
</polygon>
<via x="-49" y="64.5" extent="1-16" drill="0.35"/>
<via x="-48" y="64.5" extent="1-16" drill="0.35"/>
<via x="-49" y="65.5" extent="1-16" drill="0.35"/>
<via x="-48" y="65.5" extent="1-16" drill="0.35"/>
<polygon width="0.2" layer="1" thermals="no">
<vertex x="51" y="37.5"/>
<vertex x="51" y="64.5"/>
<vertex x="49" y="64.5"/>
<vertex x="49" y="37.5"/>
</polygon>
<via x="49.5" y="64" extent="1-16" drill="0.35"/>
<via x="50.5" y="64" extent="1-16" drill="0.35"/>
<via x="50.5" y="63" extent="1-16" drill="0.35"/>
<via x="49.5" y="63" extent="1-16" drill="0.35"/>
<via x="-12.75" y="75.25" extent="1-16" drill="0.35"/>
<wire x1="-12.75" y1="71.35" x2="-12.75" y2="75.25" width="0.2" layer="1"/>
<wire x1="33" y1="31.6" x2="30.56" y2="31.6" width="1" layer="16"/>
<wire x1="30.56" y1="31.6" x2="30.5" y2="31.54" width="1" layer="16"/>
<wire x1="31" y1="43.9" x2="31" y2="43" width="1" layer="1"/>
<wire x1="31.5" y1="42.5" x2="31" y2="43" width="1" layer="1"/>
<wire x1="31.5" y1="34.5" x2="31.5" y2="40.635" width="1" layer="1"/>
<wire x1="31.5" y1="40.635" x2="31.5" y2="42.5" width="1" layer="1"/>
<wire x1="30.5" y1="31.54" x2="30.5" y2="33.5" width="1" layer="1"/>
<wire x1="30.5" y1="33.5" x2="31.5" y2="34.5" width="1" layer="1"/>
<wire x1="29.15" y1="40.635" x2="31.5" y2="40.635" width="0.4" layer="1"/>
<wire x1="31.35" y1="44.25" x2="31" y2="43.9" width="0.4" layer="1"/>
<wire x1="49.25" y1="44.25" x2="41.5" y2="44.25" width="0.4" layer="1"/>
<wire x1="31.35" y1="44.25" x2="38" y2="44.25" width="0.4" layer="1"/>
<via x="38" y="44.25" extent="1-16" drill="0.35"/>
<via x="41.5" y="44.25" extent="1-16" drill="0.35"/>
<wire x1="38" y1="44.25" x2="41.5" y2="44.25" width="0.4" layer="16"/>
</signal>
<signal name="GATE_CONTROL">
<contactref element="U2" pad="7"/>
<contactref element="Q1" pad="1"/>
<wire x1="-61" y1="32.075" x2="-61" y2="27" width="0.2" layer="1"/>
<wire x1="-60" y1="26" x2="-61" y2="27" width="0.2" layer="1"/>
<wire x1="-53.46" y1="23.39" x2="-53.46" y2="25.46" width="0.2" layer="1"/>
<wire x1="-53.46" y1="25.46" x2="-54" y2="26" width="0.2" layer="1"/>
<wire x1="-54" y1="26" x2="-60" y2="26" width="0.2" layer="1"/>
</signal>
<signal name="INTVCC">
<contactref element="U2" pad="8"/>
<contactref element="C5" pad="1"/>
<contactref element="D2" pad="C"/>
<contactref element="R2" pad="2"/>
<wire x1="-60.5" y1="32.075" x2="-60.5" y2="30.35" width="0.2" layer="1"/>
<wire x1="-60.5" y1="30.35" x2="-60" y2="29.85" width="0.2" layer="1"/>
<polygon width="0.2" layer="1">
<vertex x="-58.5" y="30.5"/>
<vertex x="-57.5" y="30.5"/>
<vertex x="-57.5" y="29.5"/>
<vertex x="-50.5" y="29.5"/>
<vertex x="-50.5" y="26.5"/>
<vertex x="-58.5" y="26.5"/>
</polygon>
<wire x1="-60" y1="29.85" x2="-58.35" y2="29.85" width="0.2" layer="1"/>
<wire x1="-58.35" y1="29.85" x2="-58" y2="29.5" width="0.2" layer="1"/>
</signal>
<signal name="N$1">
<contactref element="R11" pad="2"/>
<contactref element="C9" pad="1"/>
<wire x1="-55.5" y1="36.9" x2="-57.05" y2="36.9" width="0.2" layer="1"/>
<wire x1="-57.05" y1="36.9" x2="-57.4" y2="37.25" width="0.2" layer="1"/>
</signal>
<signal name="VC">
<contactref element="C8" pad="1"/>
<contactref element="R11" pad="1"/>
<contactref element="U2" pad="1"/>
<wire x1="-59.5" y1="34.925" x2="-59.5" y2="36.85" width="0.2" layer="1"/>
<wire x1="-59.5" y1="36.85" x2="-59.1" y2="37.25" width="0.2" layer="1"/>
<wire x1="-59.1" y1="37.25" x2="-59.1" y2="39.5" width="0.2" layer="1"/>
</signal>
<signal name="SENSE_LPF">
<contactref element="U2" pad="6"/>
<contactref element="R4" pad="1"/>
<contactref element="C6" pad="1"/>
<wire x1="-62.25" y1="29.7" x2="-64.85" y2="29.7" width="0.2" layer="1"/>
<wire x1="-64.85" y1="29.7" x2="-65" y2="29.85" width="0.2" layer="1"/>
<wire x1="-61.5" y1="30.45" x2="-62.25" y2="29.7" width="0.2" layer="1"/>
<wire x1="-61.5" y1="32.075" x2="-61.5" y2="30.45" width="0.2" layer="1"/>
</signal>
<signal name="N$32">
<contactref element="R1" pad="1"/>
<contactref element="C3" pad="1"/>
<wire x1="-65.7" y1="16" x2="-66.85" y2="16" width="0.4" layer="1"/>
<wire x1="-66.85" y1="16" x2="-68" y2="14.85" width="0.4" layer="1"/>
</signal>
<signal name="VSN">
<contactref element="R1" pad="2"/>
<contactref element="T1" pad="7"/>
<contactref element="T1" pad="8"/>
<contactref element="T1" pad="9"/>
<contactref element="T1" pad="10"/>
<contactref element="Q1" pad="2"/>
<polygon width="0.2" layer="1" thermals="no">
<vertex x="-62" y="17"/>
<vertex x="-49.5" y="17"/>
<vertex x="-49.5" y="11.5"/>
<vertex x="-37" y="11.5"/>
<vertex x="-37" y="7.5"/>
<vertex x="-62" y="7.5"/>
</polygon>
<wire x1="-63.8" y1="16" x2="-61.5" y2="16" width="0.4" layer="1"/>
</signal>
<signal name="VBATT">
<contactref element="J1" pad="1"/>
<contactref element="F1" pad="1"/>
<wire x1="53.422" y1="38.5" x2="54.300140625" y2="38.5" width="1.5" layer="1"/>
<wire x1="54.300140625" y1="38.5" x2="56.40006875" y2="40.599928125" width="1.5" layer="1"/>
</signal>
<signal name="SENSE">
<contactref element="R8" pad="2"/>
<contactref element="R4" pad="2"/>
<contactref element="R9" pad="2"/>
<contactref element="Q1" pad="3"/>
<wire x1="-62.078" y1="24.5" x2="-62.078" y2="22" width="0.4" layer="1"/>
<wire x1="-58.54" y1="23.39" x2="-58.54" y2="24.5" width="0.4" layer="1"/>
<wire x1="-62.078" y1="24.5" x2="-62.75" y2="25.172" width="0.2" layer="1"/>
<wire x1="-62.75" y1="25.172" x2="-62.75" y2="26.5" width="0.2" layer="1"/>
<wire x1="-62.75" y1="26.5" x2="-62.75" y2="26.65" width="0.2" layer="1"/>
<wire x1="-58.54" y1="24.5" x2="-62.078" y2="24.5" width="0.4" layer="1"/>
<wire x1="-62.75" y1="26.5" x2="-62.75" y2="27.3" width="0.2" layer="1"/>
<wire x1="-62.75" y1="27.3" x2="-62.25" y2="27.8" width="0.2" layer="1"/>
</signal>
<signal name="HV_AC">
<contactref element="T1" pad="1"/>
<contactref element="D1" pad="A"/>
<polygon width="0.2" layer="1" thermals="no">
<vertex x="-30.5" y="43.5"/>
<vertex x="-33" y="43.5"/>
<vertex x="-33" y="34.5"/>
<vertex x="-31" y="34.5"/>
<vertex x="-31" y="39.5"/>
<vertex x="-30.5" y="39.5"/>
</polygon>
</signal>
<signal name="KICKER">
<contactref element="D10" pad="A"/>
<contactref element="Q6" pad="4"/>
<contactref element="J4" pad="1"/>
<polygon width="0.2" layer="16" thermals="no">
<vertex x="-0.5" y="67"/>
<vertex x="14.5" y="67"/>
<vertex x="14.5" y="49"/>
<vertex x="12.5" y="47"/>
<vertex x="12.5" y="44"/>
<vertex x="9.5" y="44"/>
<vertex x="9.5" y="47"/>
<vertex x="7.5" y="49"/>
<vertex x="-0.5" y="49"/>
</polygon>
<polygon width="0.2" layer="1" thermals="no">
<vertex x="9.5" y="47"/>
<vertex x="12.5" y="47"/>
<vertex x="14.5" y="49"/>
<vertex x="18.5" y="49"/>
<vertex x="18.5" y="47"/>
<vertex x="15.5" y="47"/>
<vertex x="12.5" y="44"/>
<vertex x="9.5" y="44"/>
</polygon>
</signal>
<signal name="CHIPPER">
<contactref element="D8" pad="A"/>
<contactref element="Q5" pad="4"/>
<contactref element="J2" pad="2"/>
<polygon width="0.2" layer="16" thermals="no">
<vertex x="-26" y="67"/>
<vertex x="-11" y="67"/>
<vertex x="-11" y="49.5"/>
<vertex x="-9.5" y="48"/>
<vertex x="-9.5" y="44"/>
<vertex x="-12.5" y="44"/>
<vertex x="-12.5" y="47"/>
<vertex x="-14.5" y="49"/>
<vertex x="-26" y="49"/>
</polygon>
<polygon width="0.2" layer="1" thermals="no">
<vertex x="-12.5" y="44"/>
<vertex x="-9.5" y="44"/>
<vertex x="-6.5" y="47"/>
<vertex x="-3.5" y="47"/>
<vertex x="-3.5" y="49"/>
<vertex x="-7.5" y="49"/>
<vertex x="-9.5" y="47"/>
<vertex x="-12.5" y="47"/>
</polygon>
</signal>
<signal name="N$21">
<contactref element="R15" pad="1"/>
<contactref element="D4" pad="C"/>
<contactref element="Q2" pad="1"/>
<wire x1="-33.75" y1="63.75" x2="-33.75" y2="58.45" width="0.2" layer="1"/>
<wire x1="-32.45" y1="65.05" x2="-30.75" y2="65.05" width="0.2" layer="1"/>
<wire x1="-32.45" y1="65.05" x2="-33.75" y2="63.75" width="0.2" layer="1"/>
<wire x1="-29.7" y1="70.95" x2="-30.3" y2="70.95" width="0.2" layer="1"/>
<wire x1="-30.3" y1="70.95" x2="-30.75" y2="70.5" width="0.2" layer="1"/>
<wire x1="-30.75" y1="70.5" x2="-30.75" y2="65.05" width="0.2" layer="1"/>
</signal>
<signal name="N$3">
<contactref element="D3" pad="A"/>
<contactref element="R13" pad="1"/>
<wire x1="-36" y1="54.2" x2="-36" y2="58.75" width="0.2" layer="1"/>
<wire x1="-36" y1="58.75" x2="-34.25" y2="60.5" width="0.2" layer="1"/>
<wire x1="-34.25" y1="60.5" x2="-34.25" y2="67.75" width="0.2" layer="1"/>
<wire x1="-30.25" y1="71.75" x2="-34.25" y2="67.75" width="0.2" layer="1"/>
<wire x1="-28.75" y1="76" x2="-29.5" y2="76" width="0.2" layer="1"/>
<wire x1="-29.5" y1="76" x2="-30.25" y2="75.25" width="0.2" layer="1"/>
<wire x1="-30.25" y1="75.25" x2="-30.25" y2="71.75" width="0.2" layer="1"/>
</signal>
<signal name="N$4">
<contactref element="D3" pad="C"/>
<contactref element="Q2" pad="3"/>
<wire x1="-27.25" y1="76" x2="-27.3" y2="76" width="0.2" layer="1"/>
<wire x1="-27.3" y1="76" x2="-27.3" y2="70" width="0.2" layer="1"/>
</signal>
<signal name="N$5">
<contactref element="R16" pad="1"/>
<contactref element="D5" pad="A"/>
<wire x1="-36.15" y1="71.75" x2="-36.15" y2="75.35" width="0.2" layer="1"/>
<wire x1="-35.5" y1="76" x2="-36.15" y2="75.35" width="0.2" layer="1"/>
<wire x1="-33.75" y1="76" x2="-35.5" y2="76" width="0.2" layer="1"/>
</signal>
<signal name="+5V">
<contactref element="C16" pad="1"/>
<contactref element="R32" pad="2"/>
<contactref element="U4" pad="15"/>
<contactref element="U1" pad="3"/>
<contactref element="C2" pad="1"/>
<contactref element="R33" pad="2"/>
<contactref element="S1" pad="1"/>
<contactref element="U4" pad="5"/>
<contactref element="R36" pad="2"/>
<contactref element="R37" pad="2"/>
<contactref element="U5" pad="5"/>
<contactref element="R38" pad="2"/>
<contactref element="U6" pad="5"/>
<wire x1="43.365" y1="22.215" x2="43.365" y2="24.4" width="0.4" layer="1"/>
<wire x1="43.365" y1="22.215" x2="43.15" y2="22" width="0.4" layer="1"/>
<wire x1="30.56" y1="26.4" x2="33" y2="26.4" width="1" layer="16"/>
<wire x1="30.56" y1="26.4" x2="30.5" y2="26.46" width="1" layer="16"/>
<wire x1="33" y1="26.4" x2="35.25" y2="26.4" width="1" layer="16"/>
<polygon width="0.2" layer="1">
<vertex x="29" y="27.75"/>
<vertex x="35" y="27.75"/>
<vertex x="35" y="25"/>
<vertex x="29" y="25"/>
</polygon>
<wire x1="44.1" y1="35.65" x2="44.1" y2="36.5" width="0.2" layer="1"/>
<wire x1="44.635" y1="35.115" x2="44.635" y2="33.6" width="0.2" layer="1"/>
<wire x1="44.635" y1="35.115" x2="44.1" y2="35.65" width="0.2" layer="1"/>
<wire x1="43.365" y1="24.4" x2="43.365" y2="26.135" width="0.4" layer="1"/>
<wire x1="43.365" y1="26.135" x2="43" y2="26.5" width="0.4" layer="1"/>
<via x="43" y="26.5" extent="1-16" drill="0.35"/>
<wire x1="43" y1="26.5" x2="40.5" y2="26.5" width="0.4" layer="16"/>
<via x="40.5" y="26.5" extent="1-16" drill="0.35"/>
<wire x1="40.5" y1="26.5" x2="34.6" y2="26.5" width="0.4" layer="1"/>
<wire x1="34.6" y1="26.5" x2="34.5" y2="26.4" width="0.2" layer="1"/>
<wire x1="44.635" y1="33.6" x2="44.635" y2="32.385" width="0.2" layer="1"/>
<wire x1="44.635" y1="32.385" x2="44.25" y2="32" width="0.2" layer="1"/>
<wire x1="36" y1="32" x2="34.5" y2="30.5" width="0.2" layer="1"/>
<wire x1="44.25" y1="32" x2="36" y2="32" width="0.2" layer="1"/>
<wire x1="34.5" y1="30.5" x2="34.5" y2="27.5" width="0.2" layer="1"/>
<wire x1="41.96966875" y1="63.727028125" x2="40.75" y2="62.507359375" width="0.2" layer="1"/>
<wire x1="44.1" y1="36.5" x2="45" y2="36.5" width="0.2" layer="1"/>
<via x="45" y="36.5" extent="1-16" drill="0.35"/>
<via x="45.5" y="39" extent="1-16" drill="0.35"/>
<wire x1="45.5" y1="39" x2="43" y2="39" width="0.2" layer="1"/>
<wire x1="40.75" y1="62.507359375" x2="40.75" y2="43.25" width="0.2" layer="1"/>
<wire x1="43" y1="39" x2="42.75" y2="39.25" width="0.2" layer="1"/>
<wire x1="42.75" y1="39.25" x2="42.75" y2="41.25" width="0.2" layer="1"/>
<wire x1="42.75" y1="41.25" x2="40.75" y2="43.25" width="0.2" layer="1"/>
<wire x1="45.5" y1="39" x2="45.5" y2="37" width="0.2" layer="16"/>
<wire x1="45.5" y1="37" x2="45" y2="36.5" width="0.2" layer="16"/>
<polygon width="0.2" layer="1" thermals="no">
<vertex x="47.5" y="19"/>
<vertex x="48.5" y="19"/>
<vertex x="48.5" y="7.5"/>
<vertex x="47.5" y="7.5"/>
</polygon>
<wire x1="46.7" y1="8.75" x2="48" y2="8.75" width="0.2" layer="1"/>
<wire x1="45" y1="16" x2="46.7" y2="16" width="0.4" layer="1"/>
<wire x1="43.15" y1="22" x2="43.15" y2="17.85" width="0.4" layer="1"/>
<wire x1="43.15" y1="17.85" x2="45" y2="16" width="0.4" layer="1"/>
<wire x1="46.7" y1="16" x2="48" y2="16" width="0.4" layer="1"/>
</signal>
<signal name="!RESET">
<contactref element="R32" pad="1"/>
<contactref element="U4" pad="11"/>
<contactref element="J3" pad="4"/>
<wire x1="35.25" y1="28.1" x2="35.25" y2="29.25" width="0.2" layer="16"/>
<via x="35.25" y="29.25" extent="1-16" drill="0.35"/>
<wire x1="35.25" y1="29.25" x2="35.25" y2="30.25" width="0.2" layer="1"/>
<wire x1="36.5" y1="31.5" x2="35.25" y2="30.25" width="0.2" layer="1"/>
<wire x1="49.715" y1="31.715" x2="49.715" y2="33.6" width="0.2" layer="1"/>
<wire x1="49.715" y1="31.715" x2="49.5" y2="31.5" width="0.2" layer="1"/>
<wire x1="49.5" y1="31.5" x2="36.5" y2="31.5" width="0.2" layer="1"/>
<wire x1="62.75" y1="34.5" x2="66.5" y2="34.5" width="0.2" layer="1"/>
<wire x1="66.5" y1="34.5" x2="67.5" y2="35.5" width="0.2" layer="1"/>
<wire x1="67.5" y1="35.5" x2="67.5" y2="40" width="0.2" layer="1"/>
<wire x1="67.5" y1="40" x2="67" y2="40.5" width="0.2" layer="1"/>
<wire x1="67" y1="40.5" x2="62.5" y2="40.5" width="0.2" layer="1"/>
<wire x1="57.5" y1="35.5" x2="62.5" y2="40.5" width="0.2" layer="1"/>
<wire x1="49.715" y1="33.6" x2="49.715" y2="34.465" width="0.2" layer="1"/>
<wire x1="49.715" y1="34.465" x2="50.75" y2="35.5" width="0.2" layer="1"/>
<wire x1="50.75" y1="35.5" x2="57.5" y2="35.5" width="0.2" layer="1"/>
</signal>
<signal name="CHIP_GATE">
<contactref element="R24" pad="2"/>
<contactref element="R23" pad="1"/>
<contactref element="U3" pad="7"/>
<wire x1="-2" y1="69.5" x2="-3.15" y2="69.5" width="0.4" layer="16"/>
<via x="-2" y="69.5" extent="1-16" drill="0.35"/>
<wire x1="20" y1="69.5" x2="22.75" y2="66.75" width="0.4" layer="1"/>
<wire x1="22.75" y1="66.75" x2="22.75" y2="64.75" width="0.4" layer="1"/>
<wire x1="22.75" y1="64.75" x2="26.5" y2="61" width="0.4" layer="1"/>
<wire x1="26.5" y1="40.5" x2="26.5" y2="61" width="0.4" layer="1"/>
<wire x1="-2" y1="69.5" x2="20" y2="69.5" width="0.4" layer="1"/>
<wire x1="29.15" y1="39.365" x2="27.635" y2="39.365" width="0.4" layer="1"/>
<wire x1="27.635" y1="39.365" x2="26.5" y2="40.5" width="0.4" layer="1"/>
<wire x1="-3.15" y1="69.5" x2="-3.15" y2="67.075" width="0.4" layer="16"/>
<wire x1="-3.15" y1="67.075" x2="-3.225" y2="67" width="0.4" layer="16"/>
</signal>
<signal name="KICK_GATE">
<contactref element="R26" pad="2"/>
<contactref element="R25" pad="1"/>
<contactref element="U3" pad="5"/>
<wire x1="29.15" y1="41.905" x2="27.845" y2="41.905" width="0.4" layer="1"/>
<wire x1="27.845" y1="41.905" x2="27.25" y2="42.5" width="0.4" layer="1"/>
<wire x1="27.25" y1="42.5" x2="27.25" y2="61.25" width="0.4" layer="1"/>
<wire x1="23.5" y1="65" x2="27.25" y2="61.25" width="0.4" layer="1"/>
<wire x1="22.275" y1="67" x2="23.5" y2="67" width="0.4" layer="16"/>
<via x="23.5" y="67" extent="1-16" drill="0.35"/>
<wire x1="23.5" y1="67" x2="23.5" y2="65" width="0.4" layer="1"/>
<wire x1="22.35" y1="69.5" x2="22.35" y2="67.075" width="0.4" layer="16"/>
<wire x1="22.35" y1="67.075" x2="22.275" y2="67" width="0.4" layer="16"/>
</signal>
<signal name="CHIP">
<contactref element="R30" pad="2"/>
<contactref element="U3" pad="2"/>
<contactref element="U4" pad="20"/>
<wire x1="38.285" y1="37.965" x2="38.285" y2="33.6" width="0.4" layer="1"/>
<wire x1="37" y1="39.1" x2="37.15" y2="39.1" width="0.4" layer="1"/>
<wire x1="37.15" y1="39.1" x2="38.285" y2="37.965" width="0.4" layer="1"/>
<wire x1="34.35" y1="39.365" x2="36.735" y2="39.365" width="0.4" layer="1"/>
<wire x1="36.735" y1="39.365" x2="37" y2="39.1" width="0.4" layer="1"/>
</signal>
<signal name="KICK">
<contactref element="R29" pad="2"/>
<contactref element="U3" pad="4"/>
<contactref element="U4" pad="19"/>
<wire x1="39.1" y1="40.65" x2="37" y2="40.65" width="0.4" layer="1"/>
<wire x1="39.555" y1="33.6" x2="39.555" y2="40.195" width="0.4" layer="1"/>
<wire x1="39.555" y1="40.195" x2="39.1" y2="40.65" width="0.4" layer="1"/>
<wire x1="35.595" y1="41.905" x2="34.35" y2="41.905" width="0.4" layer="1"/>
<wire x1="37" y1="40.65" x2="36.85" y2="40.65" width="0.4" layer="1"/>
<wire x1="36.85" y1="40.65" x2="35.595" y2="41.905" width="0.4" layer="1"/>
</signal>
<signal name="N$7">
<contactref element="R23" pad="2"/>
<contactref element="Q5" pad="1"/>
<contactref element="D9" pad="C"/>
<wire x1="-7.45" y1="67" x2="-4.775" y2="67" width="0.4" layer="16"/>
<wire x1="-7.45" y1="67" x2="-7.5" y2="66.95" width="0.4" layer="16"/>
<wire x1="-4.775" y1="67" x2="-4.775" y2="64.485" width="0.4" layer="16"/>
<wire x1="-4.775" y1="64.485" x2="-5.8" y2="63.46" width="0.4" layer="16"/>
</signal>
<signal name="N$8">
<contactref element="R25" pad="2"/>
<contactref element="Q6" pad="1"/>
<contactref element="D11" pad="C"/>
<wire x1="18.05" y1="67" x2="20.725" y2="67" width="0.4" layer="16"/>
<wire x1="18.05" y1="67" x2="18" y2="66.95" width="0.4" layer="16"/>
<wire x1="20.725" y1="67" x2="20.725" y2="64.485" width="0.4" layer="16"/>
<wire x1="20.725" y1="64.485" x2="19.7" y2="63.46" width="0.4" layer="16"/>
</signal>
<signal name="QUICK_DISCHARGE">
<contactref element="Q4" pad="1"/>
<contactref element="D7" pad="C"/>
<contactref element="Q3" pad="3"/>
<wire x1="-20.45" y1="56.1" x2="-20.45" y2="58.75" width="0.2" layer="1"/>
<wire x1="-20.75" y1="55.8" x2="-20.45" y2="56.1" width="0.2" layer="1"/>
<wire x1="-20.45" y1="58.75" x2="-20.45" y2="69.25" width="0.2" layer="1"/>
<wire x1="-20.45" y1="69.25" x2="-19.2" y2="70.5" width="0.2" layer="1"/>
<contactref element="R20" pad="1"/>
<wire x1="-23.55" y1="55.75" x2="-20.8" y2="55.75" width="0.2" layer="1"/>
<wire x1="-20.8" y1="55.75" x2="-20.75" y2="55.8" width="0.2" layer="1"/>
</signal>
<signal name="N$10">
<contactref element="R21" pad="1"/>
<contactref element="R22" pad="2"/>
<contactref element="Q3" pad="1"/>
<wire x1="-16.8" y1="69.55" x2="-15.1" y2="69.55" width="0.2" layer="1"/>
<wire x1="-15.1" y1="69.55" x2="-15" y2="69.65" width="0.2" layer="1"/>
<wire x1="-15" y1="69.65" x2="-12.75" y2="69.65" width="0.2" layer="1"/>
</signal>
<signal name="N$12">
<contactref element="R18" pad="1"/>
<contactref element="Q4" pad="FIN"/>
<wire x1="-4" y1="53.5" x2="-14.5" y2="53.5" width="1" layer="1"/>
<wire x1="2.46" y1="50.83" x2="-1.33" y2="50.83" width="1" layer="1"/>
<wire x1="-1.33" y1="50.83" x2="-4" y2="53.5" width="1" layer="1"/>
<contactref element="D6" pad="C"/>
<wire x1="-22.25" y1="76" x2="-12.5" y2="76" width="0.2" layer="1"/>
<wire x1="-11.5" y1="75" x2="-12.5" y2="76" width="0.2" layer="1"/>
<wire x1="-14.5" y1="53.5" x2="-11.5" y2="56.5" width="0.2" layer="1"/>
<wire x1="-11.5" y1="56.5" x2="-11.5" y2="75" width="0.2" layer="1"/>
</signal>
<signal name="N$13">
<contactref element="D6" pad="A"/>
<contactref element="R19" pad="1"/>
<wire x1="-31.5" y1="54.2" x2="-31.5" y2="55" width="0.2" layer="1"/>
<wire x1="-31.5" y1="55" x2="-28.5" y2="58" width="0.2" layer="1"/>
<wire x1="-28.5" y1="58" x2="-28.5" y2="68" width="0.2" layer="1"/>
<wire x1="-28.5" y1="68" x2="-27.5" y2="69" width="0.2" layer="1"/>
<wire x1="-27.5" y1="69" x2="-25.5" y2="69" width="0.2" layer="1"/>
<wire x1="-25.5" y1="69" x2="-25" y2="69.5" width="0.2" layer="1"/>
<wire x1="-25" y1="75.5" x2="-24.5" y2="76" width="0.2" layer="1"/>
<wire x1="-24.5" y1="76" x2="-23.75" y2="76" width="0.2" layer="1"/>
<wire x1="-25" y1="69.5" x2="-25" y2="75.5" width="0.2" layer="1"/>
</signal>
<signal name="MISO">
<contactref element="U4" pad="3"/>
<contactref element="J3" pad="8"/>
<wire x1="40.825" y1="24.4" x2="40.825" y2="25.825" width="0.2" layer="1"/>
<wire x1="40.825" y1="25.825" x2="44" y2="29" width="0.2" layer="1"/>
<wire x1="49.75" y1="29" x2="44" y2="29" width="0.2" layer="1"/>
<wire x1="62.75" y1="38.5" x2="61.25" y2="38.5" width="0.2" layer="1"/>
<wire x1="57.75" y1="35" x2="52.25" y2="35" width="0.2" layer="1"/>
<wire x1="52.25" y1="35" x2="50.5" y2="33.25" width="0.2" layer="1"/>
<wire x1="61.25" y1="38.5" x2="57.75" y2="35" width="0.2" layer="1"/>
<wire x1="50.5" y1="33.25" x2="50.5" y2="29.75" width="0.2" layer="1"/>
<wire x1="50.5" y1="29.75" x2="49.75" y2="29" width="0.2" layer="1"/>
</signal>
<signal name="MOSI">
<contactref element="U4" pad="7"/>
<contactref element="J3" pad="7"/>
<wire x1="62.75" y1="37.5" x2="61" y2="37.5" width="0.2" layer="1"/>
<wire x1="58" y1="34.5" x2="61" y2="37.5" width="0.2" layer="1"/>
<wire x1="45.905" y1="24.4" x2="45.905" y2="25.905" width="0.2" layer="1"/>
<wire x1="50" y1="28.5" x2="48.5" y2="28.5" width="0.2" layer="1"/>
<wire x1="45.905" y1="25.905" x2="48.5" y2="28.5" width="0.2" layer="1"/>
<wire x1="58" y1="34.5" x2="52.5" y2="34.5" width="0.2" layer="1"/>
<wire x1="52.5" y1="34.5" x2="51" y2="33" width="0.2" layer="1"/>
<wire x1="51" y1="33" x2="51" y2="29.5" width="0.2" layer="1"/>
<wire x1="51" y1="29.5" x2="50" y2="28.5" width="0.2" layer="1"/>
</signal>
<signal name="SCK">
<contactref element="U4" pad="8"/>
<contactref element="J3" pad="6"/>
<wire x1="62.75" y1="36.5" x2="60.75" y2="36.5" width="0.2" layer="1"/>
<wire x1="47.175" y1="24.4" x2="47.175" y2="26.425" width="0.2" layer="1"/>
<wire x1="47.175" y1="26.425" x2="48.75" y2="28" width="0.2" layer="1"/>
<wire x1="50.25" y1="28" x2="48.75" y2="28" width="0.2" layer="1"/>
<wire x1="58.25" y1="34" x2="52.75" y2="34" width="0.2" layer="1"/>
<wire x1="52.75" y1="34" x2="51.5" y2="32.75" width="0.2" layer="1"/>
<wire x1="60.75" y1="36.5" x2="58.25" y2="34" width="0.2" layer="1"/>
<wire x1="51.5" y1="32.75" x2="51.5" y2="29.25" width="0.2" layer="1"/>
<wire x1="51.5" y1="29.25" x2="50.25" y2="28" width="0.2" layer="1"/>
</signal>
<signal name="!KICKER_SELECT">
<contactref element="J3" pad="5"/>
<contactref element="U4" pad="9"/>
<wire x1="62.75" y1="35.5" x2="60.5" y2="35.5" width="0.2" layer="1"/>
<wire x1="50.5" y1="27.5" x2="49" y2="27.5" width="0.2" layer="1"/>
<wire x1="48.445" y1="24.4" x2="48.445" y2="26.945" width="0.2" layer="1"/>
<wire x1="48.445" y1="26.945" x2="49" y2="27.5" width="0.2" layer="1"/>
<wire x1="58.5" y1="33.5" x2="53" y2="33.5" width="0.2" layer="1"/>
<wire x1="53" y1="33.5" x2="52" y2="32.5" width="0.2" layer="1"/>
<wire x1="60.5" y1="35.5" x2="58.5" y2="33.5" width="0.2" layer="1"/>
<wire x1="52" y1="32.5" x2="52" y2="29" width="0.2" layer="1"/>
<wire x1="52" y1="29" x2="50.5" y2="27.5" width="0.2" layer="1"/>
</signal>
<signal name="BB_TX">
<contactref element="R34" pad="1"/>
<contactref element="U4" pad="14"/>
<wire x1="45.905" y1="33.6" x2="45.905" y2="36.595" width="0.2" layer="1"/>
<wire x1="45.905" y1="36.595" x2="44.5" y2="38" width="0.2" layer="1"/>
<wire x1="44.5" y1="38" x2="42.5" y2="38" width="0.2" layer="1"/>
<wire x1="42.5" y1="38" x2="41.75" y2="38.75" width="0.2" layer="1"/>
<wire x1="41.75" y1="38.75" x2="41.75" y2="40.75" width="0.2" layer="1"/>
<wire x1="41.75" y1="40.75" x2="39.75" y2="42.75" width="0.2" layer="1"/>
<wire x1="39.75" y1="42.75" x2="39.75" y2="45.5" width="0.2" layer="1"/>
<wire x1="38" y1="47.25" x2="33.75" y2="47.25" width="0.2" layer="1"/>
<wire x1="33.75" y1="47.25" x2="29" y2="52" width="0.2" layer="1"/>
<wire x1="39.75" y1="45.5" x2="38" y2="47.25" width="0.2" layer="1"/>
<wire x1="28" y1="65" x2="29" y2="64" width="0.2" layer="1"/>
<wire x1="29" y1="52" x2="29" y2="64" width="0.2" layer="1"/>
<wire x1="28" y1="66.65" x2="28" y2="65" width="0.2" layer="1"/>
</signal>
<signal name="BB_RX">
<contactref element="R33" pad="1"/>
<contactref element="U4" pad="17"/>
<wire x1="42.4" y1="35.4" x2="42.4" y2="36.5" width="0.2" layer="1"/>
<wire x1="42.095" y1="33.6" x2="42.095" y2="35.095" width="0.2" layer="1"/>
<wire x1="42.095" y1="35.095" x2="42.4" y2="35.4" width="0.2" layer="1"/>
<contactref element="J6" pad="2"/>
<wire x1="42.4" y1="36.5" x2="42.4" y2="37.35" width="0.2" layer="1"/>
<wire x1="41.25" y1="38.5" x2="41.25" y2="40.5" width="0.2" layer="1"/>
<wire x1="41.25" y1="40.5" x2="39.25" y2="42.5" width="0.2" layer="1"/>
<wire x1="42.4" y1="37.35" x2="41.25" y2="38.5" width="0.2" layer="1"/>
<wire x1="39.25" y1="45.25" x2="38" y2="46.5" width="0.2" layer="1"/>
<wire x1="39.25" y1="42.5" x2="39.25" y2="45.25" width="0.2" layer="1"/>
<wire x1="38" y1="46.5" x2="33.5" y2="46.5" width="0.2" layer="1"/>
<wire x1="33.5" y1="46.5" x2="28.5" y2="51.5" width="0.2" layer="1"/>
<wire x1="28.5" y1="63.75" x2="24" y2="68.25" width="0.2" layer="1"/>
<wire x1="24" y1="68.25" x2="23" y2="68.25" width="0.2" layer="1"/>
<wire x1="23" y1="68.25" x2="20.75" y2="70.5" width="0.2" layer="1"/>
<wire x1="20.75" y1="70.5" x2="4.5" y2="70.5" width="0.2" layer="1"/>
<wire x1="4.5" y1="70.5" x2="3.5" y2="71.5" width="0.2" layer="1"/>
<wire x1="28.5" y1="51.5" x2="28.5" y2="63.75" width="0.2" layer="1"/>
</signal>
<signal name="N$6">
<contactref element="R34" pad="2"/>
<contactref element="J5" pad="1"/>
<wire x1="28" y1="68.35" x2="24.65" y2="68.35" width="0.2" layer="1"/>
<wire x1="23.5" y1="69.5" x2="24.65" y2="68.35" width="0.2" layer="1"/>
<wire x1="23.5" y1="71.5" x2="23.5" y2="69.5" width="0.2" layer="1"/>
</signal>
<signal name="N$14">
<contactref element="R35" pad="1"/>
<contactref element="S1" pad="3"/>
<wire x1="39.141240625" y1="66.55545625" x2="37.75" y2="65.164215625" width="0.2" layer="1"/>
<wire x1="37.75" y1="65.164215625" x2="37.75" y2="64.1" width="0.2" layer="1"/>
</signal>
<signal name="MODE_SELECT">
<contactref element="R35" pad="2"/>
<wire x1="37.75" y1="62.4" x2="37.75" y2="48.25" width="0.2" layer="1"/>
<wire x1="40.25" y1="45.75" x2="40.25" y2="43" width="0.2" layer="1"/>
<wire x1="40.25" y1="43" x2="42.25" y2="41" width="0.2" layer="1"/>
<wire x1="37.75" y1="48.25" x2="40.25" y2="45.75" width="0.2" layer="1"/>
<contactref element="U4" pad="13"/>
<wire x1="42.25" y1="39" x2="42.75" y2="38.5" width="0.2" layer="1"/>
<wire x1="44.75" y1="38.5" x2="42.75" y2="38.5" width="0.2" layer="1"/>
<wire x1="42.25" y1="41" x2="42.25" y2="39" width="0.2" layer="1"/>
<wire x1="47.175" y1="33.6" x2="47.175" y2="36.075" width="0.2" layer="1"/>
<wire x1="47.175" y1="36.075" x2="44.75" y2="38.5" width="0.2" layer="1"/>
</signal>
<signal name="N$16">
<polygon width="0.2" layer="16" pour="cutout">
<vertex x="22.5" y="40.5"/>
<vertex x="23" y="40.5"/>
<vertex x="26.5" y="37"/>
<vertex x="26.5" y="-3.5"/>
<vertex x="70" y="-3.5"/>
<vertex x="70" y="-4"/>
<vertex x="26" y="-4"/>
<vertex x="26" y="37"/>
</polygon>
</signal>
<signal name="N$9">
<polygon width="0.2" layer="16" pour="cutout">
<vertex x="-70" y="-3.5"/>
<vertex x="-26.5" y="-3.5"/>
<vertex x="-26.5" y="34.5"/>
<vertex x="-26" y="34.5"/>
<vertex x="-26" y="-4"/>
<vertex x="-70" y="-4"/>
</polygon>
</signal>
<signal name="!BTN_CHP_PRE">
<contactref element="U5" pad="3"/>
<contactref element="R36" pad="1"/>
<contactref element="S2" pad="C"/>
<wire x1="49.7" y1="16.95" x2="49.3" y2="16.95" width="0.2" layer="1"/>
<wire x1="50.35" y1="17.6" x2="50.35" y2="18.5" width="0.2" layer="1"/>
<wire x1="50.35" y1="17.6" x2="49.7" y2="16.95" width="0.2" layer="1"/>
<contactref element="J8" pad="1"/>
<wire x1="60.38" y1="27.65" x2="58" y2="25.27" width="0.2" layer="1"/>
<wire x1="67.5" y1="27.65" x2="60.38" y2="27.65" width="0.2" layer="1"/>
<wire x1="50.35" y1="18.5" x2="54" y2="18.5" width="0.2" layer="1"/>
<wire x1="55" y1="19.5" x2="54" y2="18.5" width="0.2" layer="1"/>
<wire x1="58" y1="25.27" x2="55.77" y2="25.27" width="0.2" layer="1"/>
<wire x1="55.77" y1="25.27" x2="55" y2="24.5" width="0.2" layer="1"/>
<wire x1="55" y1="24.5" x2="55" y2="19.5" width="0.2" layer="1"/>
</signal>
<signal name="!BTN_KCK_PRE">
<contactref element="U5" pad="1"/>
<contactref element="R37" pad="1"/>
<contactref element="S3" pad="C"/>
<wire x1="49.3" y1="15.05" x2="49.7" y2="15.05" width="0.2" layer="1"/>
<wire x1="50.35" y1="13.5" x2="50.35" y2="15.05" width="0.2" layer="1"/>
<wire x1="50.35" y1="15.05" x2="49.3" y2="15.05" width="0.2" layer="1"/>
<contactref element="J7" pad="1"/>
<wire x1="50.35" y1="15.05" x2="57.78" y2="15.05" width="0.2" layer="1"/>
<wire x1="58" y1="15.27" x2="57.78" y2="15.05" width="0.2" layer="1"/>
<wire x1="60.38" y1="17.65" x2="58" y2="15.27" width="0.2" layer="1"/>
<wire x1="67.5" y1="17.65" x2="60.38" y2="17.65" width="0.2" layer="1"/>
</signal>
<signal name="!BTN_CHG_PRE">
<contactref element="U6" pad="3"/>
<contactref element="R38" pad="1"/>
<contactref element="S4" pad="C"/>
<wire x1="49.3" y1="9.7" x2="50.35" y2="9.7" width="0.2" layer="1"/>
<wire x1="50.35" y1="11.25" x2="50.35" y2="9.7" width="0.2" layer="1"/>
<contactref element="J9" pad="1"/>
<wire x1="58" y1="7.65" x2="58" y2="5.27" width="0.2" layer="1"/>
<wire x1="58" y1="7.65" x2="67.5" y2="7.65" width="0.2" layer="1"/>
<wire x1="55.95" y1="9.7" x2="58" y2="7.65" width="0.2" layer="1"/>
<wire x1="50.35" y1="9.7" x2="55.95" y2="9.7" width="0.2" layer="1"/>
</signal>
<signal name="N$2">
<contactref element="R17" pad="1"/>
<contactref element="R20" pad="2"/>
<wire x1="-29.25" y1="55.25" x2="-29.25" y2="54.2" width="0.2" layer="1"/>
<wire x1="-25.45" y1="55.75" x2="-28.75" y2="55.75" width="0.2" layer="1"/>
<wire x1="-28.75" y1="55.75" x2="-29.25" y2="55.25" width="0.2" layer="1"/>
</signal>
<signal name="N$11">
<contactref element="R14" pad="1"/>
<contactref element="R15" pad="2"/>
<wire x1="-33.75" y1="56.55" x2="-33.75" y2="54.2" width="0.2" layer="1"/>
</signal>
<signal name="!BTN_KCK">
<contactref element="U5" pad="6"/>
<contactref element="U4" pad="4"/>
<wire x1="44.95" y1="15.05" x2="46.7" y2="15.05" width="0.2" layer="1"/>
<wire x1="42.095" y1="24.4" x2="42.095" y2="17.905" width="0.2" layer="1"/>
<wire x1="42.095" y1="17.905" x2="44.95" y2="15.05" width="0.2" layer="1"/>
</signal>
<signal name="!BTN_CHP">
<contactref element="U5" pad="4"/>
<contactref element="U4" pad="10"/>
<wire x1="49.715" y1="24.4" x2="49.715" y2="21.715" width="0.2" layer="1"/>
<wire x1="49" y1="21" x2="49.715" y2="21.715" width="0.2" layer="1"/>
<wire x1="46.7" y1="16.95" x2="46.7" y2="20.2" width="0.2" layer="1"/>
<wire x1="46.7" y1="20.2" x2="47.5" y2="21" width="0.2" layer="1"/>
<wire x1="47.5" y1="21" x2="49" y2="21" width="0.2" layer="1"/>
</signal>
<signal name="!BTN_CHG">
<contactref element="U6" pad="4"/>
<contactref element="U4" pad="2"/>
<wire x1="39.555" y1="24.4" x2="39.555" y2="22.445" width="0.2" layer="1"/>
<wire x1="39.555" y1="22.445" x2="41.5" y2="20.5" width="0.2" layer="1"/>
<wire x1="41.5" y1="20.5" x2="41.5" y2="17.5" width="0.2" layer="1"/>
<wire x1="41.5" y1="17.5" x2="45.5" y2="13.5" width="0.2" layer="1"/>
<wire x1="46.7" y1="9.7" x2="45.8" y2="9.7" width="0.2" layer="1"/>
<wire x1="45.8" y1="9.7" x2="45.5" y2="10" width="0.2" layer="1"/>
<wire x1="45.5" y1="10" x2="45.5" y2="13.5" width="0.2" layer="1"/>
</signal>
<signal name="VMON">
<contactref element="U4" pad="1"/>
<contactref element="R31" pad="2"/>
<contactref element="R28" pad="1"/>
<wire x1="38.285" y1="22.965" x2="38.285" y2="24.4" width="0.2" layer="1"/>
<wire x1="38.85" y1="22.4" x2="38.85" y2="19" width="0.2" layer="1"/>
<wire x1="38.85" y1="22.4" x2="38.285" y2="22.965" width="0.2" layer="1"/>
<wire x1="41" y1="12.45" x2="41" y2="18" width="0.2" layer="1"/>
<wire x1="40" y1="19" x2="41" y2="18" width="0.2" layer="1"/>
<wire x1="38.85" y1="19" x2="40" y2="19" width="0.2" layer="1"/>
</signal>
<signal name="N$15">
<contactref element="R27" pad="1"/>
<contactref element="R28" pad="2"/>
<wire x1="41" y1="10.55" x2="41" y2="7.95" width="0.2" layer="1"/>
</signal>
<signal name="N$17">
<polygon width="0.2" layer="16" pour="cutout">
<vertex x="22.5" y="45"/>
<vertex x="23" y="45"/>
<vertex x="23" y="55"/>
<vertex x="16.5" y="55"/>
<vertex x="16.5" y="40"/>
<vertex x="-2.5" y="40"/>
<vertex x="-2.5" y="55"/>
<vertex x="-9" y="55"/>
<vertex x="-9" y="39.5"/>
<vertex x="-8.5" y="39.5"/>
<vertex x="-8.5" y="54.5"/>
<vertex x="-3" y="54.5"/>
<vertex x="-3" y="39.5"/>
<vertex x="17" y="39.5"/>
<vertex x="17" y="54.5"/>
<vertex x="22.5" y="54.5"/>
</polygon>
</signal>
<signal name="HOLE1">
<via x="-57" y="56.94" extent="1-16" drill="3.8" diameter="7.2"/>
</signal>
<signal name="HOLE3">
<via x="-48.5" y="0.94" extent="1-16" drill="3.8" diameter="7.2"/>
</signal>
<signal name="HOLE4">
<via x="48.5" y="0.94" extent="1-16" drill="3.8" diameter="7.2"/>
</signal>
<signal name="HOLE2">
<via x="57" y="56.94" extent="1-16" drill="3.8" diameter="7.2"/>
</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>

repository: RoboJackets/robocup-pcb

license_type: permissive

repo_name: RoboJackets/robocup-pcb

branch_name: refs/heads/master

gha_language: TeX

extension: brd


text:
/**
* Copyright(C) 2009-2012
* @author Jing HUANG
* @file glInfo.cpp
* @brief
* @date 1/2/2011
*/

#include "glInfo.h"
#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cstring>
#include <assert.h>

namespace Etoile
{

	void glInfo::initAllOpenGL()
	{
		if(!_isInitGlew)
		{
			initGLEW();
		}
		if(!_isInitGlut)
		{
			initGLUT();
		}
		// initOpenGLGeneral(true);
	}

	void glInfo::initOpenGLGeneral(bool output)
	{
		getOpenGLInfo();
		if(output)
			printOpenGLInfo();
	}

	void glInfo::initGLUT(bool output)
	{
		_isInitGlut = false;
		int argc = 0;
		char* argv = 0;

#if defined( _MSC_VER )

#else
		glutInit(&argc,&argv);
#endif //
		if(output)
			std::cout<<"glut init"<<std::endl;
	}

	void glInfo::initGLEW(bool output)
	{
		_isInitGlew = true;
		GLenum errorEnum = glewInit();

		if(!output) return;

		std::cout<<"glew init"<<std::endl;
		const char* str = (char*)glewGetString(GLEW_VERSION);
		if(str) this->glewversion = str;                 // check NULL return value

		if ( GLEW_OK != errorEnum ) {
			std::cout<< "Error Initializing Glew: " << glewGetErrorString( errorEnum ) << std::endl;
			assert( 0 );
			exit( 1 );
			return;
		}
		printOpenGLError();
		if (glewIsSupported("GL_VERSION_2_0")){
			std::cout<<"Ready for OpenGL 2.0"<<std::endl;
			std::cout<<"OpenGLEW version :"<<str<<std::endl;
		}else {
			std::cout<<"OpenGL 2.0 not supported\n"<<std::endl;

		}
		printOpenGLError();
		//	const GLubyte* str = glGetString( GL_EXTENSIONS );

		if (glewGetExtension ("GL_ARB_vertex_shader")        != GL_TRUE ||
			glewGetExtension ("GL_ARB_shader_objects")       != GL_TRUE /*||
																		glewGetExtension ("GL_ARB_shading_language_100") != GL_TRUE*/) {
																			std::cout << "Driver does not support OpenGL Shading Language" << std::endl;
																			exit (EXIT_FAILURE);
		}else{
			std::cout << "Driver supports OpenGL Shading Language" << std::endl;
			std::cout<<"Shading program version :"<<glGetString(GL_SHADING_LANGUAGE_VERSION)<<std::endl;
		}
		if (glewGetExtension ("GL_ARB_vertex_buffer_object") != GL_TRUE) {
			std::cout << "Driver does not support Vertex Buffer Objects" <<std::endl;
			exit (EXIT_FAILURE);
		}else{
			std::cout << "Driver supports Vertex Buffer Objects" <<std::endl;
		}

		if (glewGetExtension("GL_NVX_gpu_memory_info")){
			std::cout<<"Ready for GL_NVX_gpu_memory_info"<<std::endl;
		}else {
			std::cout<<"GL_NVX_gpu_memory_info not supported\n"<<std::endl;

		}
	}

	///////////////////////////////////////////////////////////////////////////////
	// extract openGL info
	// This function must be called after GL rendering context opened.
	///////////////////////////////////////////////////////////////////////////////
	bool glInfo::getOpenGLInfo()
	{
		char* str = 0;
		std::string tok;

		// get vendor string
		str = (char*)glGetString(GL_VENDOR);
		if(str) this->vendor = str;                  // check NULL return value
		else return false;

		// get renderer string
		str = (char*)glGetString(GL_RENDERER);
		if(str) this->renderer = str;                // check NULL return value
		else return false;

		// get version string
		str = (char*)glGetString(GL_VERSION);
		if(str) this->version = str;                 // check NULL return value
		else return false;

		//  so wired glGetString(GL_EXTENSIONS); antialising pb
		// get all extensions as a string
		str = (char*)glGetString(GL_EXTENSIONS);

		// split extensions
		if(str)
		{
			std::stringstream stream(str);
			while(stream.eof())
			{
				stream >> tok;
				this->extensions.push_back(tok);    // put a extension into struct
			}
		}
		else
		{
			return false;
		}

		// sort extension by alphabetical order
		std::sort(this->extensions.begin(), this->extensions.end());

		// get number of color bits
		glGetIntegerv(GL_RED_BITS, &this->redBits);
		glGetIntegerv(GL_GREEN_BITS, &this->greenBits);
		glGetIntegerv(GL_BLUE_BITS, &this->blueBits);
		glGetIntegerv(GL_ALPHA_BITS, &this->alphaBits);

		// get depth bits
		glGetIntegerv(GL_DEPTH_BITS, &this->depthBits);

		// get stecil bits
		glGetIntegerv(GL_STENCIL_BITS, &this->stencilBits);

		// get max number of lights allowed
		glGetIntegerv(GL_MAX_LIGHTS, &this->maxLights);

		// get max texture resolution
		glGetIntegerv(GL_MAX_TEXTURE_SIZE, &this->maxTextureSize);

		// get max number of clipping planes
		glGetIntegerv(GL_MAX_CLIP_PLANES, &this->maxClipPlanes);

		// get max modelview and projection matrix stacks
		glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, &this->maxModelViewStacks);
		glGetIntegerv(GL_MAX_PROJECTION_STACK_DEPTH, &this->maxProjectionStacks);
		glGetIntegerv(GL_MAX_ATTRIB_STACK_DEPTH, &this->maxAttribStacks);

		// get max texture stacks
		glGetIntegerv(GL_MAX_TEXTURE_STACK_DEPTH, &this->maxTextureStacks);

		return true;
	}

	///////////////////////////////////////////////////////////////////////////////
	// check if the video card support a certain extension
	///////////////////////////////////////////////////////////////////////////////
	bool glInfo::isOpenGLExtensionSupported(const std::string& ext)
	{
		// search corresponding extension
		std::vector<std::string>::const_iterator iter = this->extensions.begin();
		std::vector<std::string>::const_iterator endIter = this->extensions.end();

		while(iter != endIter)
		{
			if(ext == *iter)
				return true;
			else
				++iter;
		}
		return false;
	}

	///////////////////////////////////////////////////////////////////////////////
	// print OpenGL info to screen and save to a file
	///////////////////////////////////////////////////////////////////////////////
	void glInfo::printOpenGLInfo()
	{
		std::stringstream ss;

		ss << std::endl; // blank line
		ss << "OpenGL Driver Info" << std::endl;
		ss << "==================" << std::endl;
		ss << "Vendor: " << this->vendor << std::endl;
		ss << "Version: " << this->version << std::endl;
		ss << "Renderer: " << this->renderer << std::endl;

		ss << std::endl;
		ss << "Color Bits(R,G,B,A): (" << this->redBits << ", " << this->greenBits
			<< ", " << this->blueBits << ", " << this->alphaBits << ")\n";
		ss << "Depth Bits: " << this->depthBits << std::endl;
		ss << "Stencil Bits: " << this->stencilBits << std::endl;

		ss << std::endl;
		ss << "Max Texture Size: " << this->maxTextureSize << "x" << this->maxTextureSize << std::endl;
		ss << "Max Lights: " << this->maxLights << std::endl;
		ss << "Max Clip Planes: " << this->maxClipPlanes << std::endl;
		ss << "Max Modelview Matrix Stacks: " << this->maxModelViewStacks << std::endl;
		ss << "Max Projection Matrix Stacks: " << this->maxProjectionStacks << std::endl;
		ss << "Max Attribute Stacks: " << this->maxAttribStacks << std::endl;
		ss << "Max Texture Stacks: " << this->maxTextureStacks << std::endl;

		ss << std::endl;
		ss << "Total Number of Extensions: " << this->extensions.size() << std::endl;
		ss << "==============================" << std::endl;
		for(unsigned int i = 0; i < this->extensions.size(); ++i)
			ss << this->extensions.at(i) << std::endl;

		ss << "======================================================================" << std::endl;

		std::cout << ss.str() << std::endl;
	}
}

extension: cpp


text:
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Microsoft.Azure.Services.AppAuthentication;
using Microsoft.Azure.KeyVault;
using Microsoft.Extensions.Configuration.AzureKeyVault;
using Microsoft.Azure.Storage.Blob;
using Microsoft.Azure.Storage.Auth;
using System.Diagnostics;

namespace AppInsightsToTeams
{
    public class AppInsightsToTeams
    {
        private readonly HttpClient _httpClient = new HttpClient();
        private ILogger _log;
        private Func<string, string> _configValue;
        private readonly CultureInfo cultureInfo = new CultureInfo("en-US");

        [FunctionName("AppInsightsAlertsToTeams")]
        public async Task<IActionResult> Run(
            [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req, ILogger log, ExecutionContext context)
        {
            _log = log;

            var azureServiceTokenProvider = new AzureServiceTokenProvider();
            var keyVaultClient = new KeyVaultClient(
                new KeyVaultClient.AuthenticationCallback(
                    azureServiceTokenProvider.KeyVaultTokenCallback));

            var _builder = new ConfigurationBuilder()
                .SetBasePath(context.FunctionAppDirectory)
                .AddJsonFile("local.settings.json", optional: true, reloadOnChange: true);

            if (Debugger.IsAttached)
            {
                _builder.AddUserSecrets<AppInsightsToTeams>();
            }

            var config = _builder
                .AddEnvironmentVariables()
                .Build();

            _configValue = (key) => config[$"{context.FunctionName}-{key}"];

            var keyVaultUrl = _configValue.Invoke("KeyVaultUrl");
            if (!string.IsNullOrWhiteSpace(keyVaultUrl))
                _builder.AddAzureKeyVault(keyVaultUrl, keyVaultClient, new DefaultKeyVaultSecretManager());

            config = _builder
                .Build();

            _configValue = (key) => config[$"{context.FunctionName}-{key}"];

            string requestBody;
            using (var streamReader = new StreamReader(req.Body))
            {
                requestBody = await streamReader.ReadToEndAsync();
            }

            var alert = JsonConvert.DeserializeObject<dynamic>(requestBody);
            var query = (string)alert.data.alertContext.SearchQuery;
            var queryStart = DateTime.Parse((string)alert.data.alertContext.SearchIntervalStartTimeUtc, cultureInfo);
            var queryEnd = DateTime.Parse((string)alert.data.alertContext.SearchIntervalEndtimeUtc, cultureInfo);

            var formattedStart = queryStart.ToString("yyyy-MM-dd HH:mm:ss");
            var formattedEnd = queryEnd.ToString("yyyy-MM-dd HH:mm:ss");

            var result = await FetchApplicationInsightsQueryResultsAsync(formattedStart, formattedEnd, (string)alert.data.alertContext.ApplicationId, query.Replace("\n", string.Empty));
            await PostApplicationInsightsQueryResultsToTeamsAsync(result, alert, formattedStart, formattedEnd);

            return new OkResult();
        }

        private async Task<dynamic> FetchApplicationInsightsQueryResultsAsync(string formattedStart, string formattedEnd, string appId, dynamic query)
        {
            _httpClient.DefaultRequestHeaders.Add("x-api-key", _configValue.Invoke($"ApiKey-{appId}"));

            var getUrl = $"https://api.applicationinsights.io/v1/apps/{appId}/query?timespan={formattedStart}/{formattedEnd}&query={query}";

            _log.LogInformation($"Attempting to get data from {getUrl}");

            var rawResult = await _httpClient.GetStringAsync(getUrl);

            _log.LogDebug($"Data received: {rawResult}");

            var result = JsonConvert.DeserializeObject<dynamic>(rawResult);
            return result;
        }

        private async Task PostApplicationInsightsQueryResultsToTeamsAsync(dynamic result, dynamic alert, string formattedStart, string formattedEnd)
        {
            _httpClient.DefaultRequestHeaders.Remove("x-api-key");

            var templateUri = $"{_configValue.Invoke("MessageCardTemplateBaseUrl").TrimEnd('/')}/{alert.data.essentials.alertRule}.json";

            _log.LogInformation($"Using template '{templateUri}'");

            const string StorageResource = "https://storage.azure.com/";
            var clientId = _configValue.Invoke("identityClientId");
            var azureServiceTokenProvider = new AzureServiceTokenProvider(string.IsNullOrWhiteSpace(clientId) ? null : $"RunAs=App;AppId={clientId}");
            var tokenCredential = new TokenCredential(await azureServiceTokenProvider.GetAccessTokenAsync(StorageResource));

            var storageCredentials = new StorageCredentials(tokenCredential);
            var blob = new CloudBlockBlob(new Uri(templateUri), storageCredentials);
            var cardTemplate = await blob.DownloadTextAsync();

            if ((int)result.tables.Count <= 0)
                return;

            if ((int)result.tables[0].columns.Count <= 0)
                return;

            var columns = new List<string>();

            foreach (var column in result.tables[0].columns)
            {
                columns.Add((string)column.name);
            }

            foreach (var row in result.tables[0].rows)
            {
                var currentMessage = cardTemplate
                    .Replace("[[alert.data.essentials.alertRule]]", (string)alert.data.essentials.alertRule)
                    .Replace("[[alert.data.essentials.description]]", (string)alert.data.essentials.description)
                    .Replace("[[alert.data.essentials.severity]]", (string)alert.data.essentials.severity)
                    .Replace("[[alert.alertContext.LinkToSearchResults]]", (string)alert.data.alertContext.LinkToSearchResults)
                    .Replace("[[alert.alertContext.Threshold]]", (string)alert.data.alertContext.Threshold)
                    .Replace("[[alert.alertContext.Operator]]", (string)alert.data.alertContext.Operator)
                    .Replace("[[alert.alertContext.SearchIntervalDurationMin]]", (string)alert.data.alertContext.SearchIntervalDurationMin)
                    .Replace("[[alert.alertContext.SearchIntervalInMinutes]]", (string)alert.data.alertContext.SearchIntervalInMinutes)
                    .Replace("[[alert.alertContext.SearchIntervalStartTimeUtc]]", formattedStart)
                    .Replace("[[alert.alertContext.SearchIntervalEndtimeUtc]]", formattedEnd);

                foreach (var column in result.tables[0].columns)
                {
                    currentMessage = currentMessage
                        .Replace($"[[searchResult.{(string)column.name}]]", (string)row[columns.IndexOf((string)column.name)]);
                }

                _log.LogDebug($"Sending data: {currentMessage}");

                var appId = (string) alert.data.alertContext.ApplicationId;
                await _httpClient.PostAsync(_configValue.Invoke($"PostToUrl-{appId}"), new StringContent(currentMessage, Encoding.UTF8, "application/json"));
            }
        }
    }
}

license: MIT

extension: cs


text:
#include <stdexcept>
#include "typedefs.hpp"
#include "misc.hpp"

void realmar::turing::throw_if_not_positive(const int& i) {
	if (i < 0) throw std::invalid_argument("Cannot perform operation with negative number.");
}

realmar::turing::word<int> realmar::turing::create_unary_expression(const int& a, const int& b) {
	word<int> w;
	w.reserve(a + b + 1);

	for (auto i = 0; i < a; ++i) w.emplace_back(0);
	w.emplace_back(1);
	for (auto i = 0; i < b; ++i) w.emplace_back(0);

	return w;
}

repository: realmar/turing-machine-cpp

repo_name: realmar/turing-machine-cpp


text:
DESCRIPTION = "Task to install headers and libraries of OpenCL/MP and related components"
LICENSE = "MIT"
PR = "r2"

PACKAGE_ARCH = "${MACHINE_ARCH}"

inherit packagegroup features_check

REQUIRED_DISTRO_FEATURES = "opencl"

UTILS = " \
    opencl-staticdev \
    ${@oe.utils.all_distro_features(d, 'openmp', 'openmpacc-dev')} \
"

UTILS:append:dra7xx = " \
    ${@oe.utils.all_distro_features(d, 'openmp', 'linalg-dev')} \
"

RDEPENDS:${PN} = "\
    ${UTILS} \
"

repository: rcn-ee/meta-arago

repo_name: rcn-ee/meta-arago

extension: bb


text:
<?xml version="1.0" encoding="UTF-8"?>
<drawing version="7">
    <attr value="spartan3e" name="DeviceFamilyName">
        <trait delete="all:0" />
        <trait editname="all:0" />
        <trait edittrait="all:0" />
    </attr>
    <netlist>
        <signal name="Clock" />
        <signal name="XLXN_2" />
        <signal name="XLXN_3" />
        <signal name="XLXN_4" />
        <signal name="XLXN_5" />
        <signal name="Qn" />
        <signal name="Q" />
        <signal name="S" />
        <signal name="R" />
        <signal name="Clear" />
        <signal name="Preset" />
        <port polarity="Input" name="Clock" />
        <port polarity="Output" name="Qn" />
        <port polarity="Output" name="Q" />
        <port polarity="Input" name="S" />
        <port polarity="Input" name="R" />
        <port polarity="Input" name="Clear" />
        <port polarity="Input" name="Preset" />
        <blockdef name="nor3">
            <timestamp>2000-1-1T10:10:10</timestamp>
            <line x2="48" y1="-64" y2="-64" x1="0" />
            <line x2="72" y1="-128" y2="-128" x1="0" />
            <line x2="48" y1="-192" y2="-192" x1="0" />
            <line x2="216" y1="-128" y2="-128" x1="256" />
            <circle r="12" cx="204" cy="-128" />
            <line x2="48" y1="-64" y2="-80" x1="48" />
            <line x2="48" y1="-192" y2="-176" x1="48" />
            <line x2="48" y1="-80" y2="-80" x1="112" />
            <line x2="48" y1="-176" y2="-176" x1="112" />
            <arc ex="48" ey="-176" sx="48" sy="-80" r="56" cx="16" cy="-128" />
            <arc ex="192" ey="-128" sx="112" sy="-80" r="88" cx="116" cy="-168" />
            <arc ex="112" ey="-176" sx="192" sy="-128" r="88" cx="116" cy="-88" />
        </blockdef>
        <blockdef name="and2">
            <timestamp>2000-1-1T10:10:10</timestamp>
            <line x2="64" y1="-64" y2="-64" x1="0" />
            <line x2="64" y1="-128" y2="-128" x1="0" />
            <line x2="192" y1="-96" y2="-96" x1="256" />
            <arc ex="144" ey="-144" sx="144" sy="-48" r="48" cx="144" cy="-96" />
            <line x2="64" y1="-48" y2="-48" x1="144" />
            <line x2="144" y1="-144" y2="-144" x1="64" />
            <line x2="64" y1="-48" y2="-144" x1="64" />
        </blockdef>
        <blockdef name="buf">
            <timestamp>2000-1-1T10:10:10</timestamp>
            <line x2="64" y1="-32" y2="-32" x1="0" />
            <line x2="128" y1="-32" y2="-32" x1="224" />
            <line x2="128" y1="0" y2="-32" x1="64" />
            <line x2="64" y1="-32" y2="-64" x1="128" />
            <line x2="64" y1="-64" y2="0" x1="64" />
        </blockdef>
        <block symbolname="nor3" name="XLXI_1">
            <blockpin signalname="XLXN_5" name="I0" />
            <blockpin signalname="XLXN_2" name="I1" />
            <blockpin signalname="Preset" name="I2" />
            <blockpin signalname="XLXN_4" name="O" />
        </block>
        <block symbolname="nor3" name="XLXI_2">
            <blockpin signalname="Clear" name="I0" />
            <blockpin signalname="XLXN_3" name="I1" />
            <blockpin signalname="XLXN_4" name="I2" />
            <blockpin signalname="XLXN_5" name="O" />
        </block>
        <block symbolname="and2" name="XLXI_3">
            <blockpin signalname="Clock" name="I0" />
            <blockpin signalname="S" name="I1" />
            <blockpin signalname="XLXN_2" name="O" />
        </block>
        <block symbolname="and2" name="XLXI_4">
            <blockpin signalname="R" name="I0" />
            <blockpin signalname="Clock" name="I1" />
            <blockpin signalname="XLXN_3" name="O" />
        </block>
        <block symbolname="buf" name="XLXI_5">
            <blockpin signalname="XLXN_4" name="I" />
            <blockpin signalname="Qn" name="O" />
        </block>
        <block symbolname="buf" name="XLXI_6">
            <blockpin signalname="XLXN_5" name="I" />
            <blockpin signalname="Q" name="O" />
        </block>
    </netlist>
    <sheet sheetnum="1" width="3520" height="2720">
        <instance x="1344" y="992" name="XLXI_1" orien="R0" />
        <instance x="1344" y="1232" name="XLXI_2" orien="R0" />
        <instance x="832" y="960" name="XLXI_3" orien="R0" />
        <instance x="832" y="1200" name="XLXI_4" orien="R0" />
        <branch name="Clock">
            <wire x2="800" y1="976" y2="976" x1="768" />
            <wire x2="816" y1="976" y2="976" x1="800" />
            <wire x2="816" y1="976" y2="1072" x1="816" />
            <wire x2="832" y1="1072" y2="1072" x1="816" />
            <wire x2="832" y1="896" y2="896" x1="816" />
            <wire x2="816" y1="896" y2="976" x1="816" />
        </branch>
        <branch name="XLXN_2">
            <wire x2="1344" y1="864" y2="864" x1="1088" />
        </branch>
        <branch name="XLXN_3">
            <wire x2="1344" y1="1104" y2="1104" x1="1088" />
        </branch>
        <branch name="XLXN_4">
            <wire x2="1344" y1="976" y2="1040" x1="1344" />
            <wire x2="1680" y1="976" y2="976" x1="1344" />
            <wire x2="1680" y1="864" y2="864" x1="1600" />
            <wire x2="1680" y1="864" y2="976" x1="1680" />
        </branch>
        <branch name="XLXN_5">
            <wire x2="1344" y1="928" y2="944" x1="1344" />
            <wire x2="1664" y1="944" y2="944" x1="1344" />
            <wire x2="1664" y1="944" y2="1104" x1="1664" />
            <wire x2="1664" y1="1104" y2="1104" x1="1600" />
        </branch>
        <instance x="1680" y="896" name="XLXI_5" orien="R0" />
        <instance x="1664" y="1136" name="XLXI_6" orien="R0" />
        <branch name="Qn">
            <wire x2="1936" y1="864" y2="864" x1="1904" />
        </branch>
        <iomarker fontsize="28" x="1936" y="864" name="Qn" orien="R0" />
        <branch name="Q">
            <wire x2="1920" y1="1104" y2="1104" x1="1888" />
        </branch>
        <iomarker fontsize="28" x="1920" y="1104" name="Q" orien="R0" />
        <iomarker fontsize="28" x="768" y="976" name="Clock" orien="R180" />
        <branch name="S">
            <wire x2="832" y1="832" y2="832" x1="800" />
        </branch>
        <iomarker fontsize="28" x="800" y="832" name="S" orien="R180" />
        <branch name="R">
            <wire x2="832" y1="1136" y2="1136" x1="800" />
        </branch>
        <iomarker fontsize="28" x="800" y="1136" name="R" orien="R180" />
        <branch name="Clear">
            <wire x2="1344" y1="1168" y2="1168" x1="1312" />
        </branch>
        <iomarker fontsize="28" x="1312" y="1168" name="Clear" orien="R180" />
        <branch name="Preset">
            <wire x2="1344" y1="800" y2="800" x1="1312" />
        </branch>
        <iomarker fontsize="28" x="1312" y="800" name="Preset" orien="R180" />
    </sheet>
</drawing>

extension: sch


text:
package main

import (
	"bytes"
	"fmt"
	"net/http"
	"regexp"

	"github.com/flosch/pongo2"
	"github.com/gholt/blackfridaytext"
	"gopkg.in/russross/blackfriday.v2"
)

func ParseMD(w http.ResponseWriter, content []byte, requestPath string) error {
	tmpl, err := pongo2.FromFile("templates/page-article.html")
	if err != nil {
		fmt.Println(err.Error())
		return err
	}
	context := pongo2.Context{}
	context["bodyClass"] = "devsite-doc-page"
	context["requestPath"] = requestPath
	context["isProd"] = flagProd
	context["domain"] = flagDomain
	context["siteVersion"] = SiteVersion
	context["serverVersion"] = GitVersion
	meta, offset := blackfridaytext.MarkdownMetadata(content)
	content = content[offset:]

	for _, val := range meta {
		context[val[0]] = val[1]
	}

	//TODO: include
	content = RenderContent(content)

	// add datetime
	publishDate := regexp.MustCompile(`{# published_on: (\d{4}-\d{2}-\d{2}) #}`).FindSubmatch(content)
	if len(publishDate) > 0 && !bytes.Equal(publishDate[1], []byte("1900-01-01")) {
		context["publishDate"] = string(publishDate[1])
	}
	updateDate := regexp.MustCompile(`{# updated_on: (\d{4}-\d{2}-\d{2}) #}`).FindSubmatch(content)
	if len(updateDate) > 0 && !bytes.Equal(updateDate[1], []byte("1900-01-01")) {
		context["updateDate"] = string(updateDate[1])
	}

	// remove comment
	content = regexp.MustCompile(`{#.+?#}`).ReplaceAll(content, []byte(""))
	content = regexp.MustCompile(`(?ms){% comment %}.*?{% endcomment %}`).ReplaceAll(content, []byte(""))

	// render callouts
	content = regexp.MustCompile(`(?ms)^Note: (.*?)\n^\n`).ReplaceAll(content, []byte("Note: $1\n"))
	content = regexp.MustCompile(`(?ms)^Caution: (.*?)\n^\n`).ReplaceAll(content, []byte("Caution: $1\n"))
	content = regexp.MustCompile(`(?ms)^Warning: (.*?)\n^\n`).ReplaceAll(content, []byte("Warning: $1\n"))
	content = regexp.MustCompile(`(?ms)^Key Point: (.*?)\n^\n`).ReplaceAll(content, []byte("Key Point: $1\n"))
	content = regexp.MustCompile(`(?ms)^Key Term: (.*?)\n^\n`).ReplaceAll(content, []byte("Key Term: $1\n"))
	content = regexp.MustCompile(`(?ms)^Objective: (.*?)\n^\n`).ReplaceAll(content, []byte("Objective: $1\n"))
	content = regexp.MustCompile(`(?ms)^Success: (.*?)\n^\n`).ReplaceAll(content, []byte("Success: $1\n"))
	content = regexp.MustCompile(`(?ms)^Dogfood: (.*?)\n^\n`).ReplaceAll(content, []byte("Dogfood: $1\n"))
	// fmt.Println(context)
	// fmt.Println(string(content))
	var extensions blackfriday.Extensions
	extensions |= blackfriday.Tables
	extensions |= blackfriday.FencedCode
	extensions |= blackfriday.Strikethrough
	extensions |= blackfriday.LaxHTMLBlocks
	// extensions |= blackfriday.AutoHeadingIDs
	var hp blackfriday.HTMLRendererParameters
	// hp.Flags |= blackfriday.TOC
	renderer := blackfriday.NewHTMLRenderer(hp)
	markdown := blackfriday.New(blackfriday.WithExtensions(extensions))
	ast := markdown.Parse(content)
	// content = blackfriday.Run(content, blackfriday.WithExtensions(extensions), blackfriday.WithRenderer(renderer))
	// context["content"] = string(content)
	var buf bytes.Buffer
	// renderer.RenderHeader(&buf, ast)
	// toc := buf.Bytes()
	// toc = regexp.MustCompile(`(?s)<nav>(.*?<ul>){2}`).ReplaceAll(toc, []byte(""))
	// toc = regexp.MustCompile(`(?s)</ul>\s*</li>\s*</ul>\s*</nav>`).ReplaceAll(toc, []byte(""))
	// toc = regexp.MustCompile(`<ul>`).ReplaceAll(toc, []byte("
"))
	// toc = regexp.MustCompile(`<a href`).ReplaceAll(toc, []byte("<a class=\"devsite-nav-title\" href"))
	// toc = regexp.MustCompile(`<li>`).ReplaceAll(toc, []byte("
"))
	// context["renderedTOC"] = string(toc)
	// buf.Reset()
	ast.Walk(func(node *blackfriday.Node, entering bool) blackfriday.WalkStatus {
		return renderer.RenderNode(&buf, node, entering)
	})
	renderer.RenderFooter(&buf, ast)
	content = buf.Bytes()
	context["content"] = string(content)
	// fmt.Println(string(content))
	project, parentProject, err := ParseProject(context["project_path"].(string))
	if err != nil {
		return err
	}
	book, err := ParseBook(context["book_path"].(string))
	if err != nil {
		return err
	}
	context["projectYaml"] = *project
	context["bookYaml"] = book
	context["lowerTabs"] = GetLowerTabs(requestPath, book)
	context["footerBanner"], context["footerPromos"], context["footerLinks"], err = ParseFooter(project.FooterPath)
	if err != nil {
		return err
	}
	context["renderedLeftNav"] = GetLeftNav(requestPath, book)

	context["logoRowIcon"] = project.Icon.Path
	if parentProject != nil {
		context["logoRowTitle"] = parentProject.Name
	} else {
		context["logoRowTitle"] = project.Name
	}
	context["headerTitle"] = project.Name
	// context["headerDescription"] = project.Description
	pageTitle := project.Name
	if parentProject != nil {
		pageTitle += " | " + parentProject.Name
	}
	// titleRO := regexp.MustCompile(`<h1 class="page-title".*?>(.*?)<\/h1>`).FindSubmatch(content)
	titleRO := regexp.MustCompile(`<h1>(.*?)<\/h1>`).FindSubmatch(content)
	if len(titleRO) > 0 {
		pageTitle = string(titleRO[1]) + " | " + pageTitle
	}
	context["pageTitle"] = pageTitle
	return tmpl.ExecuteWriter(context, w)
}

repository: adamyi/easfs

repo_name: adamyi/easfs

extension: go


text:
class Demo {
  constructor() {
    this.main()
  }
  main() {
    console.log()
  }
}
new Demo();

gha_license_id: MIT

gha_language: JavaScript

extension: ts