Jolt.js board doc improvements

This commit is contained in:
Gordon Williams 2024-04-03 10:59:33 +01:00
parent e8d32acb7f
commit 478572b6cb
2 changed files with 26 additions and 7 deletions

View File

@ -141,18 +141,33 @@ board = {
'right' : ['NFC','NFC'],
'_hide_not_on_connectors' : True,
'_notes' : {
'H0' : "Motor driver 0, output 0. This pin is also connected to an analog input via a 39k/220k potential divider", # D17
'H0' : "Motor driver 0, output 0. This pin is also connected to analog input D4 via a 39k/220k potential divider", # D17
'H1' : "Motor driver 0, output 1.", # D15
'H2' : "Motor driver 0, output 2. This pin is also connected to an analog input via a 39k/220k potential divider", # D13
'H2' : "Motor driver 0, output 2. This pin is also connected to analog input D5 via a 39k/220k potential divider", # D13
'H3' : "Motor driver 0, output 3.", # D14
'H4' : "Motor driver 1, output 0. This pin is also connected to an analog input via a 39k/220k potential divider", # D22
'H4' : "Motor driver 1, output 0. This pin is also connected to analog input D30 via a 39k/220k potential divider", # D22
'H5' : "Motor driver 1, output 1.", # D32
'H6' : "Motor driver 1, output 2. This pin is also connected to an analog input via a 39k/220k potential divider", # D35
'H6' : "Motor driver 1, output 2. This pin is also connected to analog input D28 via a 39k/220k potential divider", # D35
'H7' : "Motor driver 1, output 3.", # D34
'Q0.fet' : "INVERTED. Connected to 500mA FET. When 1, GND on Q0 is pulled low. When 0, GND on Q0 is open circuit",
'Q1.fet' : "INVERTED. Connected to 500mA FET. When 1, GND on Q1 is pulled low. When 0, GND on Q1 is open circuit",
},
'_pinfunctions' : {
'Q0.scl' : ["ADC1_IN5","3.3"],
'Q0.sda' : ["ADC1_IN1","3.3"],
'Q1.scl' : ["ADC1_IN7","3.3"],
'Q1.sda' : ["ADC1_IN0","3.3"],
'Q2.scl' : ["3.3"],
'Q2.sda' : ["3.3"],
'Q2.vcc' : ["3.3"],
'Q2.gnd' : ["3.3"],
'Q3.scl' : ["3.3"],
'Q3.sda' : ["3.3"],
'Q3.vcc' : ["3.3"],
'Q3.gnd' : ["3.3"],
'VCC' : ["3.3"]
}
};
board["_css"] = """
#board {

View File

@ -102,6 +102,10 @@ def dump_pin(brd, pin, pinstrip):
pin = pinmap[pin];
pininfo = pinutils.findpin(pins, pin, False)
# add pinfunctions that we want to appear only in docs
if ("_pinfunctions" in brd) and (pin in brd["_pinfunctions"]):
for pf in brd["_pinfunctions"][pin]:
pininfo["functions"][pf] = 0
not_five_volt = False
# print(json.dumps(pininfo))
@ -120,14 +124,14 @@ def dump_pin(brd, pin, pinstrip):
if ("_notes" in brd) and (pin in brd["_notes"]):
pinHTML2 += '<SPAN class="pinfunction NOTE" title="'+brd["_notes"][pin]+'">!</SPAN>\n';
reverse = pinstrip=="left" or pinstrip=="right2";
if not reverse: writeHTML(pinHTML+"\n"+pinHTML2)
pinfuncs = {}
for func in sorted(pininfo["functions"]):
# writeHTML(' '+func)
#writeHTML(' '+func)
if func in pinutils.CLASSES:
funcdata = str(pininfo["functions"][func])
cls = pinutils.CLASSES[func]