<?xml version="1.0" encoding="UTF-8"?>
#set $fpitch = float($pitch)
#set $mils = int($fpitch * 1000)
<module fritzingVersion="0.2.2.b.03.04.2550" moduleId="$uuid">
    <version>2</version>
    <author>Lionel Michel</author>
    <title>Screw terminal - $pins pins</title>
    <label>J</label>
    <date>$date</date>
    <tags>fritzing core</tags>
    <properties>
        <property name="family">Screw Terminal</property>
        <property name="Pins">$pins</property>
        <property name="Pin Spacing">${int(fpitch * 1000) / 1000.0}in (${int(fpitch * 1000 * 25.4) / 1000.0}mm)</property>
    </properties>
    <description>Screw terminal with $pins pins</description>
    <views>
        <iconView>
            <layers image="icon/screw_terminal.svg">
                <layer layerId="icon"></layer>
            </layers>
        </iconView>
        <breadboardView>
            <layers image="breadboard/screw_terminal_${pins}_100mil_bread.svg">
                <layer layerId="breadboard"></layer>
            </layers>
        </breadboardView>
        <schematicView fliphorizontal="true" >
            <layers image="schematic/screw_terminal_${pins}_100mil_schem.svg">
                <layer layerId="schematic"></layer>
            </layers>
        </schematicView>
        <pcbView>
            <layers image="pcb/screw_terminal_${pins}${postpin}_pcb.svg">
                <layer layerId="copper0"></layer>
                <layer layerId="silkscreen"></layer>
            </layers>
        </pcbView>
    </views>
    <connectors>
    #for $pin in range(int($pins))
        <connector id="connector${pin}" type="male" name="pin${pin + 1}">
            <description>Pin ${pin + 1}</description>
            <views>
                <breadboardView>
                    <p layer="breadboard" svgId="connector${pin}pin" ></p>
                </breadboardView>
                <schematicView>
                    <p layer="schematic" svgId="connector${pin}pin" terminalId="connector${pin}terminal"></p>
                </schematicView>
                <pcbView>
                    <p layer="copper0" svgId="connector${pin}pin"></p>
                </pcbView>
            </views>
        </connector>
    #end for
    </connectors>
</module>
