943 lines
17 KiB
HTML
943 lines
17 KiB
HTML
<html>
|
|
<head>
|
|
|
|
<style>
|
|
.pin-marker {
|
|
position: absolute;
|
|
z-index: 1;
|
|
border-radius: 50%;
|
|
background-color: white;
|
|
border: 2px blue solid;
|
|
cursor: pointer;
|
|
color: black;
|
|
text-align: center;
|
|
line-height: 200%;
|
|
}
|
|
|
|
.pin-marker:hover {
|
|
background-color: #f15a24;
|
|
color: white;
|
|
transform: scale(2);
|
|
z-index: 2;
|
|
}
|
|
|
|
.pin-marker.highlight {
|
|
border: 2px #f15a24 solid;
|
|
}
|
|
|
|
.pin-marker.selected {
|
|
background-color: #fc935a;
|
|
}
|
|
|
|
#connector-container {
|
|
width: 100%;
|
|
height: 50%;
|
|
overflow-x: scroll;
|
|
position: relative;
|
|
}
|
|
|
|
#connector-div {
|
|
height: 100%;
|
|
position: relative;
|
|
z-index: 0;
|
|
}
|
|
|
|
#connector-img {
|
|
height: 100%;
|
|
z-index: 0;
|
|
}
|
|
|
|
table {
|
|
font-family: Arial, Helvetica, sans-serif;
|
|
border-collapse: collapse;
|
|
width: clamp(100%, 100%, 1000px);
|
|
text-align: left;
|
|
}
|
|
|
|
@media (min-width: 1000px) {
|
|
table {
|
|
font-size: 1rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 1000px) {
|
|
table {
|
|
font-size: 3rem;
|
|
}
|
|
}
|
|
|
|
table tbody tr {
|
|
cursor: pointer;
|
|
}
|
|
|
|
table td, table th {
|
|
border: 1px solid black;
|
|
padding: 8px;
|
|
}
|
|
|
|
table tr:nth-child(even){
|
|
background-color: #fc935a;
|
|
}
|
|
|
|
table tr:hover {
|
|
background-color: #f15a24;
|
|
}
|
|
|
|
table th {
|
|
padding-top: 12px;
|
|
padding-bottom: 12px;
|
|
text-align: left;
|
|
background-color: #f15a24;
|
|
color: black;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
html {
|
|
background-color: black;
|
|
color: white;
|
|
}
|
|
|
|
table td, table th {
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
table th {
|
|
color: white
|
|
}
|
|
|
|
table tr:nth-child(even){
|
|
background-color: #230c00;
|
|
color: white;
|
|
}
|
|
|
|
table tr:hover {
|
|
background-color: #f15a24;
|
|
}
|
|
}
|
|
|
|
</style>
|
|
|
|
<script type="text/javascript" src="yaml.min.js"></script>
|
|
<script type="text/javascript">
|
|
var connectorYaml = `
|
|
pins:
|
|
- pin: 2A
|
|
id: GPIOG_7
|
|
class: outputs
|
|
ts_name: 2A - INJ_1
|
|
function: Injector #1
|
|
type: inj
|
|
color: orange Y1
|
|
|
|
- pin: 2B
|
|
id: GPIOD_12
|
|
class: outputs
|
|
ts_name: 2B - ECF (PWM8)
|
|
function: Engine Radiator Fan
|
|
color: orange B4
|
|
type: ls
|
|
|
|
- pin: 2C
|
|
id: GPIOD_9
|
|
class: outputs
|
|
ts_name: 2C - AC Fan / INJ_5
|
|
function: AC Radiator fan
|
|
type: inj
|
|
|
|
- pin: 2D
|
|
id: GPIOG_8
|
|
class: outputs
|
|
ts_name: 2D - INJ_2
|
|
function: Injector #2
|
|
type: inj
|
|
color: blue Y1
|
|
|
|
- pin: 2E
|
|
id: GPIOC_7
|
|
class: outputs
|
|
ts_name: 2E - COIL_A2 (PWM2)
|
|
function: EGR Valve #1 Coil
|
|
type: ls
|
|
|
|
- pin: 2F
|
|
id: GPIOC_6
|
|
class: outputs
|
|
ts_name: 2E - COIL_A1 (PWM1)
|
|
function: EGR Valve #2 Coil
|
|
type: ls
|
|
|
|
- pin: 2G
|
|
id: GPIOD_11
|
|
class: outputs
|
|
ts_name: 2G - INJ_3
|
|
function: Injector #3
|
|
type: inj
|
|
color: white Y1
|
|
|
|
- pin: 2H
|
|
id: GPIOC_9
|
|
class: outputs
|
|
ts_name: 2H - COIL_B2 (PWM4)
|
|
function: EGR Valve #3 Coil
|
|
type: ls
|
|
|
|
- pin: 2I
|
|
id: GPIOC_8
|
|
class: outputs
|
|
ts_name: 2I - COIL_B1 (PWM3)
|
|
function: EGR Valve #4 Coil
|
|
type: ls
|
|
|
|
- pin: 2J
|
|
id: GPIOD_10
|
|
class: outputs
|
|
ts_name: 2J - INJ_4
|
|
function: Injector #4
|
|
type: inj
|
|
color: green Y1
|
|
|
|
- pin: 2K
|
|
id: GPIOH_15
|
|
class: outputs
|
|
ts_name: 2K - AC (O4)
|
|
function: A/C Relay
|
|
type: ls
|
|
|
|
- pin: 2M
|
|
id: GPIOG_2
|
|
class: outputs
|
|
ts_name: 2M - FPUMP (O9)
|
|
function: Fuel Pump Relay
|
|
type: ls
|
|
color: red B4
|
|
|
|
- pin: 2N
|
|
id: GPIOF_12
|
|
class: outputs
|
|
ts_name: 2N - VTSC / INJ_6
|
|
function: VTCS Control
|
|
type: inj
|
|
|
|
- pin: 2O
|
|
id: GPIOE_4
|
|
class: outputs
|
|
ts_name: 2O - IGN_3
|
|
type: ign
|
|
|
|
- pin: 2P
|
|
function: IAC (positive) idle, +12v wired to main relay via 4AF
|
|
color: red, short wire
|
|
|
|
- pin: 2Q
|
|
id: GPIOD_14
|
|
class: outputs
|
|
ts_name: 2Q - IDLE (PWM5)
|
|
function: IAC (negative) idle, with diode
|
|
type: ls
|
|
color: blue B4
|
|
|
|
- pin: 2R
|
|
id: GPIOG_4
|
|
class: outputs
|
|
ts_name: 2R - CE (O11)
|
|
function: MIL Control
|
|
type: ls
|
|
color: white Y1
|
|
|
|
- pin: 3A
|
|
function: Injector GND
|
|
type: gnd
|
|
color: black Y1
|
|
|
|
- pin: 3B
|
|
function: PCM (ECU) GND
|
|
type: gnd
|
|
color: black W4, sliced for MAP
|
|
|
|
- pin: 3C
|
|
id: GPIOF_13
|
|
class: outputs
|
|
ts_name: 3C - Purge Solenoid / INJ_7
|
|
function: Purge Control Solenoid
|
|
type: inj
|
|
|
|
- pin: 3D
|
|
id: GPIOF_14
|
|
class: outputs
|
|
ts_name: 3D - EGR Solenoid / INJ_8
|
|
function: EGR Boost sens. sol.
|
|
type: inj
|
|
|
|
- pin: 3E
|
|
id: GPIOG_3
|
|
class: outputs
|
|
ts_name: 3E - CANIST (O10)
|
|
function: CDCV (EVAP canister purge valve) Control
|
|
type: ls
|
|
|
|
- pin: 3F
|
|
id: GPIOI_8
|
|
class: outputs
|
|
ts_name: 3F - IGN_1 (1&4)
|
|
function: Coil #1
|
|
type: ign
|
|
color: white B4
|
|
|
|
- pin: 3H
|
|
id: GPIOI_2
|
|
class: outputs
|
|
ts_name: 3H - MAIN (O1)
|
|
function: Main relay control
|
|
type: ls
|
|
color: white or red, R5
|
|
|
|
- pin: 3I
|
|
id: GPIOE_5
|
|
class: outputs
|
|
ts_name: 3I - IGN_2 (2&3)
|
|
function: Coil #2
|
|
type: ign
|
|
color: orange B4
|
|
|
|
- pin: 3J
|
|
id: GPIOH_14
|
|
class: outputs
|
|
ts_name: 3J - O2H (O3)
|
|
function: Front O2 sens. heater GND
|
|
type: ls
|
|
|
|
- pin: 3K
|
|
function: NC
|
|
|
|
- pin: 3L
|
|
id: [GPIOI_6, EFI_ADC_1]
|
|
class: [outputs, analog_inputs]
|
|
ts_name: 3L - IGN_7 / AFR
|
|
type: ign
|
|
|
|
- pin: 3M
|
|
id: GPIOD_15
|
|
class: outputs
|
|
ts_name: 3M - ALTERN (PWM6)
|
|
function: PWM signal to control alternator field voltage
|
|
type: ls
|
|
color: orange R5
|
|
|
|
- pin: 3N
|
|
id: GPIOE_3
|
|
class: outputs
|
|
ts_name: 3N - IGN_4
|
|
type: ign
|
|
|
|
- pin: 3O
|
|
id: GPIOD_13
|
|
class: outputs
|
|
ts_name: 3O - TACH (PWM7)
|
|
function: Tach Out
|
|
type: ls
|
|
color: green B4
|
|
|
|
- pin: 3P
|
|
id: GPIOA_9
|
|
class: outputs
|
|
ts_name: 3P - O2H2 (O7)
|
|
function: Rear O2 sensor heater
|
|
type: ls
|
|
|
|
- pin: 3Q
|
|
function: K-Line (serial comm.)
|
|
|
|
- pin: 3S
|
|
function: Immobilizer comm.
|
|
|
|
- pin: 3T
|
|
id: GPIOF_11
|
|
class: event_inputs
|
|
ts_name: 3T - VSS (D5)
|
|
function: VSS in
|
|
color: blue W3
|
|
|
|
- pin: 3U
|
|
id: GPIOH_13
|
|
class: outputs
|
|
ts_name: 3U - AWARN (O2)
|
|
function: Alternator Warning Light
|
|
type: ls
|
|
|
|
- pin: 3V
|
|
id: [GPIOA_6, EFI_ADC_6]
|
|
class: [event_inputs, analog_inputs]
|
|
ts_name: 3V - CAM (A19)
|
|
function: Camshaft Sensor
|
|
color: blue W3
|
|
|
|
- pin: 3W
|
|
function: NC
|
|
|
|
- pin: 3X
|
|
function: NC
|
|
|
|
- pin: 3Y
|
|
id: [GPIOB_1, EFI_ADC_9]
|
|
class: [event_inputs, analog_inputs]
|
|
ts_name: 3Y - CRANK (A24)
|
|
function: Crankshaft Sensor
|
|
color: white W3
|
|
|
|
- pin: 3Z
|
|
id: GPIOE_2
|
|
class: outputs
|
|
ts_name: 3Z - IGN_5 / GNDA
|
|
type: ign
|
|
|
|
- pin: 4A
|
|
function: Ground
|
|
type: gnd
|
|
color: black W4
|
|
|
|
- pin: 4B
|
|
id: [GPIOF_9, EFI_ADC_2]
|
|
class: [switch_inputs, analog_inputs]
|
|
ts_name: 4B - Brake/RES1 (A7)
|
|
function: Brake Switch
|
|
|
|
- pin: 4C
|
|
id: [GPIOF_10, EFI_ADC_3]
|
|
class: [switch_inputs, analog_inputs]
|
|
ts_name: 4C - Steering/RES2 (A16)
|
|
function: Power Steering Switch
|
|
|
|
- pin: 4D
|
|
function: VVT Oil Control Valve pos. +12v wired to main relay via 4AF, short wire
|
|
|
|
- pin: 4E
|
|
function: DTM switching (Diagnostic Terminal?)
|
|
|
|
- pin: 4F
|
|
id: [GPIOB_0, EFI_ADC_8]
|
|
class: [switch_inputs, analog_inputs]
|
|
ts_name: 4F - AC_PRES/AUX1 (A23)
|
|
function: AC Pressure In
|
|
|
|
- pin: 4H
|
|
id: [GPIOC_4, EFI_ADC_14]
|
|
class: [switch_inputs, analog_inputs]
|
|
ts_name: 4H - Neutral/AUX2 (A21)
|
|
function: Neutral Switch
|
|
|
|
- pin: 4I
|
|
id: [GPIOC_5, EFI_ADC_15]
|
|
class: [switch_inputs, analog_inputs]
|
|
ts_name: 4I - Clutch/AUX3 (A22)
|
|
function: Clutch Switch
|
|
|
|
- pin: 4J
|
|
id: [GPIOA_7, EFI_ADC_7]
|
|
class: [switch_inputs, analog_inputs]
|
|
ts_name: 4J - VTCS/AUX4 (A20)
|
|
function: VTCS ca. switch
|
|
|
|
- pin: 4K
|
|
id: GPIOI_5
|
|
class: outputs
|
|
ts_name: 4K - IGN_6 / +5V_MAP
|
|
type: ign
|
|
|
|
- pin: 4L
|
|
function: Sensor +5V
|
|
color: red W3, sliced for MAP
|
|
|
|
- pin: 4M
|
|
id: EFI_ADC_5
|
|
class: analog_inputs
|
|
ts_name: 4M - KNOCK (A6)
|
|
function: Knock sens. in
|
|
color: white R5
|
|
|
|
- pin: 4N
|
|
id: EFI_ADC_13
|
|
class: analog_inputs
|
|
ts_name: 4N - IAT (A14)
|
|
function: IAT sensor
|
|
color: green B2
|
|
|
|
- pin: 4O
|
|
function: Sensor GND
|
|
type: gnd
|
|
color: black B2
|
|
|
|
- pin: 4P
|
|
id: EFI_ADC_12
|
|
class: analog_inputs
|
|
ts_name: 4P - CLT (A11)
|
|
function: CLT sensor
|
|
color: blue B2
|
|
|
|
- pin: 4Q
|
|
function: NC
|
|
|
|
- pin: 4R
|
|
id: GPIOI_0
|
|
class: outputs
|
|
ts_name: 4R - VVT (O5)
|
|
function: VVT Oil Control Valve neg.
|
|
type: ls
|
|
color: white B2
|
|
|
|
- pin: 4S
|
|
id: EFI_ADC_5
|
|
class: analog_inputs
|
|
ts_name: 4S - Alternator voltage (A5)
|
|
function: +12V engine fuse 15A, ECU power source, run/start
|
|
color: red B2
|
|
|
|
- pin: 4T
|
|
id: EFI_ADC_5
|
|
class: analog_inputs
|
|
ts_name: 4T - Alternator voltage (A5)
|
|
function: Alternator output voltage
|
|
|
|
- pin: 4U
|
|
id: [GPIOI_7, EFI_ADC_11]
|
|
class: [outputs, analog_inputs]
|
|
ts_name: 4U - MAP2/Ign8 (A10)
|
|
function: NC, extra main relay for diode
|
|
color: red, short wire
|
|
type: ign
|
|
|
|
- pin: 4V
|
|
id: EFI_ADC_4
|
|
class: analog_inputs
|
|
ts_name: 4V - TPS (A17)
|
|
function: TPS sensor input
|
|
color: green B2
|
|
|
|
- pin: 4W
|
|
id: EFI_ADC_0
|
|
class: analog_inputs
|
|
ts_name: 4W - O2S (A13)
|
|
function: Front O2 Sensor Signal
|
|
|
|
- pin: 4X
|
|
id: EFI_ADC_10
|
|
class: analog_inputs
|
|
ts_name: 4X - MAF (A9)
|
|
function: MAF sensor
|
|
color: orange B2
|
|
|
|
- pin: 4Z
|
|
function: ECU - TCM, Communication for A/T
|
|
|
|
- pin: 4AA
|
|
id: EFI_ADC_9
|
|
class: analog_inputs
|
|
ts_name: 4AA - O2S2 (A12)
|
|
function: Rear O2 Sensor Signal
|
|
|
|
- pin: 4AB
|
|
id: EFI_ADC_3
|
|
class: analog_inputs
|
|
ts_name: 4AB - FTP/PPS (A18)
|
|
function: Fuel Tank Pressure Sensor, PPS
|
|
|
|
- pin: 4AC
|
|
function: ECU - TCM, Communication for A/T
|
|
|
|
- pin: 4AD
|
|
function: Fuel Level Sensor
|
|
|
|
- pin: 4AE
|
|
function: EGR Boost Pressure Sensor
|
|
|
|
- pin: 4AF
|
|
function: +12v from main relay
|
|
|
|
- pin: 4AG
|
|
function: Bat+ (Hot all times), 12v 10A fuse from battery
|
|
|
|
- pin: 4AH
|
|
function: Evap
|
|
|
|
info:
|
|
image:
|
|
file: main.jpg
|
|
pins:
|
|
- pin: 2A
|
|
x: 2259
|
|
y: 220
|
|
- pin: 2D
|
|
x: 2187
|
|
y: 220
|
|
- pin: 2G
|
|
x: 2115
|
|
y: 220
|
|
- pin: 2J
|
|
x: 2043
|
|
y: 220
|
|
- pin: 2M
|
|
x: 1971
|
|
y: 220
|
|
- pin: 2P
|
|
x: 1899
|
|
y: 220
|
|
- pin: 3A
|
|
x: 1722
|
|
y: 220
|
|
- pin: 3D
|
|
x: 1643
|
|
y: 220
|
|
- pin: 3J
|
|
x: 1490
|
|
y: 220
|
|
- pin: 3M
|
|
x: 1398
|
|
y: 220
|
|
- pin: 3P
|
|
x: 1309
|
|
y: 220
|
|
- pin: 3U
|
|
x: 1212
|
|
y: 220
|
|
- pin: 3X
|
|
x: 1131
|
|
y: 220
|
|
- pin: 4A
|
|
x: 965
|
|
y: 220
|
|
- pin: 4D
|
|
x: 876
|
|
y: 220
|
|
- pin: 4L
|
|
x: 710
|
|
y: 220
|
|
- pin: 4O
|
|
x: 618
|
|
y: 220
|
|
- pin: 4R
|
|
x: 531
|
|
y: 220
|
|
- pin: 4U
|
|
x: 434
|
|
y: 220
|
|
- pin: 4Z
|
|
x: 352
|
|
y: 220
|
|
- pin: 4AC
|
|
x: 257
|
|
y: 220
|
|
- pin: 4AF
|
|
x: 166
|
|
y: 220
|
|
- pin: 2B
|
|
x: 2261
|
|
y: 350
|
|
- pin: 2E
|
|
x: 2193
|
|
y: 350
|
|
- pin: 2H
|
|
x: 2116
|
|
y: 350
|
|
- pin: 2K
|
|
x: 2044
|
|
y: 350
|
|
- pin: 2N
|
|
x: 1968
|
|
y: 350
|
|
- pin: 2Q
|
|
x: 1905
|
|
y: 350
|
|
- pin: 3B
|
|
x: 1726
|
|
y: 350
|
|
- pin: 3E
|
|
x: 1644
|
|
y: 350
|
|
- pin: 3H
|
|
x: 1572
|
|
y: 350
|
|
- pin: 3K
|
|
x: 1498
|
|
y: 350
|
|
- pin: 3N
|
|
x: 1423
|
|
y: 350
|
|
- pin: 3Q
|
|
x: 1356
|
|
y: 350
|
|
- pin: 3S
|
|
x: 1281
|
|
y: 350
|
|
- pin: 3V
|
|
x: 1206
|
|
y: 350
|
|
- pin: 3Y
|
|
x: 1132
|
|
y: 350
|
|
- pin: 4B
|
|
x: 976
|
|
y: 350
|
|
- pin: 4E
|
|
x: 904
|
|
y: 350
|
|
- pin: 4H
|
|
x: 829
|
|
y: 350
|
|
- pin: 4J
|
|
x: 758
|
|
y: 350
|
|
- pin: 4M
|
|
x: 685
|
|
y: 350
|
|
- pin: 4P
|
|
x: 616
|
|
y: 350
|
|
- pin: 4S
|
|
x: 536
|
|
y: 350
|
|
- pin: 4V
|
|
x: 463
|
|
y: 350
|
|
- pin: 4X
|
|
x: 398
|
|
y: 350
|
|
- pin: 4AA
|
|
x: 321
|
|
y: 350
|
|
- pin: 4AD
|
|
x: 254
|
|
y: 350
|
|
- pin: 4AG
|
|
x: 174
|
|
y: 350
|
|
- pin: 2C
|
|
x: 2263
|
|
y: 486
|
|
- pin: 2F
|
|
x: 2189
|
|
y: 486
|
|
- pin: 2I
|
|
x: 2114
|
|
y: 486
|
|
- pin: 2O
|
|
x: 1973
|
|
y: 486
|
|
- pin: 2R
|
|
x: 1895
|
|
y: 486
|
|
- pin: 3C
|
|
x: 1726
|
|
y: 486
|
|
- pin: 3F
|
|
x: 1640
|
|
y: 486
|
|
- pin: 3I
|
|
x: 1568
|
|
y: 486
|
|
- pin: 3L
|
|
x: 1494
|
|
y: 486
|
|
- pin: 3O
|
|
x: 1421
|
|
y: 486
|
|
- pin: 3T
|
|
x: 1277
|
|
y: 486
|
|
- pin: 3W
|
|
x: 1203
|
|
y: 486
|
|
- pin: 3Z
|
|
x: 1129
|
|
y: 486
|
|
- pin: 4C
|
|
x: 974
|
|
y: 486
|
|
- pin: 4F
|
|
x: 900
|
|
y: 486
|
|
- pin: 4I
|
|
x: 828
|
|
y: 486
|
|
- pin: 4K
|
|
x: 760
|
|
y: 486
|
|
- pin: 4N
|
|
x: 682
|
|
y: 486
|
|
- pin: 4T
|
|
x: 535
|
|
y: 486
|
|
- pin: 4W
|
|
x: 467
|
|
y: 486
|
|
- pin: 4AB
|
|
x: 314
|
|
y: 486
|
|
- pin: 4AE
|
|
x: 247
|
|
y: 486
|
|
- pin: 4AH
|
|
x: 169
|
|
y: 486
|
|
`;
|
|
|
|
function addRow(table, pin, pdiv) {
|
|
var template = document.getElementById("table-template");
|
|
var clone = template.content.cloneNode(true);
|
|
var row = clone.querySelector(".data");
|
|
var pdata = clone.querySelector(".pin-data");
|
|
var idata = clone.querySelector(".id-data");
|
|
var tdata = clone.querySelector(".type-data");
|
|
var fdata = clone.querySelector(".function-data");
|
|
var cdata = clone.querySelector(".color-data");
|
|
pdata.textContent = pin.pin;
|
|
idata.textContent = pin.id;
|
|
tdata.textContent = pin.type
|
|
fdata.textContent = pin.function;
|
|
cdata.textContent = pin.color
|
|
row.addEventListener('click', function(pin, pdiv) {
|
|
clickPin(pin, pdiv);
|
|
}.bind(null, pin, pdiv));
|
|
table.appendChild(clone);
|
|
}
|
|
|
|
function clickPin(pin, pdiv) {
|
|
var table = document.getElementById("info-table").querySelector("tbody");
|
|
table.innerHTML = "";
|
|
if (Array.isArray(pin.id)) {
|
|
var pinIds = pin.id.filter((value, index) => {
|
|
return pin.id.indexOf(value) === index;
|
|
});
|
|
for (var i = 0; i < pinIds.length; i++) {
|
|
addRow(table, {pin: pin.pin, id: pinIds[i], function: pin.function}, pdiv);
|
|
}
|
|
} else {
|
|
addRow(table, pin, pdiv);
|
|
}
|
|
var pins = document.querySelectorAll(".pin-marker");
|
|
for (var i = 0; i < pins.length; i++) {
|
|
if (pins[i].dataset.type == pin.type) {
|
|
pins[i].classList.add("highlight");
|
|
} else {
|
|
pins[i].classList.remove("highlight");
|
|
}
|
|
pins[i].classList.remove("selected");
|
|
}
|
|
pdiv.classList.add("selected");
|
|
}
|
|
|
|
function adjustMarkers() {
|
|
var cdiv = document.getElementById("connector-div");
|
|
cdiv.style.width = document.getElementById("connector-img").clientWidth;
|
|
var pins = document.querySelectorAll(".pin-marker");
|
|
for (var i = 0; i < pins.length; i++) {
|
|
var height = cdiv.clientHeight * 0.05;
|
|
pins[i].style.height = height + "px";
|
|
pins[i].style.width = height + "px";
|
|
pins[i].style.marginTop = "-" + (height * 0.5) + "px";
|
|
pins[i].style.marginLeft = "-" + (height * 0.5) + "px";
|
|
pins[i].style.fontSize = (height * 0.5) + "px";
|
|
}
|
|
}
|
|
|
|
window.addEventListener('load', function() {
|
|
var connector = YAML.parse(connectorYaml);
|
|
document.getElementById("connector-img").addEventListener('load', function() {
|
|
for (var i = 0; i < connector.pins.length; i++) {
|
|
var pin = connector.pins[i];
|
|
if (!pin.pin) {
|
|
continue;
|
|
}
|
|
var pinfo;
|
|
for (var ii = 0; ii < connector.info.pins.length; ii++) {
|
|
if (connector.info.pins[ii].pin == pin.pin) {
|
|
pinfo = connector.info.pins[ii];
|
|
break;
|
|
}
|
|
}
|
|
var cdiv = document.getElementById("connector-div");
|
|
var template = document.getElementById("pin-template");
|
|
var clone = template.content.cloneNode(true);
|
|
var pdiv = clone.querySelector("div");
|
|
var img = document.getElementById("connector-img");
|
|
var imgHeight = img.naturalHeight;
|
|
var imgWidth = img.naturalWidth;
|
|
pdiv.textContent = pinfo.pin;
|
|
pdiv.style.top = ((pinfo.y / imgHeight) * 100) + "%";
|
|
pdiv.style.left = ((pinfo.x / imgWidth) * 100) + "%";
|
|
pdiv.dataset.type = pin.type;
|
|
pdiv.addEventListener("click", function(pin, pdiv) {
|
|
clickPin(pin, pdiv);
|
|
}.bind(null, pin, pdiv));
|
|
cdiv.appendChild(pdiv);
|
|
var fullTable = document.getElementById("pinout-table").querySelector("tbody");
|
|
addRow(fullTable, connector.pins[i], pdiv);
|
|
}
|
|
adjustMarkers();
|
|
});
|
|
document.getElementById("connector-img").src = connector.info.image.file;
|
|
});
|
|
|
|
window.addEventListener('resize', function() {
|
|
adjustMarkers();
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<template id="pin-template">
|
|
<div class="pin-marker"></div>
|
|
</template>
|
|
|
|
<div id="connector-container">
|
|
<div id="connector-div">
|
|
<img id="connector-img"></img>
|
|
</div>
|
|
</div>
|
|
|
|
<template id="table-template">
|
|
<tr class="data">
|
|
<td class="pin-data"></td>
|
|
<td class="id-data"></td>
|
|
<td class="type-data"></td>
|
|
<td class="function-data"></td>
|
|
<td class="color-data"></td>
|
|
</tr>
|
|
</template>
|
|
|
|
<table id="info-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Pin Number</th>
|
|
<th>Firmware ID</th>
|
|
<th>Type</th>
|
|
<th>Typical Function</th>
|
|
<th>Pigtail Color</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
|
|
<br/>
|
|
<br/>
|
|
<br/>
|
|
<br/>
|
|
|
|
<h2>Full Pinout Table</h2>
|
|
<table id="pinout-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Pin Number</th>
|
|
<th>Firmware ID</th>
|
|
<th>Type</th>
|
|
<th>Typical Function</th>
|
|
<th>Pigtail Color</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
|
|
</body>
|
|
</html>
|