diff --git a/firmware/config/boards/hellen/hellen128/connectors/main.jpg b/firmware/config/boards/hellen/hellen128/connectors/main.jpg new file mode 100644 index 0000000000..277bdd8724 Binary files /dev/null and b/firmware/config/boards/hellen/hellen128/connectors/main.jpg differ diff --git a/firmware/config/boards/hellen/hellen128/connectors/main.yaml b/firmware/config/boards/hellen/hellen128/connectors/main.yaml new file mode 100644 index 0000000000..b93139f2c0 --- /dev/null +++ b/firmware/config/boards/hellen/hellen128/connectors/main.yaml @@ -0,0 +1,868 @@ +pins: + - pin: A1 + function: NC + + - pin: A2 + function: ECU power supply from ignition key + type: 12v + + - pin: A3 + function: power GND + type: gnd + + - pin: A4 + function: NC + + - pin: A5 + function: NC + + - pin: A6 + function: low side control, unknown current probably low? + type: ls + + - pin: A7 + function: power GND + type: gnd + + - pin: A8 + function: power GND + type: gnd + + - pin: B1 + function: NC + + - pin: B2 + function: NC + + - pin: B3 + function: NC + + - pin: B4 + function: 12V Constant + type: 12v + + - pin: C1 + function: NC + + - pin: C2 + function: NC + + - pin: C3 + function: NC + + - pin: C4 + function: NC + + - pin: C5 + function: NC + + - pin: C6 + function: NC + + - pin: C7 + function: NC + + - pin: C8 + function: NC + + - pin: C9 + function: NC + + - pin: C10 + function: NC + + - pin: C11 + function: NC + + - pin: C12 + function: NC + + - pin: C13 + function: NC + + - pin: C14 + function: NC + + - pin: C15 + function: NC + + - pin: C16 + function: NC + + - pin: C17 + function: NC + + - pin: C18 + function: NC + + - pin: C19 + function: NC + + - pin: C20 + function: NC + + - pin: C21 + function: low side solenoid control + type: ls + + - pin: C22 + function: sensor +5v feed + type: 5v + + - pin: C23 + function: analog GND + type: gnd + + - pin: C24 + function: PPS1 analog input + type: av + + - pin: C25 + function: PPS2 analog input + type: av + + - pin: C26 + function: analog GND + type: gnd + + - pin: C27 + function: sensor +5v feed + type: 5v + + - pin: C28 + function: NC + + - pin: C29 + function: low side relay control + type: ls + + - pin: C30 + function: NC + + - pin: C31 + function: NC + + - pin: C32 + function: NC + + - pin: C33 + function: NC + + - pin: C34 + function: NC + + - pin: C35 + function: proto via + + - pin: C36 + function: NC + + - pin: C37 + function: NC + + - pin: C38 + function: proto via + + - pin: C39 + function: NC K line + + - pin: C40 + function: proto via + + - pin: D1 + function: NC + + - pin: D2 + function: proto via + + - pin: D3 + function: proto via + + - pin: D4 + function: NC + + - pin: D5 + function: NC + + - pin: D6 + function: NC + + - pin: D7 + function: NC + + - pin: D8 + function: analog input WBO + type: av + + - pin: D9 + function: analog input WBO + type: av + + - pin: D10 + function: NC + + - pin: D11 + function: CAN_H + type: can + + - pin: D12 + function: CAN_L + type: can + + - pin: D13 + function: NC + + - pin: D14 + function: proto via + + - pin: D15 + function: NC + + - pin: D16 + function: NC + + - pin: D17 + function: NC + + - pin: D18 + function: NC + + - pin: D19 + function: proto via + + - pin: D20 + function: proto via + + - pin: D21 + function: proto via + + - pin: D22 + function: proto via + + - pin: D23 + function: proto via + + - pin: D24 + function: proto via + + - pin: E1 + function: injector output 1 + type: inj + + - pin: E2 + function: injector output 2 + type: inj + + - pin: E3 + function: injector output 3 + type: inj + + - pin: E4 + function: 230: 1.5A low side VVT solenoid / 430 injector output 4 + type: inj + + - pin: E5 + function: NC + + - pin: E6 + function: NC + + - pin: E7 + function: NC + + - pin: E8 + function: NC + + - pin: E9 + function: NC + + - pin: E10 + function: NC + + - pin: E11 + function: NC + + - pin: E12 + function: NC + + - pin: E13 + function: injector output 5 + type: inj + + - pin: E14 + function: injector output 6 + type: inj + + - pin: E15 + function: proto via + + - pin: E16 + function: proto via + + - pin: E17 + function: proto via + + - pin: E18 + function: NC + + - pin: E19 + function: NC + + - pin: E20 + function: NC + + - pin: E21 + function: NC + + - pin: E22 + function: sensor +5v feed + type: 5v + + - pin: E23 + function: analog input MAP + type: av + + - pin: E24 + function: analog GND + type: gnd + + - pin: E25 + function: injector output 7 + type: inj + + - pin: E26 + function: injector output 8 + type: inj + + - pin: E27 + function: NC + + - pin: E28 + function: analog GND + type: gnd + + - pin: E29 + function: analog input CLT + type: av + + - pin: E30 + function: NC + + - pin: E31 + function: analog input TPS1 + type: av + + - pin: E32 + function: analog GND + type: gnd + + - pin: E33 + function: sensor +5v feed + type: 5v + + - pin: E34 + function: analog input TPS2 + type: av + + - pin: E35 + function: NC + + - pin: E36 + function: NC + + - pin: E37 + function: VR- + type: vr + + - pin: E38 + function: VR+ + type: vr + + - pin: E39 + function: analog GND + type: gnd + + - pin: E40 + function: digital input CAM input + + - pin: E41 + function: knock sensor GND + + - pin: E42 + function: knock sensor signal + + - pin: E43 + function: NC + + - pin: E44 + function: NC + + - pin: E45 + function: analog input IAT + type: av + + - pin: E46 + function: sensor +5v feed + type: 5v + + - pin: E47 + function: analog input + proto via + type: av + + - pin: E48 + function: analog GND + type: gnd + + - pin: F1 + function: DC Motor - + + - pin: F2 + function: DC Motor + + + - pin: F3 + function: NC + + - pin: F4 + function: igniter + + - pin: F5 + function: igniter + + - pin: F6 + function: igniter + + - pin: F7 + function: igniter + + - pin: F8 + function: power GND + type: gnd + + - pin: F9 + function: igniter + + - pin: F10 + function: igniter + + - pin: F11 + function: igniter + + - pin: F12 + function: igniter + + - pin: F13 + function: igniter + + - pin: F14 + function: igniter + + - pin: F15 + function: power GND + type: gnd + + - pin: F16 + function: igniter + + - pin: F17 + function: igniter + + - pin: F18 + function: igniter + + - pin: F19 + function: igniter + + - pin: F20 + function: igniter + + - pin: F21 + function: igniter + +info: + image: + file: main.jpg + pins: + - pin: A1 + x: 293 + y: 657 + - pin: A2 + x: 454 + y: 657 + - pin: A3 + x: 615 + y: 657 + - pin: A4 + x: 776 + y: 657 + - pin: A5 + x: 293 + y: 520 + - pin: A6 + x: 454 + y: 520 + - pin: A7 + x: 615 + y: 520 + - pin: A8 + x: 776 + y: 520 + - pin: B1 + x: 293 + y: 257 + - pin: B2 + x: 454 + y: 257 + - pin: B3 + x: 615 + y: 257 + - pin: B4 + x: 776 + y: 257 + - pin: C11 + x: 1021 + y: 572 + - pin: C12 + x: 1086 + y: 572 + - pin: C13 + x: 1152 + y: 572 + - pin: C21 + x: 1021 + y: 342 + - pin: C22 + x: 1086 + y: 342 + - pin: C23 + x: 1151 + y: 342 + - pin: C24 + x: 1216 + y: 342 + - pin: C25 + x: 1281 + y: 342 + - pin: C26 + x: 1346 + y: 342 + - pin: C27 + x: 1411 + y: 342 + - pin: C28 + x: 1476 + y: 342 + - pin: C29 + x: 1541 + y: 342 + - pin: C30 + x: 1606 + y: 342 + - pin: C31 + x: 1021 + y: 265 + - pin: C32 + x: 1086 + y: 265 + - pin: C33 + x: 1151 + y: 265 + - pin: C34 + x: 1216 + y: 265 + - pin: C35 + x: 1281 + y: 265 + - pin: C36 + x: 1346 + y: 265 + - pin: C37 + x: 1411 + y: 265 + - pin: C38 + x: 1476 + y: 265 + - pin: C39 + x: 1541 + y: 265 + - pin: C40 + x: 1606 + y: 265 + - pin: D1 + x: 1794 + y: 647 + - pin: D2 + x: 1859 + y: 647 + - pin: D3 + x: 1924 + y: 647 + - pin: D4 + x: 1989 + y: 647 + - pin: D5 + x: 2054 + y: 647 + - pin: D6 + x: 2119 + y: 647 + - pin: D7 + x: 1794 + y: 572 + - pin: D8 + x: 1859 + y: 572 + - pin: D9 + x: 1924 + y: 572 + - pin: D10 + x: 1989 + y: 572 + - pin: D11 + x: 2054 + y: 572 + - pin: D12 + x: 2119 + y: 572 + - pin: D13 + x: 1794 + y: 342 + - pin: D14 + x: 1859 + y: 342 + - pin: D15 + x: 1924 + y: 342 + - pin: D16 + x: 1989 + y: 342 + - pin: D17 + x: 2054 + y: 342 + - pin: D18 + x: 2119 + y: 342 + - pin: D19 + x: 1794 + y: 265 + - pin: D20 + x: 1859 + y: 265 + - pin: D21 + x: 1924 + y: 265 + - pin: D22 + x: 1989 + y: 265 + - pin: D23 + x: 2054 + y: 265 + - pin: D24 + x: 2119 + y: 265 + - pin: E1 + x: 2307 + y: 647 + - pin: E2 + x: 2372 + y: 647 + - pin: E3 + x: 2437 + y: 647 + - pin: E4 + x: 2502 + y: 647 + - pin: E5 + x: 2567 + y: 647 + - pin: E6 + x: 2632 + y: 647 + - pin: E7 + x: 2697 + y: 647 + - pin: E8 + x: 2762 + y: 647 + - pin: E9 + x: 2827 + y: 647 + - pin: E10 + x: 2892 + y: 647 + - pin: E11 + x: 2957 + y: 647 + - pin: E12 + x: 3022 + y: 647 + - pin: E13 + x: 2307 + y: 572 + - pin: E14 + x: 2372 + y: 572 + - pin: E15 + x: 2437 + y: 572 + - pin: E16 + x: 2502 + y: 572 + - pin: E17 + x: 2567 + y: 572 + - pin: E18 + x: 2632 + y: 572 + - pin: E19 + x: 2697 + y: 572 + - pin: E20 + x: 2762 + y: 572 + - pin: E21 + x: 2827 + y: 572 + - pin: E22 + x: 2892 + y: 572 + - pin: E23 + x: 2957 + y: 572 + - pin: E24 + x: 3022 + y: 572 + - pin: E25 + x: 2307 + y: 342 + - pin: E26 + x: 2372 + y: 342 + - pin: E27 + x: 2437 + y: 342 + - pin: E28 + x: 2502 + y: 342 + - pin: E29 + x: 2567 + y: 342 + - pin: E30 + x: 2632 + y: 342 + - pin: E31 + x: 2697 + y: 342 + - pin: E32 + x: 2762 + y: 342 + - pin: E33 + x: 2827 + y: 342 + - pin: E34 + x: 2892 + y: 342 + - pin: E35 + x: 2957 + y: 342 + - pin: E36 + x: 3022 + y: 342 + - pin: E37 + x: 2307 + y: 265 + - pin: E38 + x: 2372 + y: 265 + - pin: E39 + x: 2437 + y: 265 + - pin: E40 + x: 2502 + y: 265 + - pin: E41 + x: 2567 + y: 265 + - pin: E42 + x: 2632 + y: 265 + - pin: E43 + x: 2697 + y: 265 + - pin: E44 + x: 2762 + y: 265 + - pin: E45 + x: 2827 + y: 265 + - pin: E46 + x: 2892 + y: 265 + - pin: E47 + x: 2957 + y: 265 + - pin: E48 + x: 3022 + y: 265 + - pin: F1 + x: 3275 + y: 657 + - pin: F2 + x: 3405 + y: 657 + - pin: F3 + x: 3535 + y: 657 + - pin: F4 + x: 3665 + y: 657 + - pin: F5 + x: 3795 + y: 657 + - pin: F6 + x: 3925 + y: 657 + - pin: F7 + x: 4055 + y: 657 + - pin: F8 + x: 3275 + y: 515 + - pin: F9 + x: 3405 + y: 515 + - pin: F10 + x: 3535 + y: 515 + - pin: F11 + x: 3665 + y: 515 + - pin: F12 + x: 3795 + y: 515 + - pin: F13 + x: 3925 + y: 515 + - pin: F14 + x: 4055 + y: 515 + - pin: F15 + x: 3275 + y: 320 + - pin: F16 + x: 3405 + y: 320 + - pin: F17 + x: 3535 + y: 320 + - pin: F18 + x: 3665 + y: 320 + - pin: F19 + x: 3795 + y: 320 + - pin: F20 + x: 3925 + y: 320 + - pin: F21 + x: 4055 + y: 320 diff --git a/firmware/config/boards/hellen/hellen72/connectors/main.jpg b/firmware/config/boards/hellen/hellen72/connectors/main.jpg new file mode 100644 index 0000000000..bb5a0528ff Binary files /dev/null and b/firmware/config/boards/hellen/hellen72/connectors/main.jpg differ diff --git a/firmware/config/boards/hellen/hellen72/connectors/main.yaml b/firmware/config/boards/hellen/hellen72/connectors/main.yaml index de696d4330..4cb5a01a41 100644 --- a/firmware/config/boards/hellen/hellen72/connectors/main.yaml +++ b/firmware/config/boards/hellen/hellen72/connectors/main.yaml @@ -427,3 +427,223 @@ pins: - 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 diff --git a/firmware/config/boards/proteus/connectors/black23.jpg b/firmware/config/boards/proteus/connectors/black23.jpg new file mode 100644 index 0000000000..32b24610a3 Binary files /dev/null and b/firmware/config/boards/proteus/connectors/black23.jpg differ diff --git a/firmware/config/boards/proteus/connectors/black23.yaml b/firmware/config/boards/proteus/connectors/black23.yaml index 7c80057ba3..787a872e1d 100644 --- a/firmware/config/boards/proteus/connectors/black23.yaml +++ b/firmware/config/boards/proteus/connectors/black23.yaml @@ -114,5 +114,85 @@ pins: function: Reserved For Future Use - pin: 23 - function: Power supply from main relay. Connect this pin to the output of the car's main relay that also powers injectors, coils, etc. Supplies power to electronic throttle drivers and high side outputs.### + function: Power supply from main relay. Connect this pin to the output of the car's main relay that also powers injectors, coils, etc. Supplies power to electronic throttle drivers and high side outputs. type: 12v + +info: + image: + file: black23.jpg + pins: + - pin: 1 + x: 239 + y: 312 + - pin: 2 + x: 343 + y: 312 + - pin: 3 + x: 447 + y: 312 + - pin: 4 + x: 551 + y: 312 + - pin: 5 + x: 655 + y: 312 + - pin: 6 + x: 759 + y: 312 + - pin: 7 + x: 863 + y: 312 + - pin: 8 + x: 967 + y: 312 + - pin: 9 + x: 291 + y: 412 + - pin: 10 + x: 395 + y: 412 + - pin: 11 + x: 499 + y: 412 + - pin: 12 + x: 603 + y: 412 + - pin: 13 + x: 707 + y: 412 + - pin: 14 + x: 811 + y: 412 + - pin: 15 + x: 915 + y: 412 + - pin: 16 + x: 239 + y: 512 + - pin: 17 + x: 343 + y: 512 + - pin: 18 + x: 447 + y: 512 + - pin: 19 + x: 551 + y: 512 + - pin: 20 + x: 655 + y: 512 + - pin: 21 + x: 759 + y: 512 + - pin: 22 + x: 863 + y: 512 + - pin: 23 + x: 967 + y: 512 + + + + + + diff --git a/firmware/config/boards/proteus/connectors/black35.jpg b/firmware/config/boards/proteus/connectors/black35.jpg new file mode 100644 index 0000000000..43cb4e8c38 Binary files /dev/null and b/firmware/config/boards/proteus/connectors/black35.jpg differ diff --git a/firmware/config/boards/proteus/connectors/black35.yaml b/firmware/config/boards/proteus/connectors/black35.yaml index 84a6b744d6..331dc37c37 100644 --- a/firmware/config/boards/proteus/connectors/black35.yaml +++ b/firmware/config/boards/proteus/connectors/black35.yaml @@ -235,3 +235,112 @@ pins: ts_name: Ign 1 type: hl +info: + image: + file: black35.jpg + pins: + - pin: 1 + x: 294 + y: 300 + - pin: 2 + x: 398 + y: 300 + - pin: 3 + x: 502 + y: 300 + - pin: 4 + x: 606 + y: 300 + - pin: 5 + x: 710 + y: 300 + - pin: 6 + x: 814 + y: 300 + - pin: 7 + x: 918 + y: 300 + - pin: 8 + x: 1022 + y: 300 + - pin: 9 + x: 1126 + y: 300 + - pin: 10 + x: 1230 + y: 300 + - pin: 11 + x: 1334 + y: 300 + - pin: 12 + x: 1438 + y: 300 + - pin: 13 + x: 346 + y: 405 + - pin: 14 + x: 450 + y: 405 + - pin: 15 + x: 554 + y: 405 + - pin: 16 + x: 658 + y: 405 + - pin: 17 + x: 762 + y: 405 + - pin: 18 + x: 866 + y: 405 + - pin: 19 + x: 970 + y: 405 + - pin: 20 + x: 1074 + y: 405 + - pin: 21 + x: 1178 + y: 405 + - pin: 22 + x: 1282 + y: 405 + - pin: 23 + x: 1386 + y: 405 + - pin: 24 + x: 294 + y: 510 + - pin: 25 + x: 398 + y: 510 + - pin: 26 + x: 502 + y: 510 + - pin: 27 + x: 606 + y: 510 + - pin: 28 + x: 710 + y: 510 + - pin: 29 + x: 814 + y: 510 + - pin: 30 + x: 918 + y: 510 + - pin: 31 + x: 1022 + y: 510 + - pin: 32 + x: 1126 + y: 510 + - pin: 33 + x: 1230 + y: 510 + - pin: 34 + x: 1334 + y: 510 + - pin: 35 + x: 1438 + y: 510 diff --git a/firmware/config/boards/proteus/connectors/white35.jpg b/firmware/config/boards/proteus/connectors/white35.jpg new file mode 100644 index 0000000000..b2a68d984e Binary files /dev/null and b/firmware/config/boards/proteus/connectors/white35.jpg differ diff --git a/firmware/config/boards/proteus/connectors/white35.yaml b/firmware/config/boards/proteus/connectors/white35.yaml index e215254b80..b0dec32bf4 100644 --- a/firmware/config/boards/proteus/connectors/white35.yaml +++ b/firmware/config/boards/proteus/connectors/white35.yaml @@ -181,3 +181,114 @@ pins: - pin: 35 function: Knock input 2 on 0.4 + +info: + image: + file: white35.jpg + pins: + - pin: 1 + x: 216 + y: 288 + - pin: 2 + x: 320 + y: 288 + - pin: 3 + x: 424 + y: 288 + - pin: 4 + x: 528 + y: 288 + - pin: 5 + x: 632 + y: 288 + - pin: 6 + x: 736 + y: 288 + - pin: 7 + x: 840 + y: 288 + - pin: 8 + x: 944 + y: 288 + - pin: 9 + x: 1048 + y: 288 + - pin: 10 + x: 1152 + y: 288 + - pin: 11 + x: 1256 + y: 288 + - pin: 12 + x: 1360 + y: 288 + - pin: 13 + x: 268 + y: 392 + - pin: 14 + x: 372 + y: 392 + - pin: 15 + x: 476 + y: 392 + - pin: 16 + x: 580 + y: 392 + - pin: 17 + x: 684 + y: 392 + - pin: 18 + x: 788 + y: 392 + - pin: 19 + x: 892 + y: 392 + - pin: 20 + x: 996 + y: 392 + - pin: 21 + x: 1100 + y: 392 + - pin: 22 + x: 1204 + y: 392 + - pin: 23 + x: 1308 + y: 392 + - pin: 24 + x: 216 + y: 496 + - pin: 25 + x: 320 + y: 496 + - pin: 26 + x: 424 + y: 496 + - pin: 27 + x: 528 + y: 496 + - pin: 28 + x: 632 + y: 496 + - pin: 29 + x: 736 + y: 496 + - pin: 30 + x: 840 + y: 496 + - pin: 31 + x: 944 + y: 496 + - pin: 32 + x: 1048 + y: 496 + - pin: 33 + x: 1152 + y: 496 + - pin: 34 + x: 1256 + y: 496 + - pin: 35 + x: 1360 + y: 496 + diff --git a/misc/jenkins/generate_doxygen/gen_upload_docs.sh b/misc/jenkins/generate_doxygen/gen_upload_docs.sh index c23acbc518..f2cc17e123 100644 --- a/misc/jenkins/generate_doxygen/gen_upload_docs.sh +++ b/misc/jenkins/generate_doxygen/gen_upload_docs.sh @@ -23,3 +23,27 @@ if [ -n "$RUSEFI_FTP_SERVER" ]; then ncftpput -R -v -u "$RUSEFI_DOXYGEN_FTP_USER" -p "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER" /html html/ fi [ $? -eq 0 ] || { echo "upload FAILED"; exit 1; } + +# I should make this automatic, but that would require reading the image file from the yaml, which I don't feel like doing right now +cd .. +mkdir pinouts +mkdir pinouts/proteus +bash misc/pinout-gen/gen.sh firmware/config/boards/proteus/black23.yaml > pinouts/proteus/black23.html +cp firmware/config/boards/proteus/connectors/black23.jpg pinouts/proteus/black23.jpg +bash misc/pinout-gen/gen.sh firmware/config/boards/proteus/black35.yaml > pinouts/proteus/black35.html +cp firmware/config/boards/proteus/connectors/black35.jpg pinouts/proteus/black35.jpg +bash misc/pinout-gen/gen.sh firmware/config/boards/proteus/white35.yaml > pinouts/proteus/white35.html +cp firmware/config/boards/proteus/connectors/black35.jpg pinouts/proteus/white35.jpg +mkdir pinouts/hellen +mkdir pinouts/hellen/hellen72 +bash misc/pinout-gen/gen.sh firmware/config/boards/hellen/hellen72/main.yaml > pinouts/hellen/hellen72/main.html +cp firmware/config/boards/hellen/hellen72/connectors/main.jpg pinouts/hellen/hellen72/main.jpg +mkdir pinouts/hellen/hellen128 +bash misc/pinout-gen/gen.sh firmware/config/boards/hellen/hellen128/main.yaml > pinouts/hellen/hellen128/main.html +cp firmware/config/boards/hellen/hellen128/connectors/main.jpg pinouts/hellen/hellen128/main.jpg + +if [ -n "$RUSEFI_FTP_SERVER" ]; then + echo "Uploading Pinouts" + ncftpput -R -v -u "$RUSEFI_DOXYGEN_FTP_USER" -p "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER" /pinouts pinouts/ +fi +[ $? -eq 0 ] || { echo "upload FAILED"; exit 1; } diff --git a/misc/pinout-gen/gen.sh b/misc/pinout-gen/gen.sh new file mode 100644 index 0000000000..cb930aaad2 --- /dev/null +++ b/misc/pinout-gen/gen.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P)"/" +sed -e "/###CSS###/{r ${DIR}style.css" -e 'd}' -e "/###JS###/{r ${DIR}script.js" -e 'd}' ${DIR}pinout.html | sed -e "/###DATA###/{r $1" -e 'd}' diff --git a/misc/pinout-gen/pinout.html b/misc/pinout-gen/pinout.html new file mode 100644 index 0000000000..c1d1c40d3d --- /dev/null +++ b/misc/pinout-gen/pinout.html @@ -0,0 +1,70 @@ + + + + + + + + + + + + +
+
+ +
+
+ + + + + + + + + + + + + + + +
Pin NumberFirmware IDTypeTypical FunctionPigtail Color
+ +
+
+
+
+ +

