pncconf: add 7i96s
This commit is contained in:
parent
4657973c9f
commit
21ad34edb4
3 changed files with 200 additions and 73 deletions
|
|
@ -1510,14 +1510,14 @@ class HAL:
|
|||
|
||||
def write_pins(pname,p,i,t):
|
||||
# for input pins
|
||||
if t == _PD.GPIOI:
|
||||
if t in (_PD.GPIOI, _PD.INM0):
|
||||
if not p == "unused-input":
|
||||
pinname = self.a.make_pinname(pname, substitution = self.d.useinisubstitution)
|
||||
print >>file, "\n# ---",p.upper(),"---"
|
||||
if "parport" in pinname:
|
||||
if i: print >>file, "net %s <= %s-not" % (p, pinname)
|
||||
else: print >>file, "net %s <= %s" % (p, pinname)
|
||||
elif "sserial" in pname:
|
||||
elif "sserial" in pname or t == _PD.INM0:
|
||||
if i: print >>file, "net %s <= "% (p)+pinname +"-not"
|
||||
else: print >>file, "net %s <= "% (p)+pinname
|
||||
else:
|
||||
|
|
@ -1605,7 +1605,7 @@ class HAL:
|
|||
|
||||
def write_pins(pname,p,i,t,boardnum,connector,port,channel,pin):
|
||||
# for output /open drain pins
|
||||
if t in (_PD.GPIOO,_PD.GPIOD,_PD.SSR0):
|
||||
if t in (_PD.GPIOO,_PD.GPIOD,_PD.SSR0,_PD.OUTM0):
|
||||
if not p == "unused-output":
|
||||
pinname = self.a.make_pinname(pname, substitution = self.d.useinisubstitution)
|
||||
print >>file, "\n# ---",p.upper(),"---"
|
||||
|
|
@ -1619,9 +1619,9 @@ class HAL:
|
|||
temp = pinname
|
||||
# mainboard GPIOO require extra setup commands
|
||||
else:
|
||||
if not t == _PD.SSR0: print >>file, "setp %s true"% (pinname + ".is_output")
|
||||
if t not in (_PD.SSR0,_PD.OUTM0): print >>file, "setp %s true"% (pinname + ".is_output")
|
||||
if t == _PD.GPIOD: print >>file, "setp "+pinname+".is_opendrain true"
|
||||
if t == _PD.SSR0:
|
||||
if t in (_PD.SSR0,_PD.OUTM0):
|
||||
temp = pinname
|
||||
else:
|
||||
temp = pinname + ".out"
|
||||
|
|
|
|||
|
|
@ -567,8 +567,15 @@ PNCconf will use internal firmware data"%self._p.FIRMDIR),True)
|
|||
# notused
|
||||
self.d._notusedliststore = gtk.ListStore(str,int)
|
||||
self.d._notusedliststore.append([_PD.pintype_notused[0],0])
|
||||
# ssr output
|
||||
self.d._ssrliststore = gtk.ListStore(str,int)
|
||||
self.d._ssrliststore.append([_PD.pintype_ssr[0],0])
|
||||
# outm output
|
||||
self.d._outmliststore = gtk.ListStore(str,int)
|
||||
self.d._outmliststore.append([_PD.pintype_outm[0],0])
|
||||
# inm input
|
||||
self.d._inmliststore = gtk.ListStore(str,int)
|
||||
self.d._inmliststore.append([_PD.pintype_inm[0],0])
|
||||
# gpio
|
||||
self.d._gpioliststore = gtk.ListStore(str,int)
|
||||
for number,text in enumerate(_PD.pintype_gpio):
|
||||
|
|
@ -1002,10 +1009,14 @@ PNCconf will use internal firmware data"%self._p.FIRMDIR),True)
|
|||
elif k in ("SSerial","SSERIAL"):
|
||||
l = modules[i].find("numinstances").text;#print l,k
|
||||
sserialports = int(l)
|
||||
elif k in ("None","NONE"):
|
||||
l = modules[i].find("numinstances").text;#print l,k
|
||||
elif k in ("ssr","SSR"):
|
||||
l = modules[i].find("numinstances").text;#print l,k
|
||||
elif k in ("None","NONE"):
|
||||
l = modules[i].find("numinstances").text;#print(l,k)
|
||||
elif k in ("ssr","SSR"):
|
||||
l = modules[i].find("numinstances").text;#print(l,k)
|
||||
elif k in ("out","OUTM"):
|
||||
l = modules[i].find("numinstances").text;#print(l,k)
|
||||
elif k in ("inm","INM"):
|
||||
l = modules[i].find("numinstances").text;#print(l,k)
|
||||
elif k in ("IOPort","AddrX","MuxedQCountSel"):
|
||||
continue
|
||||
else:
|
||||
|
|
@ -1122,19 +1133,32 @@ PNCconf will use internal firmware data"%self._p.FIRMDIR),True)
|
|||
else: convertedname = pinconvertsserial[tempfunc]
|
||||
else:
|
||||
convertedname = pinconvertsserial[tempfunc]
|
||||
elif modulename in ('SSR','SSR'):
|
||||
elif modulename in ('ssr','SSR'):
|
||||
if tempfunc == 'AC':
|
||||
convertedname = _PD.NUSED
|
||||
if '7i96s' in boardtitle:
|
||||
convertedname = _PD.PWMP
|
||||
else:
|
||||
convertedname = _PD.NUSED
|
||||
elif 'OUT-' in tempfunc:
|
||||
convertedname = _PD.SSR0
|
||||
# ssr outputs encode the HAL number in the XML name
|
||||
# add it to 100 so it's not change from output
|
||||
# add it to 100 so it's not changed from output
|
||||
iocode = 100 + int(tempfunc[4:])
|
||||
elif modulename in ('outm','OUTM'):
|
||||
convertedname = _PD.OUTM0
|
||||
# outm outputs encode the HAL number in the XML name
|
||||
# add it to 100 so it's not changed from output
|
||||
iocode = 100 + int(tempfunc[6:])
|
||||
elif modulename in ('inm','INM'):
|
||||
convertedname = _PD.INM0
|
||||
# inm inputs encode the HAL number in the XML name
|
||||
# add it to 100 so it's not changed from output
|
||||
iocode = 100 + int(tempfunc[5:])
|
||||
elif modulename in ("None","NONE"):
|
||||
iocode = 0
|
||||
#convertedname = pinconvertnone[tempfunc]
|
||||
else:
|
||||
print 'unknon module - setting to unusable',modulename, tempfunc
|
||||
print('unknown module - setting to unusable',modulename, tempfunc)
|
||||
convertedname = _PD.NUSED
|
||||
except:
|
||||
iocode = 0
|
||||
|
|
@ -1146,13 +1170,18 @@ PNCconf will use internal firmware data"%self._p.FIRMDIR),True)
|
|||
print formatted_lines[-1]
|
||||
|
||||
if iocode == 0:
|
||||
# must be GPIO pins if there is no secondary mudule name
|
||||
# or if pinconvert fails eg. StepTable instance default to GPIO
|
||||
# must be GPIO if there is no secondary module name
|
||||
# or if pinconvert fails eg. StepTable instance defaults to GPIO
|
||||
temppinunit.append(_PD.GPIOI)
|
||||
temppinunit.append(0) # 0 signals to pncconf that GPIO can changed to be input or output
|
||||
elif iocode >= 100:
|
||||
temppinunit.append(_PD.SSR0)
|
||||
temppinunit.append(iocode)
|
||||
elif iocode and iocode >= 100:
|
||||
if modulename in ('ssr','SSR'):
|
||||
temppinunit.append(_PD.SSR0)
|
||||
elif modulename in ('outm','OUTM'):
|
||||
temppinunit.append(_PD.OUTM0)
|
||||
if modulename in ('inm','INM'):
|
||||
temppinunit.append(_PD.INM0)
|
||||
temppinunit.append(iocode) # >= 100 signals to pncconf that SSR, OUTM, and INM can not be changed
|
||||
else:
|
||||
instance_num = int(pins[i].find("secondaryinstance").text)
|
||||
# this is a workaround for the 7i77_7i776 firmware. it uses a mux encoder for the 7i76 but only uses half of it
|
||||
|
|
@ -1314,6 +1343,7 @@ PNCconf will use internal firmware data"%self._p.FIRMDIR),True)
|
|||
WATCHDOG = NUMCONS = NUMCONPINS = ENCODERS = MUXENCODERS = 0
|
||||
RESOLVERS = NUMSSCHANNELS = SSERIALPORTS = 0
|
||||
PWMGENS = LEDS = STEPGENS = TPPWMGEN = 0
|
||||
SSRS = OUTMS = INMS = 0
|
||||
NUMENCODERPINS = NUMPWMPINS = 3; NUMSTEPPERPINS = 2
|
||||
NUMTPPWMPINS = 0;NUMRESOLVERPINS = 10
|
||||
|
||||
|
|
@ -1343,7 +1373,13 @@ PNCconf will use internal firmware data"%self._p.FIRMDIR),True)
|
|||
temp2 = i.split(" ")
|
||||
#print i,temp2
|
||||
if 'BOARDNAME' in i:
|
||||
BOARDNAME = temp2[2].strip('MESA').lower()
|
||||
BOARDNAME = temp2[2].lstrip('MESA').lower()
|
||||
# 7i76e thinks it is a 7i76, set it straight
|
||||
if BOARDNAME == '7i76' and 'ETH' in info:
|
||||
BOARDNAME = '7i76e'
|
||||
# 7i96s thinks it is a 7i96, set it straight
|
||||
if BOARDNAME == '7i96' and '20 KGATES' in info:
|
||||
BOARDNAME = '7i96s'
|
||||
add_text(ELEMENT,'BOARDNAME',BOARDNAME)
|
||||
if 'ETH' in i:
|
||||
DRIVER = 'hm2_eth'
|
||||
|
|
@ -1443,10 +1479,22 @@ PNCconf will use internal firmware data"%self._p.FIRMDIR),True)
|
|||
add_text(new,'numinstances',tline[4].lstrip())
|
||||
if 'MODULE: SSR' in i:
|
||||
tline = lines[l_num+1].split(" ")
|
||||
LEDS = tline[4].lstrip()
|
||||
SSRS = tline[4].lstrip()
|
||||
new = add_element(mod_ele,'module')
|
||||
add_text(new,'tagname','SSR')
|
||||
add_text(new,'numinstances',tline[4].lstrip())
|
||||
if 'MODULE: OUTM' in i:
|
||||
tline = lines[l_num+1].split(" ")
|
||||
OUTMS = tline[4].lstrip()
|
||||
new = add_element(mod_ele,'module')
|
||||
add_text(new,'tagname','OUTM')
|
||||
add_text(new,'numinstances',tline[4].lstrip())
|
||||
if 'MODULE: INM' in i:
|
||||
tline = lines[l_num+1].split(" ")
|
||||
INMS = tline[4].lstrip()
|
||||
new = add_element(mod_ele,'module')
|
||||
add_text(new,'tagname','INM')
|
||||
add_text(new,'numinstances',tline[4].lstrip())
|
||||
if 'IO CONNECTIONS FOR' in i:
|
||||
if pinsflag:
|
||||
n1 = add_element(ELEMENT,'pins')
|
||||
|
|
@ -1485,7 +1533,7 @@ PNCconf will use internal firmware data"%self._p.FIRMDIR),True)
|
|||
|
||||
print 'Sserial CARDS FOUND:',sserial
|
||||
print NUMCONS,NUMCONPINS,ENCODERS,MUXENCODERS,SSERIALPORTS,NUMSSCHANNELS
|
||||
print RESOLVERS,PWMGENS,LEDS
|
||||
print RESOLVERS,PWMGENS,LEDS,SSRS,OUTMS,INMS
|
||||
firmname = "~/mesa%d_discovered.xml"%boardnum
|
||||
filename = os.path.expanduser(firmname)
|
||||
DOC.writexml(open(filename, "wb"), addindent=" ", newl="\n")
|
||||
|
|
@ -2207,6 +2255,14 @@ Clicking 'existing custom program' will aviod this warning. "),False):
|
|||
elif pintype == _PD.SSR0:
|
||||
ptypetree = self.d._ssrliststore
|
||||
signaltocheck = _PD.hal_output_names
|
||||
# type OUTM output
|
||||
elif pintype == _PD.OUTM0:
|
||||
ptypetree = self.d._outmliststore
|
||||
signaltocheck = _PD.hal_output_names
|
||||
# type INM input
|
||||
elif pintype == _PD.INM0:
|
||||
ptypetree = self.d._inmliststore
|
||||
signaltocheck = _PD.hal_input_names
|
||||
#type encoder
|
||||
elif pintype in (_PD.ENCA,_PD.ENCB,_PD.ENCI,_PD.ENCM):
|
||||
ptypetree = self.d._encoderliststore
|
||||
|
|
@ -2296,13 +2352,15 @@ Clicking 'existing custom program' will aviod this warning. "),False):
|
|||
# self.debug_iter(ptiter,ptype,"ptype")
|
||||
widgetptype, index2 = ptypetree.get(ptiter,0,1)
|
||||
#if not "serial" in p:
|
||||
# print "ptypetree: ",widgetptype
|
||||
if pintype in (_PD.GPIOI,_PD.GPIOO,_PD.GPIOD,_PD.SSR0,_PD.MXE0,_PD.MXE1,_PD.RES1,_PD.RES2,_PD.RES3,_PD.RES4,_PD.RES5,_PD.RESU,_PD.SS7I76M0,
|
||||
_PD.SS7I76M2,_PD.SS7I76M3,_PD.SS7I77M0,_PD.SS7I77M1,_PD.SS7I77M3,_PD.SS7I77M4) or (index == 0):
|
||||
# #print "ptypetree: ",widgetptype
|
||||
if pintype in (_PD.GPIOI,_PD.GPIOO,_PD.GPIOD,_PD.SSR0,_PD.OUTM0,_PD.INM0,_PD.MXE0,_PD.MXE1,
|
||||
_PD.RES1,_PD.RES2,_PD.RES3,_PD.RES4,_PD.RES5,_PD.RESU,_PD.SS7I76M0,_PD.SS7I76M2,
|
||||
_PD.SS7I76M3,_PD.SS7I77M0,_PD.SS7I77M1,_PD.SS7I77M3,_PD.SS7I77M4) or (index == 0):
|
||||
index2 = 0
|
||||
elif pintype in ( _PD.TXDATA0,_PD.RXDATA0,_PD.TXEN0,_PD.TXDATA1,_PD.RXDATA1,_PD.TXEN1,_PD.TXDATA2,_PD.RXDATA2,
|
||||
_PD.TXEN2,_PD.TXDATA3,_PD.RXDATA3,_PD.TXEN3,_PD.TXDATA4,_PD.RXDATA4,_PD.TXEN4,
|
||||
_PD.TXDATA5,_PD.RXDATA5,_PD.TXEN5,_PD.TXDATA6,_PD.RXDATA6,_PD.TXEN6,_PD.TXDATA7,_PD.RXDATA7,_PD.TXEN7 ):
|
||||
elif pintype in ( _PD.TXDATA0,_PD.RXDATA0,_PD.TXEN0,_PD.TXDATA1,_PD.RXDATA1,_PD.TXEN1,
|
||||
_PD.TXDATA2,_PD.RXDATA2,_PD.TXEN2,_PD.TXDATA3,_PD.RXDATA3,_PD.TXEN3,
|
||||
_PD.TXDATA4,_PD.RXDATA4,_PD.TXEN4,_PD.TXDATA5,_PD.RXDATA5,_PD.TXEN5,
|
||||
_PD.TXDATA6,_PD.RXDATA6,_PD.TXEN6,_PD.TXDATA7,_PD.RXDATA7,_PD.TXEN7 ):
|
||||
index2 = 0
|
||||
#print index,index2,signaltocheck[index+index2]
|
||||
self.d[p] = signaltocheck[index+index2]
|
||||
|
|
@ -2929,7 +2987,7 @@ Clicking 'existing custom program' will aviod this warning. "),False):
|
|||
# check if firmptype is in GPIO family
|
||||
# check if widget is already configured
|
||||
# we now set everything in a known state.
|
||||
if firmptype in (_PD.GPIOI,_PD.GPIOO,_PD.GPIOD,_PD.SSR0):
|
||||
if firmptype in (_PD.GPIOI,_PD.GPIOO,_PD.GPIOD,_PD.SSR0,_PD.OUTM0,_PD.INM0):
|
||||
if self.widgets[ptype].get_model():
|
||||
widgettext = self.widgets[ptype].get_active_text()
|
||||
else:
|
||||
|
|
@ -2952,14 +3010,14 @@ Clicking 'existing custom program' will aviod this warning. "),False):
|
|||
else:
|
||||
self.widgets[complabel].set_text("%02d:"%(concount*24+pin-24)) #sserial output
|
||||
else:
|
||||
if firmptype == _PD.SSR0:
|
||||
if firmptype in (_PD.SSR0, _PD.OUTM0, _PD.INM0):
|
||||
self.widgets[complabel].set_text("%02d:"%(compnum - 100))
|
||||
else:
|
||||
self.widgets[complabel].set_text("%03d:"%(concount*ppc+pin))# mainboard GPIO
|
||||
self.widgets[complabel].set_text("%03d:"%(concount*ppc+pin))# mainboard GPIO or INM
|
||||
|
||||
if compnum >= 100 and widgettext == firmptype:
|
||||
return
|
||||
elif not compnum >= 100 and (widgettext in (_PD.GPIOI,_PD.GPIOO,_PD.GPIOD)):
|
||||
elif compnum < 100 and (widgettext in (_PD.GPIOI,_PD.GPIOO,_PD.GPIOD)):
|
||||
return
|
||||
else:
|
||||
#self.widgets[ptype].show()
|
||||
|
|
@ -2969,36 +3027,37 @@ Clicking 'existing custom program' will aviod this warning. "),False):
|
|||
self.widgets[ptype].set_sensitive(not compnum >= 100) # compnum = 100 means GPIO cannot be changed by user
|
||||
if firmptype == _PD.SSR0:
|
||||
self.widgets[ptype].set_model(self.d._ssrliststore)
|
||||
elif firmptype == _PD.OUTM0:
|
||||
self.widgets[ptype].set_model(self.d._outmliststore)
|
||||
elif firmptype == _PD.INM0:
|
||||
self.widgets[ptype].set_model(self.d._inmliststore)
|
||||
else:
|
||||
self.widgets[ptype].set_model(self.d._gpioliststore)
|
||||
if firmptype == _PD.GPIOI:
|
||||
if firmptype in (_PD.GPIOI, _PD.INM0):
|
||||
# set pin treestore to gpioi signals
|
||||
if not self.widgets[p].get_model() == self.d._gpioisignaltree:
|
||||
self.widgets[p].set_model(self.d._gpioisignaltree)
|
||||
# set ptype gpioi
|
||||
self.widgets[ptype].set_active(0)
|
||||
# set p unused signal
|
||||
self.widgets[p].set_active(0)
|
||||
# set pinv unset
|
||||
self.widgets[pinv].set_active(False)
|
||||
elif firmptype == _PD.SSR0:
|
||||
if not self.widgets[p].get_model() == self.d._gpioosignaltree:
|
||||
self.widgets[p].set_model(self.d._gpioosignaltree)
|
||||
# set ptype gpioo
|
||||
self.widgets[ptype].set_active(0)
|
||||
# set p unused signal
|
||||
self.widgets[p].set_active(0)
|
||||
# set pinv unset
|
||||
self.widgets[pinv].set_active(False)
|
||||
self.widgets[p].set_model(self.d._gpioisignaltree)
|
||||
# set ptype gpioi
|
||||
self.widgets[ptype].set_active(0)
|
||||
# set p unused signal
|
||||
self.widgets[p].set_active(0)
|
||||
# set pinv unset
|
||||
self.widgets[pinv].set_active(False)
|
||||
elif firmptype in (_PD.SSR0, _PD.OUTM0):
|
||||
self.widgets[p].set_model(self.d._gpioosignaltree)
|
||||
# set ptype gpioo
|
||||
self.widgets[ptype].set_active(0)
|
||||
# set p unused signal
|
||||
self.widgets[p].set_active(0)
|
||||
# set pinv unset
|
||||
self.widgets[pinv].set_active(False)
|
||||
else:
|
||||
if not self.widgets[p].get_model() == self.d._gpioosignaltree:
|
||||
self.widgets[p].set_model(self.d._gpioosignaltree)
|
||||
# set ptype gpioo
|
||||
self.widgets[ptype].set_active(1)
|
||||
# set p unused signal
|
||||
self.widgets[p].set_active(0)
|
||||
# set pinv unset
|
||||
self.widgets[pinv].set_active(False)
|
||||
self.widgets[p].set_model(self.d._gpioosignaltree)
|
||||
# set ptype gpioo
|
||||
self.widgets[ptype].set_active(1)
|
||||
# set p unused signal
|
||||
self.widgets[p].set_active(0)
|
||||
# set pinv unset
|
||||
self.widgets[pinv].set_active(False)
|
||||
|
||||
|
||||
def find_sig_name_iter(self,model, signal_name):
|
||||
|
|
@ -3074,28 +3133,29 @@ Clicking 'existing custom program' will aviod this warning. "),False):
|
|||
# type GPIO
|
||||
# if compnum = 100 then it means that the GPIO type can not
|
||||
# be changed from what the firmware designates it as.
|
||||
if widgetptype in (_PD.GPIOI,_PD.GPIOO,_PD.GPIOD,_PD.SSR0):
|
||||
#print "data ptype index:",_PD.pintype_gpio.index(dataptype)
|
||||
if widgetptype in (_PD.GPIOI,_PD.GPIOO,_PD.GPIOD,_PD.SSR0,_PD.OUTM0,_PD.INM0):
|
||||
#print "data ptype index:",_PD.pintype_gpio.index(dataptype)
|
||||
#self.debug_iter(0,p,"data to widget")
|
||||
#self.debug_iter(0,ptype,"data to widget")
|
||||
# signal names for GPIO INPUT
|
||||
#print "compnum = ",compnum
|
||||
if compnum >= 100: dataptype = widgetptype
|
||||
self.widgets[pinv].set_active(self.d[pinv])
|
||||
if widgetptype == _PD.SSR0:
|
||||
if widgetptype in (_PD.SSR0,_PD.OUTM0,_PD.INM0):
|
||||
self.widgets[ptype].set_active(0)
|
||||
else:
|
||||
try:
|
||||
self.widgets[ptype].set_active( _PD.pintype_gpio.index(dataptype) )
|
||||
except:
|
||||
self.widgets[ptype].set_active( _PD.pintype_gpio.index(widgetptype) )
|
||||
# if GPIOI or dataptype not in GPIO family force it GPIOI
|
||||
if dataptype == _PD.GPIOI or dataptype not in(_PD.GPIOO,_PD.GPIOI,_PD.GPIOD,_PD.SSR0):
|
||||
# if input family or not in output family force it to input
|
||||
if dataptype in (_PD.GPIOI,_PD.INM0) or dataptype not in \
|
||||
(_PD.GPIOO,_PD.GPIOI,_PD.GPIOD,_PD.SSR0,_PD.OUTM0,_PD.INM0):
|
||||
human = _PD.human_input_names
|
||||
signal = _PD.hal_input_names
|
||||
tree = self.d._gpioisignaltree
|
||||
# signal names for GPIO OUTPUT and OPEN DRAIN OUTPUT
|
||||
elif dataptype in (_PD.GPIOO,_PD.GPIOD,_PD.SSR0):
|
||||
elif dataptype in (_PD.GPIOO,_PD.GPIOD,_PD.SSR0,_PD.OUTM0):
|
||||
human = _PD.human_output_names
|
||||
signal = _PD.hal_output_names
|
||||
tree = self.d._gpioosignaltree
|
||||
|
|
@ -3382,7 +3442,7 @@ Clicking 'existing custom program' will aviod this warning. "),False):
|
|||
_PD.PDMD,_PD.PDME,_PD.PWMD,_PD.PWME,_PD.UDMD,_PD.UDME,
|
||||
_PD.TPPWMB,_PD.TPPWMC,_PD.TPPWMAN,_PD.TPPWMBN,_PD.TPPWMCN,_PD.TPPWME,_PD.TPPWMF,
|
||||
_PD.RXDATA0,_PD.TXEN0,_PD.RXDATA1,_PD.TXEN1,_PD.RXDATA2,_PD.TXEN2,_PD.RXDATA3,_PD.TXEN3,
|
||||
_PD.POTE,_PD.POTD, _PD.SSR0):
|
||||
_PD.POTE,_PD.POTD, _PD.SSR0, _PD.OUTM0, _PD.INM0):
|
||||
self.p.set_buttons_sensitive(1,1)
|
||||
return
|
||||
# for GPIO output
|
||||
|
|
@ -3629,8 +3689,9 @@ Clicking 'existing custom program' will aviod this warning. "),False):
|
|||
# This finds the pin type and component number of the pin that has changed
|
||||
pinlist = []
|
||||
# this components have no related pins - fake the list
|
||||
if widgetptype in(_PD.GPIOI,_PD.GPIOO,_PD.GPIOD,_PD.SSR0,_PD.MXE0,_PD.MXE1,_PD.RES0,_PD.RES1,
|
||||
_PD.RES2,_PD.RES3,_PD.RES4,_PD.RES5,_PD.AMP8I20,_PD.ANALOGIN):
|
||||
if widgetptype in(_PD.GPIOI,_PD.GPIOO,_PD.GPIOD,_PD.SSR0,_PD.OUTM0,_PD.INM0,
|
||||
_PD.MXE0,_PD.MXE1,_PD.RES0,_PD.RES1,_PD.RES2,_PD.RES3,
|
||||
_PD.RES4,_PD.RES5,_PD.AMP8I20,_PD.ANALOGIN):
|
||||
pinlist = [["%s"%p,boardnum,connector,channel,pin]]
|
||||
else:
|
||||
pinlist = self.list_related_pins(relatedsearch, boardnum, connector, channel, pin, 0)
|
||||
|
|
@ -5207,7 +5268,7 @@ Clicking 'existing custom program' will aviod this warning. "),False):
|
|||
halboardnum = 0
|
||||
if test == "None": return None
|
||||
elif 'mesa' in test:
|
||||
type_name = { _PD.GPIOI:"gpio", _PD.GPIOO:"gpio", _PD.GPIOD:"gpio", _PD.SSR0:"ssr",
|
||||
type_name = { _PD.GPIOI:"gpio",_PD.GPIOO:"gpio",_PD.GPIOD:"gpio",_PD.SSR0:"ssr",_PD.OUTM0:"outm",_PD.INM0:"inm",
|
||||
_PD.ENCA:"encoder", _PD.ENCB:"encoder",_PD.ENCI:"encoder",_PD.ENCM:"encoder",
|
||||
_PD.RES0:"resolver",_PD.RES1:"resolver",_PD.RES2:"resolver",_PD.RES3:"resolver",_PD.RES4:"resolver",_PD.RES5:"resolver",
|
||||
_PD.MXE0:"encoder", _PD.MXE1:"encoder",
|
||||
|
|
@ -5248,7 +5309,7 @@ Clicking 'existing custom program' will aviod this warning. "),False):
|
|||
print "**** ERROR PNCCONF: pintype error in make_pinname: (sserial) ptype = ",ptype
|
||||
return None
|
||||
# if gpionumber flag is true - convert to gpio pin name
|
||||
if gpionumber or ptype in(_PD.GPIOI,_PD.GPIOO,_PD.GPIOD,_PD.SSR0):
|
||||
if gpionumber or ptype in(_PD.GPIOI,_PD.GPIOO,_PD.GPIOD,_PD.SSR0,_PD.OUTM0,_PD.INM0):
|
||||
if "7i77" in (subboardname) or "7i76" in(subboardname)or "7i84" in(subboardname):
|
||||
if ptype in(_PD.GPIOO,_PD.GPIOD):
|
||||
comptype = "output"
|
||||
|
|
@ -5312,11 +5373,17 @@ Clicking 'existing custom program' will aviod this warning. "),False):
|
|||
print "**** ERROR PNCCONF: pintype error in make_pinname: (mesa) ptype = ",ptype
|
||||
return None
|
||||
# if gpionumber flag is true - convert to gpio pin name
|
||||
if gpionumber or ptype in(_PD.GPIOI,_PD.GPIOO,_PD.GPIOD,_PD.SSR0):
|
||||
print '->',ptype,dummy,compnum,pin
|
||||
if gpionumber or ptype in(_PD.GPIOI,_PD.GPIOO,_PD.GPIOD,_PD.SSR0,_PD.OUTM0,_PD.INM0):
|
||||
#print '->',ptype,dummy,compnum,pin
|
||||
if ptype == _PD.SSR0:
|
||||
compnum -= 100
|
||||
return "%s."% (make_name(boardname,halboardnum)) + "ssr.00.out-%02d"% (compnum)
|
||||
elif ptype == _PD.OUTM0:
|
||||
compnum -= 100
|
||||
return "%s."% (make_name(boardname,halboardnum)) + "outm.00.out-%02d"% (compnum)
|
||||
elif ptype == _PD.INM0:
|
||||
compnum -= 100
|
||||
return "%s."% (make_name(boardname,halboardnum)) + "inm.00.input-%02d"% (compnum)
|
||||
else:
|
||||
compnum = int(pinnum)+(concount* num_of_pins )
|
||||
return "%s."% (make_name(boardname,halboardnum)) + "gpio.%03d"% (compnum)
|
||||
|
|
|
|||
|
|
@ -111,7 +111,11 @@ class Private_Data:
|
|||
_("GPIO Input"),_("GPIO Output"),_("GPIO O Drain") ]
|
||||
( self.SSR0,) = self.pintype_ssr = [
|
||||
_("SSR Output") ]
|
||||
( self.ENCA,self.ENCB,self.ENCI,self.ENCM
|
||||
( self.OUTM0,) = self.pintype_outm = [
|
||||
_("OUTM Output") ]
|
||||
( self.INM0,) = self.pintype_inm = [
|
||||
_("INM Input") ]
|
||||
( self.ENCA,self.ENCB,self.ENCI,self.ENCM
|
||||
) = self.pintype_encoder = [
|
||||
_("Quad Enc-A"),_("Quad Enc-B"),_("Quad Enc-I"),_("Quad Enc-M") ]
|
||||
( self. MXE0,self.MXE1,self.MXEI,self.MXEM,self.MXES
|
||||
|
|
@ -303,7 +307,7 @@ class Private_Data:
|
|||
) = self.hal_8i20_input_names =[
|
||||
"unused-8i20","x-8i20","y-8i20","z-8i20","a-8i20","s-8i20"]
|
||||
|
||||
( S.USED_POT,S_POT_OUT,S_POT_ENABLE )= self.hal_pot_output_names = ["unused-pot",
|
||||
( S.USED_POT,S.POT_OUT,S.POT_ENABLE )= self.hal_pot_output_names = ["unused-pot",
|
||||
"s-pot-output","s-pot-enable"]
|
||||
|
||||
( S.UNUSED_STEPGEN,
|
||||
|
|
@ -629,7 +633,8 @@ class Private_Data:
|
|||
[S.STEPA, 6],[S.STEPB, 6],[S.STEPA, 7],[S.STEPB, 7],[S.GPIOI, 0],[S.ENCA, 1],[S.ENCB, 1],[S.ENCI, 1],
|
||||
[S.NUSED, 0],[S.NUSED, 0],[S.NUSED, 0],[S.NUSED, 0],[S.NUSED, 0],[S.NUSED, 0],[S.NUSED, 0],],
|
||||
|
||||
['5i25-Internal Data', '5i25', 'G540x2', '5i25', 'hm2_pci', 2,3, 0,0, 2,1, 0,0, 10,2, 0,0, [],0,0,0,0,0,0,0, 1, 34, 33, 200,[3, 2],
|
||||
['5i25-Internal Data', '5i25', 'G540x2', '5i25', 'hm2_pci',
|
||||
2,3, 0,0, 2,1, 0,0, 10,2, 0,0, [],0,0,0,0,0,0,0, 1, 34, 33, 200,[3, 2],
|
||||
# TAB 3
|
||||
[S.GPIOI, 0],[S.PWMP, 0],[S.STEPA, 0],[S.GPIOI, 0],[S.STEPB, 0],[S.STEPA, 4],[S.STEPA, 1],[S.GPIOI, 0],[S.STEPB, 1],[S.STEPA, 2],
|
||||
[S.STEPB, 2],[S.STEPA, 3],[S.STEPB, 3],[S.ENCA, 0],[S.ENCB, 0],[S.ENCI, 0],[S.GPIOI, 0],
|
||||
|
|
@ -848,6 +853,60 @@ class Private_Data:
|
|||
[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],
|
||||
[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],],
|
||||
|
||||
['7i96-Internal Data', '7i96', '7i96dpl', '7i96', 'hm2_eth',
|
||||
3,1, 0,0, 0,3, 0,0, 5,2, 1,1, [],0,0,0,0,0,0,0, 1, 34, 33, 200, [1, 2, 3],
|
||||
# TAB 1
|
||||
[S.GPIOI, 100],[S.GPIOI, 100],[S.GPIOI, 100],[S.GPIOI, 100],[S.GPIOI, 100],[S.GPIOI, 100],[S.GPIOI, 100],[S.GPIOI, 100],[S.GPIOI, 100],[S.GPIOI, 100],
|
||||
[S.GPIOI, 100],[S.SSR0, 100],[S.SSR0, 101],[S.SSR0, 102],[S.SSR0, 103],[S.SSR0, 104],[S.SSR0, 105],
|
||||
[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],
|
||||
# TAB 2
|
||||
[S.STEPB,0],[S.STEPA,0],[S.STEPB,1],[S.STEPA,1],[S.STEPB,2],[S.STEPA,2],[S.STEPB,3],[S.STEPA,3],[S.STEPB,4],[S.STEPA,4],
|
||||
[S.ENCA,0],[S.ENCA,1],[S.ENCA,2],[S.RXDATA0,0],[S.TXDATA0,0],[S.TXEN0,0],[S.NUSED,0],
|
||||
[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],
|
||||
# TAB 3
|
||||
[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],
|
||||
[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],
|
||||
[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],],
|
||||
|
||||
# 7i96s ####################
|
||||
['7i96s-Internal Data', '7i96s', '7i96s_d', '7i96s', 'hm2_eth',
|
||||
1,3, 0,0, 1,3, 0,0, 5,2, 1,1, [],0,0,0,0,0,0,0, 1, 34, 33, 200, [1, 2, 3],
|
||||
# TAB 1
|
||||
[S.INM0, 100],[S.INM0, 101],[S.INM0, 102],[S.INM0, 103],[S.INM0, 104],[S.INM0, 105],
|
||||
[S.INM0, 106],[S.INM0, 107],[S.INM0, 108],[S.INM0, 109],[S.INM0, 110],
|
||||
[S.SSR0, 100],[S.SSR0, 101],[S.SSR0, 102],[S.SSR0, 103],
|
||||
[S.OUTM0, 104],[S.OUTM0, 105],
|
||||
[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],
|
||||
# TAB 2
|
||||
[S.STEPB,0],[S.STEPA,0],[S.STEPB,1],[S.STEPA,1],[S.STEPB,2],[S.STEPA,2],
|
||||
[S.STEPB,3],[S.STEPA,3],[S.STEPB,4],[S.STEPA,4],[S.ENCA,0],[S.ENCB,0],[S.ENCI,0],
|
||||
[S.RXDATA0,0],[S.TXDATA0,0],[S.TXEN0,0],[S.PWMP,0],
|
||||
[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],
|
||||
# TAB 3
|
||||
[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],
|
||||
[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],
|
||||
[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],
|
||||
[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],],
|
||||
|
||||
['7i96s-Internal Data', '7i96s', '7i96s_dpl', '7i96s', 'hm2_eth',
|
||||
3,1, 0,0, 1,3, 0,0, 5,2, 1,1, [],0,0,0,0,0,0,0, 1, 34, 33, 200, [1, 2, 3],
|
||||
# TAB 1
|
||||
[S.INM0, 100],[S.INM0, 101],[S.INM0, 102],[S.INM0, 103],[S.INM0, 104],[S.INM0, 105],
|
||||
[S.INM0, 106],[S.INM0, 107],[S.INM0, 108],[S.INM0, 109],[S.INM0, 110],
|
||||
[S.SSR0, 100],[S.SSR0, 101],[S.SSR0, 102],[S.SSR0, 103],
|
||||
[S.OUTM0, 104],[S.OUTM0, 105],
|
||||
[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],
|
||||
# TAB 2
|
||||
[S.STEPB,0],[S.STEPA,0],[S.STEPB,1],[S.STEPA,1],[S.STEPB,2],[S.STEPA,2],
|
||||
[S.STEPB,3],[S.STEPA,3],[S.STEPB,4],[S.STEPA,4],[S.ENCA,0],[S.ENCB,0],[S.ENCI,0],
|
||||
[S.RXDATA0,0],[S.TXDATA0,0],[S.TXEN0,0],[S.PWMP,0],
|
||||
[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],
|
||||
# TAB 3
|
||||
[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],
|
||||
[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],
|
||||
[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],[S.GPIOI, 0],
|
||||
[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],[S.NUSED,0],],
|
||||
|
||||
]
|
||||
|
||||
#**************************
|
||||
|
|
@ -1044,6 +1103,7 @@ class Private_Data:
|
|||
'7i92':{'DRIVER':'hm2_eth','PINS_PER_CONNECTOR':17,'TOTAL_CONNECTORS':2},
|
||||
'7i93':{'DRIVER':'hm2_eth','PINS_PER_CONNECTOR':24,'TOTAL_CONNECTORS':2},
|
||||
'7i96':{'DRIVER':'hm2_eth','PINS_PER_CONNECTOR':17,'TOTAL_CONNECTORS':3,'TAB_NUMS':[1,2,3],'TAB_NAMES':['TB3','TB1/TB2','P1']},
|
||||
'7i96s':{'DRIVER':'hm2_eth','PINS_PER_CONNECTOR':17,'TOTAL_CONNECTORS':3,'TAB_NUMS':[1,2,3],'TAB_NAMES':['TB3','TB1/TB2','P1']},
|
||||
'7i98':{'DRIVER':'hm2_eth','PINS_PER_CONNECTOR':17,'TOTAL_CONNECTORS':3},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue