pcb-enum is a way to store categorical variables.
Right now we need to use a fully qualified name to define a new
pcb-enum. So if we wanted an enum named:
And we're defining it in a package named
Then the enum needs to be defined as follows:
public pcb-enum ocdb/components/espressif/esp32-wroom-32/Antenna :
All together this is what it looks like to define and use a
defpackage ocdb/components/espressif/esp32-wroom-32: ... public pcb-enum ocdb/components/espressif/esp32-wroom-32/Antenna : Integrated UMCX ; Using the pcb-enum as a type to define land pattern geometry pcb-landpattern esp32-wroom (antenna-type:Antenna) : switch(antenna-type): Integrated : package-y = 25.5 offset = (25.5 - 19.2) / 2.0 UMCX : package-y = 19.2 offset = 0.0
When you create a new enum, called
my-enum, Stanza (the language JITX uses) creates a new integer which represents the length of that enum, called
Just add a
-length to the end of any enum name to get its length.