547 lines
27 KiB
HTML
547 lines
27 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
|
|
<style>
|
|
.pin-marker {
|
|
position: absolute;
|
|
z-index: 1;
|
|
border-radius: 50%;
|
|
background-color: white;
|
|
border: 0.21vw black solid;
|
|
cursor: pointer;
|
|
color: black;
|
|
text-align: center;
|
|
line-height: 200%;
|
|
}
|
|
|
|
[data-type*="12v"],
|
|
[data-type*="12V"] {
|
|
border-color: yellow;
|
|
}
|
|
|
|
[data-type*="5v"],
|
|
[data-type*="5V"] {
|
|
border-color: red;
|
|
}
|
|
|
|
[data-type*="at"] {
|
|
border-color: green;
|
|
}
|
|
|
|
[data-type*="av"] {
|
|
border-color: brown;
|
|
}
|
|
|
|
[data-type*="can"] {
|
|
border-color: blue;
|
|
}
|
|
|
|
[data-type*="din"] {
|
|
border-color: lime;
|
|
}
|
|
|
|
[data-type*="etb"] {
|
|
border-color: darkcyan;
|
|
}
|
|
|
|
[data-type*="gnd"] {
|
|
border-color: darkgreen;
|
|
}
|
|
|
|
[data-type*="gp_high"] {
|
|
border-color: aqua;
|
|
}
|
|
|
|
[data-type*="gp_low"] {
|
|
border-color: aquamarine;
|
|
}
|
|
|
|
[data-type*="gp_pp"] {
|
|
border-color: cyan;
|
|
}
|
|
|
|
[data-type*="hall"] {
|
|
border-color: darkolivegreen;
|
|
}
|
|
|
|
[data-type*="hl"] {
|
|
border-color: gold;
|
|
}
|
|
|
|
[data-type*="hs"] {
|
|
border-color: indigo;
|
|
}
|
|
|
|
[data-type*="ign"] {
|
|
border-color: magenta;
|
|
}
|
|
|
|
[data-type*="inj"] {
|
|
border-color: maroon;
|
|
}
|
|
|
|
[data-type*="ls"] {
|
|
border-color: lightgreen;
|
|
}
|
|
|
|
[data-type*="mr"] {
|
|
border-color: firebrick;
|
|
}
|
|
|
|
[data-type*="pgnd"] {
|
|
border-color: coral;
|
|
}
|
|
|
|
[data-type*="sgnd"] {
|
|
border-color: olive;
|
|
}
|
|
|
|
[data-type*="usb"] {
|
|
border-color: lightseagreen;
|
|
}
|
|
|
|
[data-type*="vr"] {
|
|
border-color: sienna;
|
|
}
|
|
|
|
.pin-marker:hover {
|
|
transform: scale(2);
|
|
z-index: 2;
|
|
}
|
|
|
|
.pin-marker.highlight {
|
|
background-color: #fc935a;
|
|
}
|
|
|
|
.pin-marker.selected {
|
|
background-color: #f15a24;
|
|
color: white;
|
|
}
|
|
|
|
.connector-container {
|
|
width: 100%;
|
|
overflow-x: scroll;
|
|
position: relative;
|
|
height: max(3in, 50vh);
|
|
}
|
|
|
|
.connector-div {
|
|
height: 100%;
|
|
position: relative;
|
|
z-index: 0;
|
|
width: max-content;
|
|
}
|
|
|
|
.connector-img {
|
|
height: 100%;
|
|
min-width: 100%;
|
|
}
|
|
|
|
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 {
|
|
word-wrap: break-word;
|
|
font-size: 2.5rem;
|
|
}
|
|
}
|
|
|
|
table tbody tr {
|
|
cursor: pointer;
|
|
}
|
|
|
|
@media screen {
|
|
td.pin-data {
|
|
border-color: black;
|
|
}
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
.info-table {
|
|
display: none;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
html {
|
|
background-color: black;
|
|
color: white;
|
|
}
|
|
|
|
td.pin-data {
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|
|
|
|
@media print {
|
|
.container {
|
|
height: 99vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.info-table, .ts-data, .ts-header, .type-data, .type-header, .color-data, .color-header, thead {
|
|
display: none;
|
|
}
|
|
.connector-container {
|
|
flex: 0 1 auto;
|
|
height: unset;
|
|
min-height: 2in;
|
|
}
|
|
.connector-div {
|
|
max-width: 100%;
|
|
height: unset;
|
|
}
|
|
.connector-img {
|
|
max-width: 100% !important;
|
|
max-height: 3in;
|
|
}
|
|
h2 {
|
|
font-size: 14px;
|
|
}
|
|
th {
|
|
font-size: 12px;
|
|
}
|
|
td {
|
|
font-size: 10px;
|
|
}
|
|
td:not(.pin-data) {
|
|
border: none !important;
|
|
}
|
|
td.pin-data {
|
|
border-width: 3px;
|
|
border-radius: 10px;
|
|
width: 10px;
|
|
margin: 0px;
|
|
padding: 0px;
|
|
}
|
|
html, tr {
|
|
background-color: white !important;
|
|
color: black !important;
|
|
}
|
|
table {
|
|
width: auto;
|
|
border-collapse: separate;
|
|
}
|
|
.table-wrapper {
|
|
column-count: 4;
|
|
}
|
|
table, tbody, tr {
|
|
display: block;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<script type="text/javascript">
|
|
var connectorData = [
|
|
`{ "pins": [ { "pin": "1A", "function": "12V all times", "type": "12V" }, { "pin": "1B", "id": "EFI_ADC_5", "class": "analog_inputs", "ts_name": "1B - Battery Sense", "function": "ECU power in start & run", "type": "12V" }, { "pin": "1D", "function": "CAN bus high", "type": "can" }, { "pin": "1F", "function": "CAN bus low", "type": "can" }, { "pin": "1E", "id": "GPIOG_9", "class": "outputs", "ts_name": "1E - Check Engine Light", "function": "Check Engine Light", "type": "ls" }, { "pin": "1F", "function": "Tachometer" }, { "pin": "1G", "id": "GPIOI_8", "class": "outputs", "ts_name": "1G - Ignition 1 & 4", "type": "ign" }, { "pin": "1H", "id": "GPIOE_5", "class": "outputs", "ts_name": "1H - Ignition 2 & 3", "type": "ign" }, { "pin": "1I", "function": "USB GND", "type": "gnd" }, { "pin": "1J", "id": "GPIOH_15", "class": "outputs", "ts_name": "1J - AC Relay", "function": "A/C Relay", "type": "ls" }, { "pin": "1L", "id": "GPIOD_12", "class": "outputs", "ts_name": "Radiator Fan", "function": "Radiator Fan Relay", "type": "ls" }, { "pin": "1M", "id": "GPIOF_11", "class": "event_inputs", "ts_name": "1M - VSS", "function": "VSS IN" }, { "pin": "1N", "ts_name": "1N - 5v ref NA6", "function": "Sensor +5V" }, { "pin": "1Q", "id": [ "GPIOC_5", "EFI_ADC_15" ], "class": [ "switch_inputs", "analog_inputs" ], "ts_name": "1Q AC Switch", "function": "A/C switch input", "type": "din" }, { "pin": "1R", "function": "Coolant Fan Relay" }, { "pin": "1S", "ts_name": "1S - Heate Input", "function": "Heater Input" }, { "pin": "1T", "function": "EGR Solenoid" }, { "pin": "1V", "id": [ "GPIOC_4", "EFI_ADC_14" ], "class": [ "switch_inputs", "analog_inputs" ], "ts_name": "1V - Clutch Switch", "function": "Clutch switch input", "type": "din" }, { "pin": "2A", "function": "GND" }, { "pin": "2B", "function": "+5v" }, { "pin": "2C", "function": "WBO Heater -" }, { "pin": "2D", "function": "+12v" }, { "pin": "2E", "function": "WBO R Trim" }, { "pin": "2F", "function": "WBO Ip" }, { "pin": "2G", "function": "WBO Vs/Ip" }, { "pin": "2H", "function": "WBO Vs" }, { "pin": "2I", "function": "VVT Output" }, { "pin": "2J", "id": "GPIOF_12", "class": "outputs", "ts_name": "2J - Boost Control", "function": "Boost Control Solenoid" }, { "pin": "2K", "function": "GND" }, { "pin": "2L", "id": "GPIOF_3", "class": "event_inputs", "ts_name": "2L - Flex Fuel", "function": "Flex Fuel Input" }, { "pin": "2M", "id": [ "GPIOC_1", "EFI_ADC_11" ], "class": [ "switch_inputs", "analog_inputs" ], "ts_name": "2M - Pressure Sensor", "function": "pressure input" }, { "pin": "2N", "id": [ "GPIOA_1", "EFI_ADC_1" ], "class": [ "switch_inputs", "analog_inputs" ], "ts_name": "2N - Temperature Sensor", "function": "temp input" }, { "pin": "2O", "function": "+5v" }, { "pin": "2P", "function": "Knock Input" }, { "pin": "3A", "function": "Power GND", "type": "pgnd", "color": "white" }, { "pin": "3B", "function": "Power GND", "type": "pgnd", "color": "white" }, { "pin": "3C", "function": "Sensor GND", "type": "gnd", "color": "white" }, { "pin": "3D", "function": "Sensor GND", "type": "gnd", "color": "white" }, { "pin": "3E", "id": "GPIOB_1", "class": "event_inputs", "ts_name": "3E - CRANK", "function": "Crankshaft Sensor" }, { "pin": "3F", "function": "MAF GND", "type": "gnd", "color": "white" }, { "pin": "3G", "id": "GPIOA_6", "class": "event_inputs", "ts_name": "3G - CAM", "function": "Camshaft Sensor" }, { "pin": "3I", "id": "GPIOI_0", "class": "outputs", "ts_name": "Tachometer", "function": "tachometer" }, { "pin": "3K", "class": "outputs", "ts_name": "3K - TPS 5v 94-95", "function": "5v reference" }, { "pin": "3L", "function": "TPS INPUT" }, { "pin": "3M", "id": "EFI_ADC_4", "class": "analog_inputs", "ts_name": "TPS Input", "function": "TPS INPUT" }, { "pin": "3O", "id": "EFI_ADC_10", "class": "analog_inputs", "ts_name": "3O - MAF", "function": "MAF Input" }, { "pin": "3P", "id": "EFI_ADC_13", "class": "analog_inputs", "ts_name": "3P - IAT", "function": "IAT sensor" }, { "pin": "3S", "id": "GPIOD_9", "class": "outputs", "ts_name": "3S - A/C Fan 94-95", "function": "A/C Fan" }, { "pin": "3T", "id": "GPIOG_2", "class": "outputs", "ts_name": "Fuel Pump Relay", "function": "Fuel Pump Relay", "type": "ls" }, { "pin": "3N", "id": "EFI_ADC_0", "class": "analog_inputs", "ts_name": "3N - O2S", "function": "External Wideband signal" }, { "pin": "3Q", "id": "EFI_ADC_12", "class": "analog_inputs", "ts_name": "3Q - CLT", "function": "CLT sensor" }, { "pin": "3U", "id": "GPIOG_7", "class": "outputs", "ts_name": "3U - Injector 1", "function": "Injector", "type": "inj" }, { "pin": "3V", "id": "GPIOG_8", "class": "outputs", "ts_name": "3V - Injector 2", "function": "Injector", "type": "inj" }, { "pin": "3W", "id": "GPIOD_14", "class": "outputs", "ts_name": "3W - IDLE", "function": "IAC idle", "type": "ls" }, { "pin": "3Y", "id": "GPIOD_11", "class": "outputs", "ts_name": "3Y - Injector 3", "function": "Injector", "type": "inj" }, { "pin": "3Z", "id": "GPIOD_10", "class": "outputs", "ts_name": "3Z - Injector 4", "function": "Injector", "type": "inj" }, { "pin": "int_map", "id": "EFI_ADC_2", "class": "analog_inputs", "ts_name": "intMAP (A15)" } ], "info": { "title": "Hellen Miata NA6", "image": { "file": "main.jpg" }, "pins": [ { "pin": "1A", "x": 3984, "y": 312 }, { "pin": "1B", "x": 3984, "y": 512 }, { "pin": "1C", "x": 3860, "y": 312 }, { "pin": "1D", "x": 3860, "y": 512 }, { "pin": "1E", "x": 3735, "y": 352 }, { "pin": "1F", "x": 3735, "y": 544 }, { "pin": "1G", "x": 3624, "y": 352 }, { "pin": "1H", "x": 3624, "y": 544 }, { "pin": "1I", "x": 3508, "y": 352 }, { "pin": "1J", "x": 3508, "y": 544 }, { "pin": "1M", "x": 3284, "y": 352 }, { "pin": "1N", "x": 3284, "y": 544 }, { "pin": "1R", "x": 3062, "y": 544 }, { "pin": "1S", "x": 2952, "y": 352 }, { "pin": "1T", "x": 2952, "y": 544 }, { "pin": "1V", "x": 2838, "y": 512 }, { "pin": "2A", "x": 2616, "y": 352 }, { "pin": "2B", "x": 2616, "y": 544 }, { "pin": "2C", "x": 2506, "y": 352 }, { "pin": "2D", "x": 2506, "y": 544 }, { "pin": "2E", "x": 2396, "y": 352 }, { "pin": "2F", "x": 2396, "y": 544 }, { "pin": "2G", "x": 2286, "y": 352 }, { "pin": "2H", "x": 2286, "y": 544 }, { "pin": "2I", "x": 2176, "y": 352 }, { "pin": "2J", "x": 2176, "y": 544 }, { "pin": "2K", "x": 2066, "y": 352 }, { "pin": "2L", "x": 2066, "y": 544 }, { "pin": "2M", "x": 1956, "y": 352 }, { "pin": "2N", "x": 1956, "y": 544 }, { "pin": "2O", "x": 1846, "y": 352 }, { "pin": "2P", "x": 1846, "y": 544 }, { "pin": "3A", "x": 1604, "y": 312 }, { "pin": "3B", "x": 1604, "y": 512 }, { "pin": "3C", "x": 1488, "y": 312 }, { "pin": "3D", "x": 1488, "y": 512 }, { "pin": "3E", "x": 1368, "y": 360 }, { "pin": "3F", "x": 1368, "y": 552 }, { "pin": "3G", "x": 1256, "y": 360 }, { "pin": "3I", "x": 1140, "y": 360 }, { "pin": "3J", "x": 1140, "y": 552 }, { "pin": "3O", "x": 807, "y": 360 }, { "pin": "3P", "x": 807, "y": 552 }, { "pin": "3Q", "x": 690, "y": 360 }, { "pin": "3U", "x": 460, "y": 312 }, { "pin": "3V", "x": 460, "y": 512 }, { "pin": "3W", "x": 330, "y": 312 }, { "pin": "3Y", "x": 200, "y": 312 }, { "pin": "3Z", "x": 200, "y": 512 } ] } } `,
|
|
///DATA///
|
|
`{ "pins": [ { "pin": "1A", "function": "12V all times", "type": "12V" }, { "pin": "1B", "id": "EFI_ADC_5", "class": "analog_inputs", "ts_name": "1B - Battery Sense", "function": "ECU power in start & run", "type": "12V" }, { "pin": "1D", "function": "CAN bus high", "type": "can" }, { "pin": "1F", "function": "CAN bus low", "type": "can" }, { "pin": "1E", "id": "GPIOG_9", "class": "outputs", "ts_name": "1E - Check Engine Light", "function": "Check Engine Light", "type": "ls" }, { "pin": "1F", "function": "Tachometer" }, { "pin": "1G", "id": "GPIOI_8", "class": "outputs", "ts_name": "1G - Ignition 1 & 4", "type": "ign" }, { "pin": "1H", "id": "GPIOE_5", "class": "outputs", "ts_name": "1H - Ignition 2 & 3", "type": "ign" }, { "pin": "1I", "function": "USB GND", "type": "gnd" }, { "pin": "1J", "id": "GPIOH_15", "class": "outputs", "ts_name": "1J - AC Relay", "function": "A/C Relay", "type": "ls" }, { "pin": "1L", "id": "GPIOD_12", "class": "outputs", "ts_name": "Radiator Fan", "function": "Radiator Fan Relay", "type": "ls" }, { "pin": "1M", "id": "GPIOF_11", "class": "event_inputs", "ts_name": "1M - VSS", "function": "VSS IN" }, { "pin": "1N", "ts_name": "1N - 5v ref NA6", "function": "Sensor +5V" }, { "pin": "1Q", "id": [ "GPIOC_5", "EFI_ADC_15" ], "class": [ "switch_inputs", "analog_inputs" ], "ts_name": "1Q AC Switch", "function": "A/C switch input", "type": "din" }, { "pin": "1R", "function": "Coolant Fan Relay" }, { "pin": "1S", "ts_name": "1S - Heate Input", "function": "Heater Input" }, { "pin": "1T", "function": "EGR Solenoid" }, { "pin": "1V", "id": [ "GPIOC_4", "EFI_ADC_14" ], "class": [ "switch_inputs", "analog_inputs" ], "ts_name": "1V - Clutch Switch", "function": "Clutch switch input", "type": "din" }, { "pin": "2A", "function": "GND" }, { "pin": "2B", "function": "+5v" }, { "pin": "2C", "function": "WBO Heater -" }, { "pin": "2D", "function": "+12v" }, { "pin": "2E", "function": "WBO R Trim" }, { "pin": "2F", "function": "WBO Ip" }, { "pin": "2G", "function": "WBO Vs/Ip" }, { "pin": "2H", "function": "WBO Vs" }, { "pin": "2I", "function": "VVT Output" }, { "pin": "2J", "id": "GPIOF_12", "class": "outputs", "ts_name": "2J - Boost Control", "function": "Boost Control Solenoid" }, { "pin": "2K", "function": "GND" }, { "pin": "2L", "id": "GPIOF_3", "class": "event_inputs", "ts_name": "2L - Flex Fuel", "function": "Flex Fuel Input" }, { "pin": "2M", "id": [ "GPIOC_1", "EFI_ADC_11" ], "class": [ "switch_inputs", "analog_inputs" ], "ts_name": "2M - Pressure Sensor", "function": "pressure input" }, { "pin": "2N", "id": [ "GPIOA_1", "EFI_ADC_1" ], "class": [ "switch_inputs", "analog_inputs" ], "ts_name": "2N - Temperature Sensor", "function": "temp input" }, { "pin": "2O", "function": "+5v" }, { "pin": "2P", "function": "Knock Input" }, { "pin": "3A", "function": "Power GND", "type": "pgnd", "color": "white" }, { "pin": "3B", "function": "Power GND", "type": "pgnd", "color": "white" }, { "pin": "3C", "function": "Sensor GND", "type": "gnd", "color": "white" }, { "pin": "3D", "function": "Sensor GND", "type": "gnd", "color": "white" }, { "pin": "3E", "id": "GPIOB_1", "class": "event_inputs", "ts_name": "3E - CRANK", "function": "Crankshaft Sensor" }, { "pin": "3F", "function": "MAF GND", "type": "gnd", "color": "white" }, { "pin": "3G", "id": "GPIOA_6", "class": "event_inputs", "ts_name": "3G - CAM", "function": "Camshaft Sensor" }, { "pin": "3I", "id": "GPIOI_0", "class": "outputs", "ts_name": "Tachometer", "function": "tachometer" }, { "pin": "3K", "class": "outputs", "ts_name": "3K - TPS 5v 94-95", "function": "5v reference" }, { "pin": "3L", "function": "TPS INPUT" }, { "pin": "3M", "id": "EFI_ADC_4", "class": "analog_inputs", "ts_name": "TPS Input", "function": "TPS INPUT" }, { "pin": "3O", "id": "EFI_ADC_10", "class": "analog_inputs", "ts_name": "3O - MAF", "function": "MAF Input" }, { "pin": "3P", "id": "EFI_ADC_13", "class": "analog_inputs", "ts_name": "3P - IAT", "function": "IAT sensor" }, { "pin": "3S", "id": "GPIOD_9", "class": "outputs", "ts_name": "3S - A/C Fan 94-95", "function": "A/C Fan" }, { "pin": "3T", "id": "GPIOG_2", "class": "outputs", "ts_name": "Fuel Pump Relay", "function": "Fuel Pump Relay", "type": "ls" }, { "pin": "3N", "id": "EFI_ADC_0", "class": "analog_inputs", "ts_name": "3N - O2S", "function": "External Wideband signal" }, { "pin": "3Q", "id": "EFI_ADC_12", "class": "analog_inputs", "ts_name": "3Q - CLT", "function": "CLT sensor" }, { "pin": "3U", "id": "GPIOG_7", "class": "outputs", "ts_name": "3U - Injector 1", "function": "Injector", "type": "inj" }, { "pin": "3V", "id": "GPIOG_8", "class": "outputs", "ts_name": "3V - Injector 2", "function": "Injector", "type": "inj" }, { "pin": "3W", "id": "GPIOD_14", "class": "outputs", "ts_name": "3W - IDLE", "function": "IAC idle", "type": "ls" }, { "pin": "3Y", "id": "GPIOD_11", "class": "outputs", "ts_name": "3Y - Injector 3", "function": "Injector", "type": "inj" }, { "pin": "3Z", "id": "GPIOD_10", "class": "outputs", "ts_name": "3Z - Injector 4", "function": "Injector", "type": "inj" }, { "pin": "int_map", "id": "EFI_ADC_2", "class": "analog_inputs", "ts_name": "intMAP (A15)" } ], "info": { "title": "Hellen Miata NA6", "image": { "file": "main.jpg" }, "pins": [ { "pin": "1A", "x": 3984, "y": 312 }, { "pin": "1B", "x": 3984, "y": 512 }, { "pin": "1C", "x": 3860, "y": 312 }, { "pin": "1D", "x": 3860, "y": 512 }, { "pin": "1E", "x": 3735, "y": 352 }, { "pin": "1F", "x": 3735, "y": 544 }, { "pin": "1G", "x": 3624, "y": 352 }, { "pin": "1H", "x": 3624, "y": 544 }, { "pin": "1I", "x": 3508, "y": 352 }, { "pin": "1J", "x": 3508, "y": 544 }, { "pin": "1M", "x": 3284, "y": 352 }, { "pin": "1N", "x": 3284, "y": 544 }, { "pin": "1R", "x": 3062, "y": 544 }, { "pin": "1S", "x": 2952, "y": 352 }, { "pin": "1T", "x": 2952, "y": 544 }, { "pin": "1V", "x": 2838, "y": 512 }, { "pin": "2A", "x": 2616, "y": 352 }, { "pin": "2B", "x": 2616, "y": 544 }, { "pin": "2C", "x": 2506, "y": 352 }, { "pin": "2D", "x": 2506, "y": 544 }, { "pin": "2E", "x": 2396, "y": 352 }, { "pin": "2F", "x": 2396, "y": 544 }, { "pin": "2G", "x": 2286, "y": 352 }, { "pin": "2H", "x": 2286, "y": 544 }, { "pin": "2I", "x": 2176, "y": 352 }, { "pin": "2J", "x": 2176, "y": 544 }, { "pin": "2K", "x": 2066, "y": 352 }, { "pin": "2L", "x": 2066, "y": 544 }, { "pin": "2M", "x": 1956, "y": 352 }, { "pin": "2N", "x": 1956, "y": 544 }, { "pin": "2O", "x": 1846, "y": 352 }, { "pin": "2P", "x": 1846, "y": 544 }, { "pin": "3A", "x": 1604, "y": 312 }, { "pin": "3B", "x": 1604, "y": 512 }, { "pin": "3C", "x": 1488, "y": 312 }, { "pin": "3D", "x": 1488, "y": 512 }, { "pin": "3E", "x": 1368, "y": 360 }, { "pin": "3F", "x": 1368, "y": 552 }, { "pin": "3G", "x": 1256, "y": 360 }, { "pin": "3I", "x": 1140, "y": 360 }, { "pin": "3J", "x": 1140, "y": 552 }, { "pin": "3O", "x": 807, "y": 360 }, { "pin": "3P", "x": 807, "y": 552 }, { "pin": "3Q", "x": 690, "y": 360 }, { "pin": "3U", "x": 460, "y": 312 }, { "pin": "3V", "x": 460, "y": 512 }, { "pin": "3W", "x": 330, "y": 312 }, { "pin": "3Y", "x": 200, "y": 312 }, { "pin": "3Z", "x": 200, "y": 512 } ] } } `,
|
|
///DATA///
|
|
];
|
|
|
|
function hideEmptyColumns(table) {
|
|
var rows = table.querySelector('tbody').children;
|
|
var tableHead = table.querySelector("thead>tr")
|
|
var cols = tableHead.children
|
|
for (var i = 0; i < cols.length; i++) {
|
|
var empty = true;
|
|
for (var ii = 0; ii < rows.length; ii++) {
|
|
empty = rows[ii].children[i].textContent.length > 0 ? false : empty;
|
|
}
|
|
if (empty) {
|
|
tableHead.querySelectorAll('th')[i].style.display = 'none';
|
|
for (var ii = 0; ii < rows.length; ii++) {
|
|
rows[ii].children[i].style.display = 'none';
|
|
}
|
|
} else {
|
|
tableHead.querySelectorAll('th')[i].style.display = '';
|
|
for (var ii = 0; ii < rows.length; ii++) {
|
|
rows[ii].children[i].style.display = '';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function addRow(table, pin, cid) {
|
|
var template = document.getElementById("table-template");
|
|
var clone = template.content.cloneNode(true);
|
|
var row = clone.querySelector(".data");
|
|
var cells = row.children;
|
|
for (var i = 0; i < cells.length; i++) {
|
|
var cell = cells[i];
|
|
cell.textContent = Array.isArray(pin[cell.dataset.field]) ? pin[cell.dataset.field].join(", ") : pin[cell.dataset.field];
|
|
}
|
|
clone.querySelector(".pin-data").dataset.type = pin.type;
|
|
if (pin.pdiv) {
|
|
row.addEventListener('click', function(table, pin, cid) {
|
|
var container;
|
|
for (var elem = table; elem && elem !== document; elem = elem.parentNode) {
|
|
if (elem.matches(".container")) {
|
|
var container = elem;
|
|
};
|
|
}
|
|
clickPin(container.querySelector(".info-table tbody"), pin, cid);
|
|
container.scrollIntoView()
|
|
}.bind(null, table, pin, cid));
|
|
}
|
|
table.appendChild(clone);
|
|
}
|
|
|
|
function clickPin(table, pin, cid) {
|
|
table.parentElement.style.display = "table";
|
|
table.innerHTML = "";
|
|
addRow(table, pin, cid);
|
|
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");
|
|
}
|
|
pin.pdiv.classList.add("selected");
|
|
hideEmptyColumns(table.parentElement);
|
|
if (typeof(cid) != "undefined") {
|
|
var url = new URL(window.location);
|
|
url.searchParams.set("connector", cid);
|
|
url.searchParams.set("pin", pin.pin);
|
|
window.history.pushState({}, "", url)
|
|
} else {
|
|
var url = new URL(window.location);
|
|
url.search = "";
|
|
window.history.pushState({}, "", url)
|
|
}
|
|
}
|
|
function checkparams() {
|
|
var params = new URLSearchParams(window.location.search);
|
|
var connector = params.get("connector");
|
|
var pin = params.get("pin");
|
|
for (var i = 0; i < connectorData.length; i++) {
|
|
var c = connectorData[i];
|
|
if (c.info.id == connector) {
|
|
var table = document.querySelectorAll(".info-table tbody")[i];
|
|
for (var iii = 0; iii < c.pins.length; iii++) {
|
|
if (c.pins[iii].pin == pin) {
|
|
clickPin(table, c.pins[iii], c.info.id);
|
|
return;
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
var images = 0;
|
|
|
|
function checkImagesLoaded() {
|
|
images -= 1;
|
|
if (images == 0) {
|
|
checkparams();
|
|
}
|
|
}
|
|
|
|
window.addEventListener('load', function() {
|
|
window.onpopstate = function(ev) {
|
|
if (event.state) {
|
|
checkparams();
|
|
}
|
|
};
|
|
for (var c = 0; c < connectorData.length; c++) {
|
|
connectorData[c] = JSON.parse(connectorData[c]);
|
|
var connector = connectorData[c];
|
|
var template = document.getElementById("connector-template");
|
|
var clone = template.content.cloneNode(true);
|
|
document.body.appendChild(clone);
|
|
var sdiv = document.body.lastChild.previousSibling;
|
|
var img = sdiv.querySelector(".connector-img");
|
|
images += 1;
|
|
img.addEventListener('load', function(connector, sdiv, img) {
|
|
var cdiv = sdiv.querySelector(".connector-div");
|
|
var cid = connector.info.id;
|
|
var ptemplate = document.getElementById("pin-template");
|
|
var imgHeight = img.naturalHeight;
|
|
var imgWidth = img.naturalWidth;
|
|
var table = sdiv.querySelector(".info-table").querySelector("tbody");
|
|
var fullTable = sdiv.querySelector(".pinout-table").querySelector("tbody");
|
|
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;
|
|
}
|
|
}
|
|
if (!pinfo.x) {
|
|
addRow(fullTable, connector.pins[i], cid);
|
|
continue;
|
|
}
|
|
var closest = 1000000;
|
|
for (var ii = 0; ii < connector.info.pins.length; ii++) {
|
|
var tinfo = connector.info.pins[ii];
|
|
var distance = Math.pow((tinfo.x - pinfo.x), 2) + Math.pow((tinfo.y - pinfo.y), 2);
|
|
if (tinfo.pin != pin.pin && (!closest || distance < closest)) {
|
|
closest = distance;
|
|
}
|
|
}
|
|
var pclone = ptemplate.content.cloneNode(true);
|
|
var pdiv = pclone.querySelector("div");
|
|
pdiv.textContent = pinfo.pin;
|
|
pdiv.style.top = ((pinfo.y / imgHeight) * 100) + "%";
|
|
pdiv.style.left = ((pinfo.x / imgWidth) * 100) + "%";
|
|
pdiv.dataset.type = pin.type;
|
|
pin.pdiv = pdiv;
|
|
pdiv.addEventListener("click", function(table, pin, cid) {
|
|
clickPin(table, pin, cid);
|
|
}.bind(null, table, pin, cid));
|
|
closest = Math.sqrt(closest);
|
|
var divheight = cdiv.clientHeight;
|
|
var divwidth = cdiv.clientWidth;
|
|
var mult = cdiv.querySelector("img").naturalHeight / divheight;
|
|
var newheight = (closest / mult)
|
|
var pxheight = divheight * 0.08;
|
|
if (newheight < pxheight) {
|
|
pxheight = newheight;
|
|
}
|
|
var height = (pxheight / divheight) * 100;
|
|
var width = (pxheight / divwidth) * 100;
|
|
pdiv.style.height = "calc(" + height + "% - 0.21vw)";
|
|
pdiv.style.width = "calc(" + width + "% - 0.21vw)";
|
|
pdiv.style.marginTop = "-" + (width / 2) + "%";
|
|
pdiv.style.marginLeft = "-" + (width / 2) + "%";
|
|
pdiv.style.fontSize = (height * 1.8) + "px";
|
|
pdiv.style.fontSize = (pxheight * 0.5) + "px";
|
|
window.addEventListener('beforeprint', function(pdiv, width, divwidth, event) {
|
|
pdiv.style.fontSize = "calc(calc(" + width + "px * min(640, " + divwidth + ")) * 0.0055)";
|
|
}.bind(null, pdiv, width, divwidth));
|
|
window.addEventListener('afterprint', function(pdiv, pxheight, event) {
|
|
pdiv.style.fontSize = (pxheight * 0.5) + "px";
|
|
}.bind(null, pdiv, pxheight));
|
|
cdiv.appendChild(pdiv);
|
|
addRow(fullTable, pin, cid);
|
|
}
|
|
hideEmptyColumns(sdiv.querySelector('.pinout-table'));
|
|
checkImagesLoaded();
|
|
}.bind(null, connector, sdiv, img));
|
|
img.src = connector.info.image.file;
|
|
if (document.title.length == 0 && typeof(connector.info.title) != "undefined") {
|
|
document.title = connector.info.title;
|
|
}
|
|
if (typeof(connector.info.name) != "undefined") {
|
|
sdiv.querySelector(".connector-name").innerText = connector.info.name;
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<template id="pin-template">
|
|
<div class="pin-marker"></div>
|
|
</template>
|
|
|
|
<template id="table-template">
|
|
<tr class="data">
|
|
<td class="pin-data" data-field="pin"></td>
|
|
<td class="ts-data" data-field="ts_name"></td>
|
|
<td class="type-data" data-field="type"</td>
|
|
<td class="function-data" data-field="function"></td>
|
|
<td class="color-data" data-field="color"></td>
|
|
</tr>
|
|
</template>
|
|
|
|
<template id="connector-template">
|
|
<div class="container">
|
|
<h2 class="connector-name"></h2>
|
|
<div class="connector-container">
|
|
<div class="connector-div">
|
|
<img class="connector-img"></img>
|
|
</div>
|
|
</div>
|
|
<table class="info-table">
|
|
<thead>
|
|
<tr>
|
|
<th class="pin-header" data-field="pin">Pin Number</th>
|
|
<th class="ts-header" data-field="ts_name">TS Name</th>
|
|
<th class="type-header" data-field="type">Type</th>
|
|
<th class="function-header" data-field="function">Typical Function</th>
|
|
<th class="color-header" data-field="color">Pigtail Color</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
<h2>Full Pinout Table</h2>
|
|
<div class="table-wrapper">
|
|
<table class="pinout-table">
|
|
<thead>
|
|
<tr>
|
|
<th class="pin-header" data-field="pin">Pin Number</th>
|
|
<th class="ts-header" data-field="ts_name">TS Name</th>
|
|
<th class="type-header" data-field="type">Type</th>
|
|
<th class="function-header" data-field="function">Typical Function</th>
|
|
<th class="color-header" data-field="color">Pigtail Color</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
</body>
|
|
</html>
|