Full Pinout Table

+ + + + + + + + + + + + +
Pin NumberFirmware IDTypeTypical FunctionPigtail Color
+ + + diff --git a/misc/pinout-gen/script.js b/misc/pinout-gen/script.js new file mode 100644 index 0000000000..d1c0316097 --- /dev/null +++ b/misc/pinout-gen/script.js @@ -0,0 +1,95 @@ +var connectorYaml = ` +###DATA### +`; + +function addRow(table, info) { + var template = document.getElementById("table-template"); + var clone = template.content.cloneNode(true); + 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 = info.pin; + idata.textContent = info.id; + tdata.textContent = info.type + fdata.textContent = info.function; + cdata.textContent = info.color + table.appendChild(clone); +} + +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"; + } +} + +window.addEventListener('load', function() { + var connector = YAML.parse(connectorYaml); + document.getElementById("connector-img").addEventListener('load', function() { + adjustMarkers(); + }); + document.getElementById("connector-img").src = connector.info.image.file; + + for (var i = 0; i < connector.pins.length; i++) { + var pin = connector.pins[i]; + 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.style.top = ((pinfo.y / imgHeight) * 100) + "%"; + pdiv.style.left = ((pinfo.x / imgWidth) * 100) + "%"; + pdiv.dataset.type = pin.type; + pdiv.addEventListener("click", function(pin, div) { + 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}); + } + } else { + addRow(table, pin); + } + 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"); + } + div.classList.add("selected"); + }.bind(null, pin, pdiv)); + cdiv.appendChild(pdiv); + } + + for (var i = 0; i < connector.pins.length; i++) { + var table = document.getElementById("pinout-table").querySelector("tbody"); + addRow(table, connector.pins[i]); + } +}); + +window.addEventListener('resize', function() { + adjustMarkers(); +}); diff --git a/misc/pinout-gen/style.css b/misc/pinout-gen/style.css new file mode 100644 index 0000000000..2d78d07317 --- /dev/null +++ b/misc/pinout-gen/style.css @@ -0,0 +1,98 @@ +.pin-marker { + position: absolute; + z-index: 1; + border-radius: 50%; + background-color: white; + border: 2px blue solid; +} + +.pin-marker:hover { + background-color: #f15a24; +} + +.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 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; + } +} + diff --git a/misc/pinout-gen/yaml.min.js b/misc/pinout-gen/yaml.min.js new file mode 100644 index 0000000000..8b9c5833ec --- /dev/null +++ b/misc/pinout-gen/yaml.min.js @@ -0,0 +1 @@ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;iref;i=0<=ref?++j:--j){mapping[Escaper.LIST_ESCAPEES[i]]=Escaper.LIST_ESCAPED[i]}return mapping}();Escaper.PATTERN_CHARACTERS_TO_ESCAPE=new Pattern("[\\x00-\\x1f]|…| |
|
");Escaper.PATTERN_MAPPING_ESCAPEES=new Pattern(Escaper.LIST_ESCAPEES.join("|").split("\\").join("\\\\"));Escaper.PATTERN_SINGLE_QUOTING=new Pattern("[\\s'\":{}[\\],&*#?]|^[-?|<>=!%@`]");Escaper.requiresDoubleQuoting=function(value){return this.PATTERN_CHARACTERS_TO_ESCAPE.test(value)};Escaper.escapeWithDoubleQuotes=function(value){var result;result=this.PATTERN_MAPPING_ESCAPEES.replace(value,function(_this){return function(str){return _this.MAPPING_ESCAPEES_TO_ESCAPED[str]}}(this));return'"'+result+'"'};Escaper.requiresSingleQuoting=function(value){return this.PATTERN_SINGLE_QUOTING.test(value)};Escaper.escapeWithSingleQuotes=function(value){return"'"+value.replace(/'/g,"''")+"'"};return Escaper}();module.exports=Escaper},{"./Pattern":8}],3:[function(require,module,exports){var DumpException,extend=function(child,parent){for(var key in parent){if(hasProp.call(parent,key))child[key]=parent[key]}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child},hasProp={}.hasOwnProperty;DumpException=function(superClass){extend(DumpException,superClass);function DumpException(message,parsedLine,snippet){DumpException.__super__.constructor.call(this,message);this.message=message;this.parsedLine=parsedLine;this.snippet=snippet}DumpException.prototype.toString=function(){if(this.parsedLine!=null&&this.snippet!=null){return" "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')"}else{return" "+this.message}};return DumpException}(Error);module.exports=DumpException},{}],4:[function(require,module,exports){var ParseException,extend=function(child,parent){for(var key in parent){if(hasProp.call(parent,key))child[key]=parent[key]}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child},hasProp={}.hasOwnProperty;ParseException=function(superClass){extend(ParseException,superClass);function ParseException(message,parsedLine,snippet){ParseException.__super__.constructor.call(this,message);this.message=message;this.parsedLine=parsedLine;this.snippet=snippet}ParseException.prototype.toString=function(){if(this.parsedLine!=null&&this.snippet!=null){return" "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')"}else{return" "+this.message}};return ParseException}(Error);module.exports=ParseException},{}],5:[function(require,module,exports){var ParseMore,extend=function(child,parent){for(var key in parent){if(hasProp.call(parent,key))child[key]=parent[key]}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child},hasProp={}.hasOwnProperty;ParseMore=function(superClass){extend(ParseMore,superClass);function ParseMore(message,parsedLine,snippet){ParseMore.__super__.constructor.call(this,message);this.message=message;this.parsedLine=parsedLine;this.snippet=snippet}ParseMore.prototype.toString=function(){if(this.parsedLine!=null&&this.snippet!=null){return" "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')"}else{return" "+this.message}};return ParseMore}(Error);module.exports=ParseMore},{}],6:[function(require,module,exports){var DumpException,Escaper,Inline,ParseException,ParseMore,Pattern,Unescaper,Utils,indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i=0){output=this.parseQuotedScalar(scalar,context);i=context.i;if(delimiters!=null){tmp=Utils.ltrim(scalar.slice(i)," ");if(!(ref1=tmp.charAt(0),indexOf.call(delimiters,ref1)>=0)){throw new ParseException("Unexpected characters ("+scalar.slice(i)+").")}}}else{if(!delimiters){output=scalar.slice(i);i+=output.length;strpos=output.indexOf(" #");if(strpos!==-1){output=Utils.rtrim(output.slice(0,strpos))}}else{joinedDelimiters=delimiters.join("|");pattern=this.PATTERN_SCALAR_BY_DELIMITERS[joinedDelimiters];if(pattern==null){pattern=new Pattern("^(.+?)("+joinedDelimiters+")");this.PATTERN_SCALAR_BY_DELIMITERS[joinedDelimiters]=pattern}if(match=pattern.exec(scalar.slice(i))){output=match[1];i+=output.length}else{throw new ParseException("Malformed inline YAML string ("+scalar+").")}}if(evaluate){output=this.evaluateScalar(output,context)}}context.i=i;return output};Inline.parseQuotedScalar=function(scalar,context){var i,match,output;i=context.i;if(!(match=this.PATTERN_QUOTED_SCALAR.exec(scalar.slice(i)))){throw new ParseMore("Malformed inline YAML string ("+scalar.slice(i)+").")}output=match[0].substr(1,match[0].length-2);if('"'===scalar.charAt(i)){output=Unescaper.unescapeDoubleQuotedString(output)}else{output=Unescaper.unescapeSingleQuotedString(output)}i+=match[0].length;context.i=i;return output};Inline.parseSequence=function(sequence,context){var e,error,i,isQuoted,len,output,ref,value;output=[];len=sequence.length;i=context.i;i+=1;while(i0)){subValue=null}return objectDecoder(trimmedScalar.slice(0,firstSpace),subValue)}}if(exceptionOnInvalidType){throw new ParseException("Custom object support when parsing a YAML file has been disabled.")}return null}break;case"0":if("0x"===scalar.slice(0,2)){return Utils.hexDec(scalar)}else if(Utils.isDigits(scalar)){return Utils.octDec(scalar)}else if(Utils.isNumeric(scalar)){return parseFloat(scalar)}else{return scalar}break;case"+":if(Utils.isDigits(scalar)){raw=scalar;cast=parseInt(raw);if(raw===String(cast)){return cast}else{return raw}}else if(Utils.isNumeric(scalar)){return parseFloat(scalar)}else if(this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(scalar)){return parseFloat(scalar.replace(",",""))}return scalar;case"-":if(Utils.isDigits(scalar.slice(1))){if("0"===scalar.charAt(1)){return-Utils.octDec(scalar.slice(1))}else{raw=scalar.slice(1);cast=parseInt(raw);if(raw===String(cast)){return-cast}else{return-raw}}}else if(Utils.isNumeric(scalar)){return parseFloat(scalar)}else if(this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(scalar)){return parseFloat(scalar.replace(",",""))}return scalar;default:if(date=Utils.stringToDate(scalar)){return date}else if(Utils.isNumeric(scalar)){return parseFloat(scalar)}else if(this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(scalar)){return parseFloat(scalar.replace(",",""))}return scalar}}};return Inline}();module.exports=Inline},{"./Escaper":2,"./Exception/DumpException":3,"./Exception/ParseException":4,"./Exception/ParseMore":5,"./Pattern":8,"./Unescaper":9,"./Utils":10}],7:[function(require,module,exports){var Inline,ParseException,ParseMore,Parser,Pattern,Utils;Inline=require("./Inline");Pattern=require("./Pattern");Utils=require("./Utils");ParseException=require("./Exception/ParseException");ParseMore=require("./Exception/ParseMore");Parser=function(){Parser.prototype.PATTERN_FOLDED_SCALAR_ALL=new Pattern("^(?:(?![^\\|>]*)\\s+)?(?\\||>)(?\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(? +#.*)?$");Parser.prototype.PATTERN_FOLDED_SCALAR_END=new Pattern("(?\\||>)(?\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(? +#.*)?$");Parser.prototype.PATTERN_SEQUENCE_ITEM=new Pattern("^\\-((?\\s+)(?.+?))?\\s*$");Parser.prototype.PATTERN_ANCHOR_VALUE=new Pattern("^&(?[^ ]+) *(?.*)");Parser.prototype.PATTERN_COMPACT_NOTATION=new Pattern("^(?"+Inline.REGEX_QUOTED_STRING+"|[^ '\"\\{\\[].*?) *\\:(\\s+(?.+?))?\\s*$");Parser.prototype.PATTERN_MAPPING_ITEM=new Pattern("^(?"+Inline.REGEX_QUOTED_STRING+"|[^ '\"\\[\\{].*?) *\\:(\\s+(?.+?))?\\s*$");Parser.prototype.PATTERN_DECIMAL=new Pattern("\\d+");Parser.prototype.PATTERN_INDENT_SPACES=new Pattern("^ +");Parser.prototype.PATTERN_TRAILING_LINES=new Pattern("(\n*)$");Parser.prototype.PATTERN_YAML_HEADER=new Pattern("^\\%YAML[: ][\\d\\.]+.*\n","m");Parser.prototype.PATTERN_LEADING_COMMENTS=new Pattern("^(\\#.*?\n)+","m");Parser.prototype.PATTERN_DOCUMENT_MARKER_START=new Pattern("^\\-\\-\\-.*?\n","m");Parser.prototype.PATTERN_DOCUMENT_MARKER_END=new Pattern("^\\.\\.\\.\\s*$","m");Parser.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION={};Parser.prototype.CONTEXT_NONE=0;Parser.prototype.CONTEXT_SEQUENCE=1;Parser.prototype.CONTEXT_MAPPING=2;function Parser(offset){this.offset=offset!=null?offset:0;this.lines=[];this.currentLineNb=-1;this.currentLine="";this.refs={}}Parser.prototype.parse=function(value,exceptionOnInvalidType,objectDecoder){var alias,allowOverwrite,block,c,context,data,e,error,error1,error2,first,i,indent,isRef,j,k,key,l,lastKey,len,len1,len2,len3,lineCount,m,matches,mergeNode,n,name,parsed,parsedItem,parser,ref,ref1,ref2,refName,refValue,val,values;if(exceptionOnInvalidType==null){exceptionOnInvalidType=false}if(objectDecoder==null){objectDecoder=null}this.currentLineNb=-1;this.currentLine="";this.lines=this.cleanup(value).split("\n");data=null;context=this.CONTEXT_NONE;allowOverwrite=false;while(this.moveToNextLine()){if(this.isCurrentLineEmpty()){continue}if("\t"===this.currentLine[0]){throw new ParseException("A YAML file cannot contain tabs as indentation.",this.getRealCurrentLineNb()+1,this.currentLine)}isRef=mergeNode=false;if(values=this.PATTERN_SEQUENCE_ITEM.exec(this.currentLine)){if(this.CONTEXT_MAPPING===context){throw new ParseException("You cannot define a sequence item when in a mapping")}context=this.CONTEXT_SEQUENCE;if(data==null){data=[]}if(values.value!=null&&(matches=this.PATTERN_ANCHOR_VALUE.exec(values.value))){isRef=matches.ref;values.value=matches.value}if(!(values.value!=null)||""===Utils.trim(values.value," ")||Utils.ltrim(values.value," ").indexOf("#")===0){if(this.currentLineNb=newIndent){data.push(this.currentLine.slice(newIndent))}else if(Utils.ltrim(this.currentLine).charAt(0)==="#"){}else if(0===indent){this.moveToPreviousLine();break}else{throw new ParseException("Indentation problem.",this.getRealCurrentLineNb()+1,this.currentLine)}}return data.join("\n")};Parser.prototype.moveToNextLine=function(){if(this.currentLineNb>=this.lines.length-1){return false}this.currentLine=this.lines[++this.currentLineNb];return true};Parser.prototype.moveToPreviousLine=function(){this.currentLine=this.lines[--this.currentLineNb]};Parser.prototype.parseValue=function(value,exceptionOnInvalidType,objectDecoder){var e,error,foldedIndent,matches,modifiers,pos,ref,ref1,val;if(0===value.indexOf("*")){pos=value.indexOf("#");if(pos!==-1){value=value.substr(1,pos-2)}else{value=value.slice(1)}if(this.refs[value]===void 0){throw new ParseException('Reference "'+value+'" does not exist.',this.currentLine)}return this.refs[value]}if(matches=this.PATTERN_FOLDED_SCALAR_ALL.exec(value)){modifiers=(ref=matches.modifiers)!=null?ref:"";foldedIndent=Math.abs(parseInt(modifiers));if(isNaN(foldedIndent)){foldedIndent=0}val=this.parseFoldedScalar(matches.separator,this.PATTERN_DECIMAL.replace(modifiers,""),foldedIndent);if(matches.type!=null){Inline.configure(exceptionOnInvalidType,objectDecoder);return Inline.parseScalar(matches.type+" "+val)}else{return val}}if((ref1=value.charAt(0))==="["||ref1==="{"||ref1==='"'||ref1==="'"){while(true){try{return Inline.parse(value,exceptionOnInvalidType,objectDecoder)}catch(error){e=error;if(e instanceof ParseMore&&this.moveToNextLine()){value+="\n"+Utils.trim(this.currentLine," ")}else{e.parsedLine=this.getRealCurrentLineNb()+1;e.snippet=this.currentLine;throw e}}}}else{if(this.isNextLineIndented()){value+="\n"+this.getNextEmbedBlock()}return Inline.parse(value,exceptionOnInvalidType,objectDecoder)}};Parser.prototype.parseFoldedScalar=function(separator,indicator,indentation){var isCurrentLineBlank,j,len,line,matches,newText,notEOF,pattern,ref,text;if(indicator==null){indicator=""}if(indentation==null){indentation=0}notEOF=this.moveToNextLine();if(!notEOF){return""}isCurrentLineBlank=this.isCurrentLineBlank();text="";while(notEOF&&isCurrentLineBlank){if(notEOF=this.moveToNextLine()){text+="\n";isCurrentLineBlank=this.isCurrentLineBlank()}}if(0===indentation){if(matches=this.PATTERN_INDENT_SPACES.exec(this.currentLine)){indentation=matches[0].length}}if(indentation>0){pattern=this.PATTERN_FOLDED_SCALAR_BY_INDENTATION[indentation];if(pattern==null){pattern=new Pattern("^ {"+indentation+"}(.*)$");Parser.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION[indentation]=pattern}while(notEOF&&(isCurrentLineBlank||(matches=pattern.exec(this.currentLine)))){if(isCurrentLineBlank){text+=this.currentLine.slice(indentation)}else{text+=matches[1]}if(notEOF=this.moveToNextLine()){text+="\n";isCurrentLineBlank=this.isCurrentLineBlank()}}}else if(notEOF){text+="\n"}if(notEOF){this.moveToPreviousLine()}if(">"===separator){newText="";ref=text.split("\n");for(j=0,len=ref.length;jcurrentIndentation){ret=true}this.moveToPreviousLine();return ret};Parser.prototype.isCurrentLineEmpty=function(){var trimmedLine;trimmedLine=Utils.trim(this.currentLine," ");return trimmedLine.length===0||trimmedLine.charAt(0)==="#"};Parser.prototype.isCurrentLineBlank=function(){return""===Utils.trim(this.currentLine," ")};Parser.prototype.isCurrentLineComment=function(){var ltrimmedLine;ltrimmedLine=Utils.ltrim(this.currentLine," ");return ltrimmedLine.charAt(0)==="#"};Parser.prototype.cleanup=function(value){var count,i,indent,j,l,len,len1,line,lines,ref,ref1,ref2,smallestIndent,trimmedValue;if(value.indexOf("\r")!==-1){value=value.split("\r\n").join("\n").split("\r").join("\n")}count=0;ref=this.PATTERN_YAML_HEADER.replaceAll(value,""),value=ref[0],count=ref[1];this.offset+=count;ref1=this.PATTERN_LEADING_COMMENTS.replaceAll(value,"",1),trimmedValue=ref1[0],count=ref1[1];if(count===1){this.offset+=Utils.subStrCount(value,"\n")-Utils.subStrCount(trimmedValue,"\n");value=trimmedValue}ref2=this.PATTERN_DOCUMENT_MARKER_START.replaceAll(value,"",1),trimmedValue=ref2[0],count=ref2[1];if(count===1){this.offset+=Utils.subStrCount(value,"\n")-Utils.subStrCount(trimmedValue,"\n");value=trimmedValue;value=this.PATTERN_DOCUMENT_MARKER_END.replace(value,"")}lines=value.split("\n");smallestIndent=-1;for(j=0,len=lines.length;j0){for(i=l=0,len1=lines.length;l"){cleanedRegex+="(";i++;if(name.length>0){if(mapping==null){mapping={}}mapping[name]=capturingBracketNumber}break}else{name+=subChar}i++}}else{cleanedRegex+=_char;capturingBracketNumber++}}else{cleanedRegex+=_char}}else{cleanedRegex+=_char}i++}this.rawRegex=rawRegex;this.cleanedRegex=cleanedRegex;this.regex=new RegExp(this.cleanedRegex,"g"+modifiers.replace("g",""));this.mapping=mapping}Pattern.prototype.exec=function(str){var index,matches,name,ref;this.regex.lastIndex=0;matches=this.regex.exec(str);if(matches==null){return null}if(this.mapping!=null){ref=this.mapping;for(name in ref){index=ref[name];matches[name]=matches[index]}}return matches};Pattern.prototype.test=function(str){this.regex.lastIndex=0;return this.regex.test(str)};Pattern.prototype.replace=function(str,replacement){this.regex.lastIndex=0;return str.replace(this.regex,replacement)};Pattern.prototype.replaceAll=function(str,replacement,limit){var count;if(limit==null){limit=0}this.regex.lastIndex=0;count=0;while(this.regex.test(str)&&(limit===0||count[0-9][0-9][0-9][0-9])"+"-(?[0-9][0-9]?)"+"-(?[0-9][0-9]?)"+"(?:(?:[Tt]|[ \t]+)"+"(?[0-9][0-9]?)"+":(?[0-9][0-9])"+":(?[0-9][0-9])"+"(?:.(?[0-9]*))?"+"(?:[ \t]*(?Z|(?[-+])(?[0-9][0-9]?)"+"(?::(?[0-9][0-9]))?))?)?"+"$","i");Utils.LOCAL_TIMEZONE_OFFSET=(new Date).getTimezoneOffset()*60*1e3;Utils.trim=function(str,_char){var regexLeft,regexRight;if(_char==null){_char="\\s"}regexLeft=this.REGEX_LEFT_TRIM_BY_CHAR[_char];if(regexLeft==null){this.REGEX_LEFT_TRIM_BY_CHAR[_char]=regexLeft=new RegExp("^"+_char+""+_char+"*")}regexLeft.lastIndex=0;regexRight=this.REGEX_RIGHT_TRIM_BY_CHAR[_char];if(regexRight==null){this.REGEX_RIGHT_TRIM_BY_CHAR[_char]=regexRight=new RegExp(_char+""+_char+"*$")}regexRight.lastIndex=0;return str.replace(regexLeft,"").replace(regexRight,"")};Utils.ltrim=function(str,_char){var regexLeft;if(_char==null){_char="\\s"}regexLeft=this.REGEX_LEFT_TRIM_BY_CHAR[_char];if(regexLeft==null){this.REGEX_LEFT_TRIM_BY_CHAR[_char]=regexLeft=new RegExp("^"+_char+""+_char+"*")}regexLeft.lastIndex=0;return str.replace(regexLeft,"")};Utils.rtrim=function(str,_char){var regexRight;if(_char==null){_char="\\s"}regexRight=this.REGEX_RIGHT_TRIM_BY_CHAR[_char];if(regexRight==null){this.REGEX_RIGHT_TRIM_BY_CHAR[_char]=regexRight=new RegExp(_char+""+_char+"*$")}regexRight.lastIndex=0;return str.replace(regexRight,"")};Utils.isEmpty=function(value){return!value||value===""||value==="0"||value instanceof Array&&value.length===0||this.isEmptyObject(value)};Utils.isEmptyObject=function(value){var k;return value instanceof Object&&function(){var results;results=[];for(k in value){if(!hasProp.call(value,k))continue;results.push(k)}return results}().length===0};Utils.subStrCount=function(string,subString,start,length){var c,i,j,len,ref,sublen;c=0;string=""+string;subString=""+subString;if(start!=null){string=string.slice(start)}if(length!=null){string=string.slice(0,length)}len=string.length;sublen=subString.length;for(i=j=0,ref=len;0<=ref?jref;i=0<=ref?++j:--j){if(subString===string.slice(i,sublen)){c++;i+=sublen-1}}return c};Utils.isDigits=function(input){this.REGEX_DIGITS.lastIndex=0;return this.REGEX_DIGITS.test(input)};Utils.octDec=function(input){this.REGEX_OCTAL.lastIndex=0;return parseInt((input+"").replace(this.REGEX_OCTAL,""),8)};Utils.hexDec=function(input){this.REGEX_HEXADECIMAL.lastIndex=0;input=this.trim(input);if((input+"").slice(0,2)==="0x"){input=(input+"").slice(2)}return parseInt((input+"").replace(this.REGEX_HEXADECIMAL,""),16)};Utils.utf8chr=function(c){var ch;ch=String.fromCharCode;if(128>(c%=2097152)){return ch(c)}if(2048>c){return ch(192|c>>6)+ch(128|c&63)}if(65536>c){return ch(224|c>>12)+ch(128|c>>6&63)+ch(128|c&63)}return ch(240|c>>18)+ch(128|c>>12&63)+ch(128|c>>6&63)+ch(128|c&63)};Utils.parseBoolean=function(input,strict){var lowerInput;if(strict==null){strict=true}if(typeof input==="string"){lowerInput=input.toLowerCase();if(!strict){if(lowerInput==="no"){return false}}if(lowerInput==="0"){return false}if(lowerInput==="false"){return false}if(lowerInput===""){return false}return true}return!!input};Utils.isNumeric=function(input){this.REGEX_SPACES.lastIndex=0;return typeof input==="number"||typeof input==="string"&&!isNaN(input)&&input.replace(this.REGEX_SPACES,"")!==""};Utils.stringToDate=function(str){var date,day,fraction,hour,info,minute,month,second,tz_hour,tz_minute,tz_offset,year;if(!(str!=null?str.length:void 0)){return null}info=this.PATTERN_DATE.exec(str);if(!info){return null}year=parseInt(info.year,10);month=parseInt(info.month,10)-1;day=parseInt(info.day,10);if(info.hour==null){date=new Date(Date.UTC(year,month,day));return date}hour=parseInt(info.hour,10);minute=parseInt(info.minute,10);second=parseInt(info.second,10);if(info.fraction!=null){fraction=info.fraction.slice(0,3);while(fraction.length<3){fraction+="0"}fraction=parseInt(fraction,10)}else{fraction=0}if(info.tz!=null){tz_hour=parseInt(info.tz_hour,10);if(info.tz_minute!=null){tz_minute=parseInt(info.tz_minute,10)}else{tz_minute=0}tz_offset=(tz_hour*60+tz_minute)*6e4;if("-"===info.tz_sign){tz_offset*=-1}}date=new Date(Date.UTC(year,month,day,hour,minute,second,fraction));if(tz_offset){date.setTime(date.getTime()-tz_offset)}return date};Utils.strRepeat=function(str,number){var i,res;res="";i=0;while(i