From fef588a7d181052ce283bbf67b092d797e3856ce Mon Sep 17 00:00:00 2001 From: eddyem Date: Wed, 20 Nov 2019 17:43:51 +0300 Subject: [PATCH] start to fix errors. 1. Tadj added --- kicad/stm32/fp-info-cache | 983 ++++++--------------------------- src/netdaemon/checkfile.c | 127 +++++ src/netdaemon/checkfile.h | 39 ++ src/netdaemon/cmdlnopts.c | 8 +- src/netdaemon/cmdlnopts.h | 3 + src/netdaemon/gnuplot.c | 2 +- src/netdaemon/main.c | 76 ++- src/netdaemon/sens_place.c | 270 ++++++--- src/netdaemon/sens_place.h | 5 + src/netdaemon/socket.c | 25 +- src/netdaemon/tempadj.txt | 6 + src/netdaemon/term.c | 5 +- src/netdaemon/usefull_macros.c | 8 +- 13 files changed, 621 insertions(+), 936 deletions(-) create mode 100644 src/netdaemon/checkfile.c create mode 100644 src/netdaemon/checkfile.h create mode 100644 src/netdaemon/tempadj.txt diff --git a/kicad/stm32/fp-info-cache b/kicad/stm32/fp-info-cache index f549cd2..f86627a 100644 --- a/kicad/stm32/fp-info-cache +++ b/kicad/stm32/fp-info-cache @@ -1,841 +1,204 @@ -182832195481432 -Connector_Dsub -DSUB-9_Female_EdgeMount_P2.77mm -9-pin D-Sub connector, solder-cups edge-mounted, female, x-pin-pitch 2.77mm, distance of mounting holes 25mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -9-pin D-Sub connector edge mount solder cup female x-pin-pitch 2.77mm mounting holes distance 25mm +44519501844268 +Connector_USB +USB3_A_Molex_48393-001 +USB 3.0, type A, right angle (http://www.molex.com/pdm_docs/sd/483930003_sd.pdf) +USB 3.0 type A right angle 0 -9 -9 -Connector_Dsub -DSUB-9_Female_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm -9-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.54mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -9-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.54mm pin-PCB-offset 9.4mm -0 -9 -9 -Connector_Dsub -DSUB-9_Female_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset7.48mm -9-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 4.9399999999999995mm, distance of mounting holes 25mm, distance of mounting holes to PCB edge 7.4799999999999995mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -9-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 4.9399999999999995mm mounting-holes-distance 25mm mounting-hole-offset 25mm +13 +10 +Connector_USB +USB3_A_Plug_Wuerth_692112030100_Horizontal +USB type A Plug, Horizontal, http://katalog.we-online.de/em/datasheet/692112030100.pdf +usb A plug horizontal 0 11 10 -Connector_Dsub -DSUB-9_Female_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm -9-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 7.699999999999999mm, distance of mounting holes 25mm, distance of mounting holes to PCB edge 9.12mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -9-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 7.699999999999999mm mounting-holes-distance 25mm mounting-hole-offset 25mm +Connector_USB +USB_A_CNCTech_1001-011-01101_Horizontal +http://cnctech.us/pdfs/1001-011-01101.pdf +USB-A 0 -11 -10 -Connector_Dsub -DSUB-9_Female_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm -9-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -9-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 9.4mm +6 +5 +Connector_USB +USB_A_Wuerth_61400826021_Horizontal_Stacked +Stacked USB A connector http://katalog.we-online.de/em/datasheet/61400826021.pdf +Wuerth stacked USB_A 0 +12 9 -9 -Connector_Dsub -DSUB-9_Female_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm -9-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 9.9mm, distance of mounting holes 25mm, distance of mounting holes to PCB edge 11.32mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -9-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 9.9mm mounting-holes-distance 25mm mounting-hole-offset 25mm -0 -11 -10 -Connector_Dsub -DSUB-9_Female_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm -9-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 14.56mm, distance of mounting holes 25mm, distance of mounting holes to PCB edge 8.2mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -9-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 14.56mm mounting-holes-distance 25mm mounting-hole-offset 25mm -0 -11 -10 -Connector_Dsub -DSUB-9_Female_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm -9-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 14.56mm, distance of mounting holes 25mm, distance of mounting holes to PCB edge 15.979999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -9-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 14.56mm mounting-holes-distance 25mm mounting-hole-offset 25mm -0 -11 -10 -Connector_Dsub -DSUB-9_Female_Vertical_P2.77x2.84mm -9-pin D-Sub connector, straight/vertical, THT-mount, female, pitch 2.77x2.84mm, distance of mounting holes 25mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -9-pin D-Sub connector straight vertical THT female pitch 2.77x2.84mm mounting holes distance 25mm -0 -9 -9 -Connector_Dsub -DSUB-9_Female_Vertical_P2.77x2.84mm_MountingHoles -9-pin D-Sub connector, straight/vertical, THT-mount, female, pitch 2.77x2.84mm, distance of mounting holes 25mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -9-pin D-Sub connector straight vertical THT female pitch 2.77x2.84mm mounting holes distance 25mm -0 -11 -10 -Connector_Dsub -DSUB-9_Male_EdgeMount_P2.77mm -9-pin D-Sub connector, solder-cups edge-mounted, male, x-pin-pitch 2.77mm, distance of mounting holes 25mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -9-pin D-Sub connector edge mount solder cup male x-pin-pitch 2.77mm mounting holes distance 25mm -0 -9 -9 -Connector_Dsub -DSUB-9_Male_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm -9-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.54mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -9-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.54mm pin-PCB-offset 9.4mm -0 -9 -9 -Connector_Dsub -DSUB-9_Male_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset7.48mm -9-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 4.9399999999999995mm, distance of mounting holes 25mm, distance of mounting holes to PCB edge 7.4799999999999995mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -9-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 4.9399999999999995mm mounting-holes-distance 25mm mounting-hole-offset 25mm -0 -11 -10 -Connector_Dsub -DSUB-9_Male_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm -9-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 7.699999999999999mm, distance of mounting holes 25mm, distance of mounting holes to PCB edge 9.12mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -9-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 7.699999999999999mm mounting-holes-distance 25mm mounting-hole-offset 25mm -0 -11 -10 -Connector_Dsub -DSUB-9_Male_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm -9-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -9-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 9.4mm -0 -9 -9 -Connector_Dsub -DSUB-9_Male_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm -9-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 9.9mm, distance of mounting holes 25mm, distance of mounting holes to PCB edge 11.32mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -9-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 9.9mm mounting-holes-distance 25mm mounting-hole-offset 25mm -0 -11 -10 -Connector_Dsub -DSUB-9_Male_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm -9-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 14.56mm, distance of mounting holes 25mm, distance of mounting holes to PCB edge 8.2mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -9-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 14.56mm mounting-holes-distance 25mm mounting-hole-offset 25mm -0 -11 -10 -Connector_Dsub -DSUB-9_Male_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm -9-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 14.56mm, distance of mounting holes 25mm, distance of mounting holes to PCB edge 15.979999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -9-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 14.56mm mounting-holes-distance 25mm mounting-hole-offset 25mm -0 -11 -10 -Connector_Dsub -DSUB-9_Male_Vertical_P2.77x2.84mm -9-pin D-Sub connector, straight/vertical, THT-mount, male, pitch 2.77x2.84mm, distance of mounting holes 25mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -9-pin D-Sub connector straight vertical THT male pitch 2.77x2.84mm mounting holes distance 25mm -0 -9 -9 -Connector_Dsub -DSUB-9_Male_Vertical_P2.77x2.84mm_MountingHoles -9-pin D-Sub connector, straight/vertical, THT-mount, male, pitch 2.77x2.84mm, distance of mounting holes 25mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -9-pin D-Sub connector straight vertical THT male pitch 2.77x2.84mm mounting holes distance 25mm -0 -11 -10 -Connector_Dsub -DSUB-15-HD_Female_Horizontal_P2.29x1.98mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.29x1.98mm, pin-PCB-offset 3.0300000000000002mm, distance of mounting holes 25mm, distance of mounting holes to PCB edge 4.9399999999999995mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector horizontal angled 90deg THT female pitch 2.29x1.98mm pin-PCB-offset 3.0300000000000002mm mounting-holes-distance 25mm mounting-hole-offset 25mm -0 -17 -16 -Connector_Dsub -DSUB-15-HD_Female_Horizontal_P2.29x1.98mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.29x1.98mm, pin-PCB-offset 8.35mm, distance of mounting holes 25mm, distance of mounting holes to PCB edge 10.889999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector horizontal angled 90deg THT female pitch 2.29x1.98mm pin-PCB-offset 8.35mm mounting-holes-distance 25mm mounting-hole-offset 25mm -0 -17 -16 -Connector_Dsub -DSUB-15-HD_Female_Horizontal_P2.29x1.98mm_EdgePinOffset9.40mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.29x1.98mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -15-pin D-Sub connector horizontal angled 90deg THT female pitch 2.29x1.98mm pin-PCB-offset 9.4mm -0 -15 -15 -Connector_Dsub -DSUB-15-HD_Female_Horizontal_P2.29x2.54mm_EdgePinOffset9.40mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.29x2.54mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -15-pin D-Sub connector horizontal angled 90deg THT female pitch 2.29x2.54mm pin-PCB-offset 9.4mm -0 -15 -15 -Connector_Dsub -DSUB-15-HD_Female_Vertical_P2.29x1.98mm_MountingHoles -15-pin D-Sub connector, straight/vertical, THT-mount, female, pitch 2.29x1.98mm, distance of mounting holes 25mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector straight vertical THT female pitch 2.29x1.98mm mounting holes distance 25mm -0 -17 -16 -Connector_Dsub -DSUB-15-HD_Male_Horizontal_P2.29x1.98mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.29x1.98mm, pin-PCB-offset 3.0300000000000002mm, distance of mounting holes 25mm, distance of mounting holes to PCB edge 4.9399999999999995mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector horizontal angled 90deg THT male pitch 2.29x1.98mm pin-PCB-offset 3.0300000000000002mm mounting-holes-distance 25mm mounting-hole-offset 25mm -0 -17 -16 -Connector_Dsub -DSUB-15-HD_Male_Horizontal_P2.29x1.98mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.29x1.98mm, pin-PCB-offset 8.35mm, distance of mounting holes 25mm, distance of mounting holes to PCB edge 10.889999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector horizontal angled 90deg THT male pitch 2.29x1.98mm pin-PCB-offset 8.35mm mounting-holes-distance 25mm mounting-hole-offset 25mm -0 -17 -16 -Connector_Dsub -DSUB-15-HD_Male_Horizontal_P2.29x1.98mm_EdgePinOffset9.40mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.29x1.98mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -15-pin D-Sub connector horizontal angled 90deg THT male pitch 2.29x1.98mm pin-PCB-offset 9.4mm -0 -15 -15 -Connector_Dsub -DSUB-15-HD_Male_Horizontal_P2.29x2.54mm_EdgePinOffset9.40mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.29x2.54mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -15-pin D-Sub connector horizontal angled 90deg THT male pitch 2.29x2.54mm pin-PCB-offset 9.4mm -0 -15 -15 -Connector_Dsub -DSUB-15-HD_Male_Vertical_P2.29x1.98mm_MountingHoles -15-pin D-Sub connector, straight/vertical, THT-mount, male, pitch 2.29x1.98mm, distance of mounting holes 25mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector straight vertical THT male pitch 2.29x1.98mm mounting holes distance 25mm -0 -17 -16 -Connector_Dsub -DSUB-15_Female_EdgeMount_P2.77mm -15-pin D-Sub connector, solder-cups edge-mounted, female, x-pin-pitch 2.77mm, distance of mounting holes 33.3mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector edge mount solder cup female x-pin-pitch 2.77mm mounting holes distance 33.3mm -0 -15 -15 -Connector_Dsub -DSUB-15_Female_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.54mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -15-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.54mm pin-PCB-offset 9.4mm -0 -15 -15 -Connector_Dsub -DSUB-15_Female_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset7.48mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 4.9399999999999995mm, distance of mounting holes 33.3mm, distance of mounting holes to PCB edge 7.4799999999999995mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 4.9399999999999995mm mounting-holes-distance 33.3mm mounting-hole-offset 33.3mm -0 -17 -16 -Connector_Dsub -DSUB-15_Female_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 7.699999999999999mm, distance of mounting holes 33.3mm, distance of mounting holes to PCB edge 9.12mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 7.699999999999999mm mounting-holes-distance 33.3mm mounting-hole-offset 33.3mm -0 -17 -16 -Connector_Dsub -DSUB-15_Female_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -15-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 9.4mm -0 -15 -15 -Connector_Dsub -DSUB-15_Female_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 9.9mm, distance of mounting holes 33.3mm, distance of mounting holes to PCB edge 11.32mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 9.9mm mounting-holes-distance 33.3mm mounting-hole-offset 33.3mm -0 -17 -16 -Connector_Dsub -DSUB-15_Female_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 14.56mm, distance of mounting holes 33.3mm, distance of mounting holes to PCB edge 8.2mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 14.56mm mounting-holes-distance 33.3mm mounting-hole-offset 33.3mm -0 -17 -16 -Connector_Dsub -DSUB-15_Female_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 14.56mm, distance of mounting holes 33.3mm, distance of mounting holes to PCB edge 15.979999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 14.56mm mounting-holes-distance 33.3mm mounting-hole-offset 33.3mm -0 -17 -16 -Connector_Dsub -DSUB-15_Female_Vertical_P2.77x2.84mm -15-pin D-Sub connector, straight/vertical, THT-mount, female, pitch 2.77x2.84mm, distance of mounting holes 33.3mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector straight vertical THT female pitch 2.77x2.84mm mounting holes distance 33.3mm -0 -15 -15 -Connector_Dsub -DSUB-15_Female_Vertical_P2.77x2.84mm_MountingHoles -15-pin D-Sub connector, straight/vertical, THT-mount, female, pitch 2.77x2.84mm, distance of mounting holes 33.3mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector straight vertical THT female pitch 2.77x2.84mm mounting holes distance 33.3mm -0 -17 -16 -Connector_Dsub -DSUB-15_Male_EdgeMount_P2.77mm -15-pin D-Sub connector, solder-cups edge-mounted, male, x-pin-pitch 2.77mm, distance of mounting holes 33.3mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector edge mount solder cup male x-pin-pitch 2.77mm mounting holes distance 33.3mm -0 -15 -15 -Connector_Dsub -DSUB-15_Male_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.54mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -15-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.54mm pin-PCB-offset 9.4mm -0 -15 -15 -Connector_Dsub -DSUB-15_Male_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset7.48mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 4.9399999999999995mm, distance of mounting holes 33.3mm, distance of mounting holes to PCB edge 7.4799999999999995mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 4.9399999999999995mm mounting-holes-distance 33.3mm mounting-hole-offset 33.3mm -0 -17 -16 -Connector_Dsub -DSUB-15_Male_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 7.699999999999999mm, distance of mounting holes 33.3mm, distance of mounting holes to PCB edge 9.12mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 7.699999999999999mm mounting-holes-distance 33.3mm mounting-hole-offset 33.3mm -0 -17 -16 -Connector_Dsub -DSUB-15_Male_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -15-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 9.4mm -0 -15 -15 -Connector_Dsub -DSUB-15_Male_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 9.9mm, distance of mounting holes 33.3mm, distance of mounting holes to PCB edge 11.32mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 9.9mm mounting-holes-distance 33.3mm mounting-hole-offset 33.3mm -0 -17 -16 -Connector_Dsub -DSUB-15_Male_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 14.56mm, distance of mounting holes 33.3mm, distance of mounting holes to PCB edge 8.2mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 14.56mm mounting-holes-distance 33.3mm mounting-hole-offset 33.3mm -0 -17 -16 -Connector_Dsub -DSUB-15_Male_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm -15-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 14.56mm, distance of mounting holes 33.3mm, distance of mounting holes to PCB edge 15.979999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 14.56mm mounting-holes-distance 33.3mm mounting-hole-offset 33.3mm -0 -17 -16 -Connector_Dsub -DSUB-15_Male_Vertical_P2.77x2.84mm -15-pin D-Sub connector, straight/vertical, THT-mount, male, pitch 2.77x2.84mm, distance of mounting holes 33.3mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector straight vertical THT male pitch 2.77x2.84mm mounting holes distance 33.3mm -0 -15 -15 -Connector_Dsub -DSUB-15_Male_Vertical_P2.77x2.84mm_MountingHoles -15-pin D-Sub connector, straight/vertical, THT-mount, male, pitch 2.77x2.84mm, distance of mounting holes 33.3mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -15-pin D-Sub connector straight vertical THT male pitch 2.77x2.84mm mounting holes distance 33.3mm -0 -17 -16 -Connector_Dsub -DSUB-25_Female_EdgeMount_P2.77mm -25-pin D-Sub connector, solder-cups edge-mounted, female, x-pin-pitch 2.77mm, distance of mounting holes 47.1mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -25-pin D-Sub connector edge mount solder cup female x-pin-pitch 2.77mm mounting holes distance 47.1mm -0 -25 -25 -Connector_Dsub -DSUB-25_Female_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm -25-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.54mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -25-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.54mm pin-PCB-offset 9.4mm -0 -25 -25 -Connector_Dsub -DSUB-25_Female_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset7.48mm -25-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 4.9399999999999995mm, distance of mounting holes 47.1mm, distance of mounting holes to PCB edge 7.4799999999999995mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -25-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 4.9399999999999995mm mounting-holes-distance 47.1mm mounting-hole-offset 47.1mm -0 -27 -26 -Connector_Dsub -DSUB-25_Female_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm -25-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 7.699999999999999mm, distance of mounting holes 47.1mm, distance of mounting holes to PCB edge 9.12mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -25-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 7.699999999999999mm mounting-holes-distance 47.1mm mounting-hole-offset 47.1mm -0 -27 -26 -Connector_Dsub -DSUB-25_Female_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm -25-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -25-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 9.4mm -0 -25 -25 -Connector_Dsub -DSUB-25_Female_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm -25-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 9.9mm, distance of mounting holes 47.1mm, distance of mounting holes to PCB edge 11.32mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -25-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 9.9mm mounting-holes-distance 47.1mm mounting-hole-offset 47.1mm -0 -27 -26 -Connector_Dsub -DSUB-25_Female_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm -25-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 14.56mm, distance of mounting holes 47.1mm, distance of mounting holes to PCB edge 8.2mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -25-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 14.56mm mounting-holes-distance 47.1mm mounting-hole-offset 47.1mm -0 -27 -26 -Connector_Dsub -DSUB-25_Female_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm -25-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 14.56mm, distance of mounting holes 47.1mm, distance of mounting holes to PCB edge 15.979999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -25-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 14.56mm mounting-holes-distance 47.1mm mounting-hole-offset 47.1mm -0 -27 -26 -Connector_Dsub -DSUB-25_Female_Vertical_P2.77x2.84mm -25-pin D-Sub connector, straight/vertical, THT-mount, female, pitch 2.77x2.84mm, distance of mounting holes 47.1mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -25-pin D-Sub connector straight vertical THT female pitch 2.77x2.84mm mounting holes distance 47.1mm -0 -25 -25 -Connector_Dsub -DSUB-25_Female_Vertical_P2.77x2.84mm_MountingHoles -25-pin D-Sub connector, straight/vertical, THT-mount, female, pitch 2.77x2.84mm, distance of mounting holes 47.1mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -25-pin D-Sub connector straight vertical THT female pitch 2.77x2.84mm mounting holes distance 47.1mm -0 -27 -26 -Connector_Dsub -DSUB-25_Male_EdgeMount_P2.77mm -25-pin D-Sub connector, solder-cups edge-mounted, male, x-pin-pitch 2.77mm, distance of mounting holes 47.1mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -25-pin D-Sub connector edge mount solder cup male x-pin-pitch 2.77mm mounting holes distance 47.1mm -0 -25 -25 -Connector_Dsub -DSUB-25_Male_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm -25-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.54mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -25-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.54mm pin-PCB-offset 9.4mm -0 -25 -25 -Connector_Dsub -DSUB-25_Male_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset7.48mm -25-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 4.9399999999999995mm, distance of mounting holes 47.1mm, distance of mounting holes to PCB edge 7.4799999999999995mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -25-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 4.9399999999999995mm mounting-holes-distance 47.1mm mounting-hole-offset 47.1mm -0 -27 -26 -Connector_Dsub -DSUB-25_Male_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm -25-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 7.699999999999999mm, distance of mounting holes 47.1mm, distance of mounting holes to PCB edge 9.12mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -25-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 7.699999999999999mm mounting-holes-distance 47.1mm mounting-hole-offset 47.1mm -0 -27 -26 -Connector_Dsub -DSUB-25_Male_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm -25-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -25-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 9.4mm -0 -25 -25 -Connector_Dsub -DSUB-25_Male_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm -25-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 9.9mm, distance of mounting holes 47.1mm, distance of mounting holes to PCB edge 11.32mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -25-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 9.9mm mounting-holes-distance 47.1mm mounting-hole-offset 47.1mm -0 -27 -26 -Connector_Dsub -DSUB-25_Male_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm -25-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 14.56mm, distance of mounting holes 47.1mm, distance of mounting holes to PCB edge 8.2mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -25-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 14.56mm mounting-holes-distance 47.1mm mounting-hole-offset 47.1mm -0 -27 -26 -Connector_Dsub -DSUB-25_Male_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm -25-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 14.56mm, distance of mounting holes 47.1mm, distance of mounting holes to PCB edge 15.979999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -25-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 14.56mm mounting-holes-distance 47.1mm mounting-hole-offset 47.1mm -0 -27 -26 -Connector_Dsub -DSUB-25_Male_Vertical_P2.77x2.84mm -25-pin D-Sub connector, straight/vertical, THT-mount, male, pitch 2.77x2.84mm, distance of mounting holes 47.1mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -25-pin D-Sub connector straight vertical THT male pitch 2.77x2.84mm mounting holes distance 47.1mm -0 -25 -25 -Connector_Dsub -DSUB-25_Male_Vertical_P2.77x2.84mm_MountingHoles -25-pin D-Sub connector, straight/vertical, THT-mount, male, pitch 2.77x2.84mm, distance of mounting holes 47.1mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -25-pin D-Sub connector straight vertical THT male pitch 2.77x2.84mm mounting holes distance 47.1mm -0 -27 -26 -Connector_Dsub -DSUB-26-HD_Female_Horizontal_P2.29x1.98mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm -26-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.29x1.98mm, pin-PCB-offset 3.0300000000000002mm, distance of mounting holes 33.3mm, distance of mounting holes to PCB edge 4.9399999999999995mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -26-pin D-Sub connector horizontal angled 90deg THT female pitch 2.29x1.98mm pin-PCB-offset 3.0300000000000002mm mounting-holes-distance 33.3mm mounting-hole-offset 33.3mm +Connector_USB +USB_B_Amphenol_MUSB-D511_Vertical_Rugged +A,phenol MUSB_D511, USB B female connector, straight, rugged, https://www.amphenolcanada.com/ProductSearch/drawings/AC/MUSBD511XX.pdf +USB_B_MUSB_Straight female connector straight rugged MUSB D511 +0 +6 +5 +Connector_USB +USB_B_OST_USB-B1HSxx_Horizontal +USB B receptacle, Horizontal, through-hole, http://www.on-shore.com/wp-content/uploads/2015/09/usb-b1hsxx.pdf +USB-B receptacle horizontal through-hole +0 +6 +5 +Connector_USB +USB_B_TE_5787834_Vertical +http://www.mouser.com/ds/2/418/NG_CD_5787834_A4-669110.pdf +USB_B USB B vertical female connector +0 +6 +5 +Connector_USB +USB_C_Plug_Molex_105444 +Universal Serial Bus (USB) Shielded I/O Plug, Type C, Right Angle, Surface Mount, http://www.molex.com/pdm_docs/sd/1054440001_sd.pdf +USB Type-C Plug Edge Mount +0 +24 +23 +Connector_USB +USB_C_Receptacle_Amphenol_12401548E4-2A +USB TYPE C, RA RCPT PCB, Hybrid, https://www.amphenolcanada.com/StockAvailabilityPrice.aspx?From=&PartNum=12401548E4%7e2A +USB C Type-C Receptacle Hybrid 0 28 -27 -Connector_Dsub -DSUB-26-HD_Female_Horizontal_P2.29x1.98mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm -26-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.29x1.98mm, pin-PCB-offset 8.35mm, distance of mounting holes 33.3mm, distance of mounting holes to PCB edge 10.889999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -26-pin D-Sub connector horizontal angled 90deg THT female pitch 2.29x1.98mm pin-PCB-offset 8.35mm mounting-holes-distance 33.3mm mounting-hole-offset 33.3mm +25 +Connector_USB +USB_C_Receptacle_Amphenol_12401548E4-2A_CircularHoles +USB TYPE C, RA RCPT PCB, Hybrid, https://www.amphenolcanada.com/StockAvailabilityPrice.aspx?From=&PartNum=12401548E4%7e2A +USB C Type-C Receptacle Hybrid 0 28 -27 -Connector_Dsub -DSUB-26-HD_Female_Horizontal_P2.29x1.98mm_EdgePinOffset9.40mm -26-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.29x1.98mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -26-pin D-Sub connector horizontal angled 90deg THT female pitch 2.29x1.98mm pin-PCB-offset 9.4mm -0 -26 -26 -Connector_Dsub -DSUB-26-HD_Female_Horizontal_P2.29x2.54mm_EdgePinOffset9.40mm -26-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.29x2.54mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -26-pin D-Sub connector horizontal angled 90deg THT female pitch 2.29x2.54mm pin-PCB-offset 9.4mm -0 -26 -26 -Connector_Dsub -DSUB-26-HD_Female_Vertical_P2.29x1.98mm_MountingHoles -26-pin D-Sub connector, straight/vertical, THT-mount, female, pitch 2.29x1.98mm, distance of mounting holes 33.3mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -26-pin D-Sub connector straight vertical THT female pitch 2.29x1.98mm mounting holes distance 33.3mm +25 +Connector_USB +USB_C_Receptacle_Amphenol_12401610E4-2A +USB TYPE C, RA RCPT PCB, SMT, https://www.amphenolcanada.com/StockAvailabilityPrice.aspx?From=&PartNum=12401610E4%7e2A +USB C Type-C Receptacle SMD 0 28 -27 -Connector_Dsub -DSUB-26-HD_Male_Horizontal_P2.29x1.98mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm -26-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.29x1.98mm, pin-PCB-offset 3.0300000000000002mm, distance of mounting holes 33.3mm, distance of mounting holes to PCB edge 4.9399999999999995mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -26-pin D-Sub connector horizontal angled 90deg THT male pitch 2.29x1.98mm pin-PCB-offset 3.0300000000000002mm mounting-holes-distance 33.3mm mounting-hole-offset 33.3mm +25 +Connector_USB +USB_C_Receptacle_Amphenol_12401610E4-2A_CircularHoles +USB TYPE C, RA RCPT PCB, SMT, https://www.amphenolcanada.com/StockAvailabilityPrice.aspx?From=&PartNum=12401610E4%7e2A +USB C Type-C Receptacle SMD 0 28 -27 -Connector_Dsub -DSUB-26-HD_Male_Horizontal_P2.29x1.98mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm -26-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.29x1.98mm, pin-PCB-offset 8.35mm, distance of mounting holes 33.3mm, distance of mounting holes to PCB edge 10.889999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -26-pin D-Sub connector horizontal angled 90deg THT male pitch 2.29x1.98mm pin-PCB-offset 8.35mm mounting-holes-distance 33.3mm mounting-hole-offset 33.3mm +25 +Connector_USB +USB_C_Receptacle_GCT_USB4085 +USB 2.0 Type C Receptacle, https://gct.co/Files/Drawings/USB4085.pdf +USB Type-C Receptacle Through-hole Right angle +0 +20 +17 +Connector_USB +USB_C_Receptacle_JAE_DX07S024WJ1R350 +http://www.jae.com/z-en/pdf_download_exec.cfm?param=SJ117219.pdf +USB C Type-C Receptacle SMD +0 +30 +25 +Connector_USB +USB_C_Receptacle_JAE_DX07S024WJ3R400 +USB TYPE C, VERT RCPT PCB, SMT, http://www.jae.com/z-en/pdf_download_exec.cfm?param=SJ117928.pdf +USB C Type-C Receptacle SMD 0 28 -27 -Connector_Dsub -DSUB-26-HD_Male_Horizontal_P2.29x1.98mm_EdgePinOffset9.40mm -26-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.29x1.98mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -26-pin D-Sub connector horizontal angled 90deg THT male pitch 2.29x1.98mm pin-PCB-offset 9.4mm +25 +Connector_USB +USB_Micro-B_Amphenol_10103594-0001LF_Horizontal +Micro USB Type B 10103594-0001LF, http://cdn.amphenol-icc.com/media/wysiwyg/files/drawing/10103594.pdf +USB USB_B USB_micro USB_OTG 0 -26 -26 -Connector_Dsub -DSUB-26-HD_Male_Horizontal_P2.29x2.54mm_EdgePinOffset9.40mm -26-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.29x2.54mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -26-pin D-Sub connector horizontal angled 90deg THT male pitch 2.29x2.54mm pin-PCB-offset 9.4mm +17 +6 +Connector_USB +USB_Micro-B_GCT_USB3076-30-A +GCT Micro USB https://gct.co/files/drawings/usb3076.pdf +Micro-USB SMD Typ-B GCT 0 -26 -26 -Connector_Dsub -DSUB-26-HD_Male_Vertical_P2.29x1.98mm_MountingHoles -26-pin D-Sub connector, straight/vertical, THT-mount, male, pitch 2.29x1.98mm, distance of mounting holes 33.3mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -26-pin D-Sub connector straight vertical THT male pitch 2.29x1.98mm mounting holes distance 33.3mm +11 +6 +Connector_USB +USB_Micro-B_Molex-105017-0001 +http://www.molex.com/pdm_docs/sd/1050170001_sd.pdf +Micro-USB SMD Typ-B 0 -28 -27 -Connector_Dsub -DSUB-37_Female_EdgeMount_P2.77mm -37-pin D-Sub connector, solder-cups edge-mounted, female, x-pin-pitch 2.77mm, distance of mounting holes 63.5mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -37-pin D-Sub connector edge mount solder cup female x-pin-pitch 2.77mm mounting holes distance 63.5mm +13 +6 +Connector_USB +USB_Micro-B_Molex-105133-0001 +Molex Vertical Micro USB Typ-B (http://www.molex.com/pdm_docs/sd/1051330001_sd.pdf) +Micro-USB SMD Typ-B Vertical 0 -37 -37 -Connector_Dsub -DSUB-37_Female_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm -37-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.54mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -37-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.54mm pin-PCB-offset 9.4mm +8 +6 +Connector_USB +USB_Micro-B_Molex-105133-0031 +Molex Vertical Micro USB Typ-B (http://www.molex.com/pdm_docs/sd/1051330031_sd.pdf) +Micro-USB SMD Typ-B Vertical 0 -37 -37 -Connector_Dsub -DSUB-37_Female_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset7.48mm -37-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 4.9399999999999995mm, distance of mounting holes 63.5mm, distance of mounting holes to PCB edge 7.4799999999999995mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -37-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 4.9399999999999995mm mounting-holes-distance 63.5mm mounting-hole-offset 63.5mm +8 +6 +Connector_USB +USB_Micro-B_Molex_47346-0001 +Micro USB B receptable with flange, bottom-mount, SMD, right-angle (http://www.molex.com/pdm_docs/sd/473460001_sd.pdf) +Micro B USB SMD 0 -39 -38 -Connector_Dsub -DSUB-37_Female_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm -37-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 7.699999999999999mm, distance of mounting holes 63.5mm, distance of mounting holes to PCB edge 9.12mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -37-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 7.699999999999999mm mounting-holes-distance 63.5mm mounting-hole-offset 63.5mm +11 +6 +Connector_USB +USB_Micro-B_Wuerth_614105150721_Vertical +USB Micro-B receptacle, through-hole, vertical, http://katalog.we-online.de/em/datasheet/614105150721.pdf +usb micro receptacle vertical 0 -39 -38 -Connector_Dsub -DSUB-37_Female_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm -37-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -37-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 9.4mm +7 +6 +Connector_USB +USB_Micro-B_Wuerth_614105150721_Vertical_CircularHoles +USB Micro-B receptacle, through-hole, vertical, http://katalog.we-online.de/em/datasheet/614105150721.pdf +usb micro receptacle vertical 0 -37 -37 -Connector_Dsub -DSUB-37_Female_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm -37-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 9.9mm, distance of mounting holes 63.5mm, distance of mounting holes to PCB edge 11.32mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -37-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 9.9mm mounting-holes-distance 63.5mm mounting-hole-offset 63.5mm +7 +6 +Connector_USB +USB_Micro-B_Wuerth_629105150521 +USB Micro-B receptacle, http://www.mouser.com/ds/2/445/629105150521-469306.pdf +usb micro receptacle 0 -39 -38 -Connector_Dsub -DSUB-37_Female_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm -37-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 14.56mm, distance of mounting holes 63.5mm, distance of mounting holes to PCB edge 8.2mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -37-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 14.56mm mounting-holes-distance 63.5mm mounting-hole-offset 63.5mm +9 +6 +Connector_USB +USB_Micro-B_Wuerth_629105150521_CircularHoles +USB Micro-B receptacle, http://www.mouser.com/ds/2/445/629105150521-469306.pdf +usb micro receptacle 0 -39 -38 -Connector_Dsub -DSUB-37_Female_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm -37-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.77x2.84mm, pin-PCB-offset 14.56mm, distance of mounting holes 63.5mm, distance of mounting holes to PCB edge 15.979999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -37-pin D-Sub connector horizontal angled 90deg THT female pitch 2.77x2.84mm pin-PCB-offset 14.56mm mounting-holes-distance 63.5mm mounting-hole-offset 63.5mm +9 +6 +Connector_USB +USB_Mini-B_AdamTech_MUSB-B5-S-VT-TSMT-1_SMD_Vertical +http://www.adam-tech.com/upload/MUSB-B5-S-VT-TSMT-1.pdf +USB Mini-B 0 -39 -38 -Connector_Dsub -DSUB-37_Female_Vertical_P2.77x2.84mm -37-pin D-Sub connector, straight/vertical, THT-mount, female, pitch 2.77x2.84mm, distance of mounting holes 63.5mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -37-pin D-Sub connector straight vertical THT female pitch 2.77x2.84mm mounting holes distance 63.5mm +7 +6 +Connector_USB +USB_Mini-B_Lumberg_2486_01_Horizontal +USB Mini-B 5-pin SMD connector, http://downloads.lumberg.com/datenblaetter/en/2486_01.pdf +USB USB_B USB_Mini connector 0 -37 -37 -Connector_Dsub -DSUB-37_Female_Vertical_P2.77x2.84mm_MountingHoles -37-pin D-Sub connector, straight/vertical, THT-mount, female, pitch 2.77x2.84mm, distance of mounting holes 63.5mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -37-pin D-Sub connector straight vertical THT female pitch 2.77x2.84mm mounting holes distance 63.5mm +9 +6 +Connector_USB +USB_Mini-B_Tensility_54-00023_Vertical +http://www.tensility.com/pdffiles/54-00023.pdf +usb mini receptacle vertical 0 -39 -38 -Connector_Dsub -DSUB-37_Male_EdgeMount_P2.77mm -37-pin D-Sub connector, solder-cups edge-mounted, male, x-pin-pitch 2.77mm, distance of mounting holes 63.5mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -37-pin D-Sub connector edge mount solder cup male x-pin-pitch 2.77mm mounting holes distance 63.5mm +7 +6 +Connector_USB +USB_Mini-B_Tensility_54-00023_Vertical_CircularHoles +http://www.tensility.com/pdffiles/54-00023.pdf +usb mini receptacle vertical 0 -37 -37 -Connector_Dsub -DSUB-37_Male_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm -37-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.54mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -37-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.54mm pin-PCB-offset 9.4mm -0 -37 -37 -Connector_Dsub -DSUB-37_Male_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset7.48mm -37-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 4.9399999999999995mm, distance of mounting holes 63.5mm, distance of mounting holes to PCB edge 7.4799999999999995mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -37-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 4.9399999999999995mm mounting-holes-distance 63.5mm mounting-hole-offset 63.5mm -0 -39 -38 -Connector_Dsub -DSUB-37_Male_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm -37-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 7.699999999999999mm, distance of mounting holes 63.5mm, distance of mounting holes to PCB edge 9.12mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -37-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 7.699999999999999mm mounting-holes-distance 63.5mm mounting-hole-offset 63.5mm -0 -39 -38 -Connector_Dsub -DSUB-37_Male_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm -37-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -37-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 9.4mm -0 -37 -37 -Connector_Dsub -DSUB-37_Male_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm -37-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 9.9mm, distance of mounting holes 63.5mm, distance of mounting holes to PCB edge 11.32mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -37-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 9.9mm mounting-holes-distance 63.5mm mounting-hole-offset 63.5mm -0 -39 -38 -Connector_Dsub -DSUB-37_Male_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm -37-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 14.56mm, distance of mounting holes 63.5mm, distance of mounting holes to PCB edge 8.2mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -37-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 14.56mm mounting-holes-distance 63.5mm mounting-hole-offset 63.5mm -0 -39 -38 -Connector_Dsub -DSUB-37_Male_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm -37-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.77x2.84mm, pin-PCB-offset 14.56mm, distance of mounting holes 63.5mm, distance of mounting holes to PCB edge 15.979999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -37-pin D-Sub connector horizontal angled 90deg THT male pitch 2.77x2.84mm pin-PCB-offset 14.56mm mounting-holes-distance 63.5mm mounting-hole-offset 63.5mm -0 -39 -38 -Connector_Dsub -DSUB-37_Male_Vertical_P2.77x2.84mm -37-pin D-Sub connector, straight/vertical, THT-mount, male, pitch 2.77x2.84mm, distance of mounting holes 63.5mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -37-pin D-Sub connector straight vertical THT male pitch 2.77x2.84mm mounting holes distance 63.5mm -0 -37 -37 -Connector_Dsub -DSUB-37_Male_Vertical_P2.77x2.84mm_MountingHoles -37-pin D-Sub connector, straight/vertical, THT-mount, male, pitch 2.77x2.84mm, distance of mounting holes 63.5mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -37-pin D-Sub connector straight vertical THT male pitch 2.77x2.84mm mounting holes distance 63.5mm -0 -39 -38 -Connector_Dsub -DSUB-44-HD_Female_Horizontal_P2.29x1.98mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm -44-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.29x1.98mm, pin-PCB-offset 3.0300000000000002mm, distance of mounting holes 47.1mm, distance of mounting holes to PCB edge 4.9399999999999995mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -44-pin D-Sub connector horizontal angled 90deg THT female pitch 2.29x1.98mm pin-PCB-offset 3.0300000000000002mm mounting-holes-distance 47.1mm mounting-hole-offset 47.1mm -0 -46 -45 -Connector_Dsub -DSUB-44-HD_Female_Horizontal_P2.29x1.98mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm -44-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.29x1.98mm, pin-PCB-offset 8.35mm, distance of mounting holes 47.1mm, distance of mounting holes to PCB edge 10.889999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -44-pin D-Sub connector horizontal angled 90deg THT female pitch 2.29x1.98mm pin-PCB-offset 8.35mm mounting-holes-distance 47.1mm mounting-hole-offset 47.1mm -0 -46 -45 -Connector_Dsub -DSUB-44-HD_Female_Horizontal_P2.29x1.98mm_EdgePinOffset9.40mm -44-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.29x1.98mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -44-pin D-Sub connector horizontal angled 90deg THT female pitch 2.29x1.98mm pin-PCB-offset 9.4mm -0 -44 -44 -Connector_Dsub -DSUB-44-HD_Female_Horizontal_P2.29x2.54mm_EdgePinOffset9.40mm -44-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.29x2.54mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -44-pin D-Sub connector horizontal angled 90deg THT female pitch 2.29x2.54mm pin-PCB-offset 9.4mm -0 -44 -44 -Connector_Dsub -DSUB-44-HD_Female_Vertical_P2.29x1.98mm_MountingHoles -44-pin D-Sub connector, straight/vertical, THT-mount, female, pitch 2.29x1.98mm, distance of mounting holes 47.1mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -44-pin D-Sub connector straight vertical THT female pitch 2.29x1.98mm mounting holes distance 47.1mm -0 -46 -45 -Connector_Dsub -DSUB-44-HD_Male_Horizontal_P2.29x1.98mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm -44-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.29x1.98mm, pin-PCB-offset 3.0300000000000002mm, distance of mounting holes 47.1mm, distance of mounting holes to PCB edge 4.9399999999999995mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -44-pin D-Sub connector horizontal angled 90deg THT male pitch 2.29x1.98mm pin-PCB-offset 3.0300000000000002mm mounting-holes-distance 47.1mm mounting-hole-offset 47.1mm -0 -46 -45 -Connector_Dsub -DSUB-44-HD_Male_Horizontal_P2.29x1.98mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm -44-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.29x1.98mm, pin-PCB-offset 8.35mm, distance of mounting holes 47.1mm, distance of mounting holes to PCB edge 10.889999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -44-pin D-Sub connector horizontal angled 90deg THT male pitch 2.29x1.98mm pin-PCB-offset 8.35mm mounting-holes-distance 47.1mm mounting-hole-offset 47.1mm -0 -46 -45 -Connector_Dsub -DSUB-44-HD_Male_Horizontal_P2.29x1.98mm_EdgePinOffset9.40mm -44-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.29x1.98mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -44-pin D-Sub connector horizontal angled 90deg THT male pitch 2.29x1.98mm pin-PCB-offset 9.4mm -0 -44 -44 -Connector_Dsub -DSUB-44-HD_Male_Horizontal_P2.29x2.54mm_EdgePinOffset9.40mm -44-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.29x2.54mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -44-pin D-Sub connector horizontal angled 90deg THT male pitch 2.29x2.54mm pin-PCB-offset 9.4mm -0 -44 -44 -Connector_Dsub -DSUB-44-HD_Male_Vertical_P2.29x1.98mm_MountingHoles -44-pin D-Sub connector, straight/vertical, THT-mount, male, pitch 2.29x1.98mm, distance of mounting holes 47.1mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -44-pin D-Sub connector straight vertical THT male pitch 2.29x1.98mm mounting holes distance 47.1mm -0 -46 -45 -Connector_Dsub -DSUB-62-HD_Female_Horizontal_P2.41x1.98mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm -62-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.41x1.98mm, pin-PCB-offset 3.0300000000000002mm, distance of mounting holes 63.5mm, distance of mounting holes to PCB edge 4.9399999999999995mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -62-pin D-Sub connector horizontal angled 90deg THT female pitch 2.41x1.98mm pin-PCB-offset 3.0300000000000002mm mounting-holes-distance 63.5mm mounting-hole-offset 63.5mm -0 -64 -63 -Connector_Dsub -DSUB-62-HD_Female_Horizontal_P2.41x1.98mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm -62-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.41x1.98mm, pin-PCB-offset 8.35mm, distance of mounting holes 63.5mm, distance of mounting holes to PCB edge 10.889999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -62-pin D-Sub connector horizontal angled 90deg THT female pitch 2.41x1.98mm pin-PCB-offset 8.35mm mounting-holes-distance 63.5mm mounting-hole-offset 63.5mm -0 -64 -63 -Connector_Dsub -DSUB-62-HD_Female_Horizontal_P2.41x1.98mm_EdgePinOffset9.40mm -62-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.41x1.98mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -62-pin D-Sub connector horizontal angled 90deg THT female pitch 2.41x1.98mm pin-PCB-offset 9.4mm -0 -62 -62 -Connector_Dsub -DSUB-62-HD_Female_Horizontal_P2.41x2.54mm_EdgePinOffset9.40mm -62-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, female, pitch 2.41x2.54mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -62-pin D-Sub connector horizontal angled 90deg THT female pitch 2.41x2.54mm pin-PCB-offset 9.4mm -0 -62 -62 -Connector_Dsub -DSUB-62-HD_Female_Vertical_P2.41x1.98mm_MountingHoles -62-pin D-Sub connector, straight/vertical, THT-mount, female, pitch 2.41x1.98mm, distance of mounting holes 63.5mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -62-pin D-Sub connector straight vertical THT female pitch 2.41x1.98mm mounting holes distance 63.5mm -0 -64 -63 -Connector_Dsub -DSUB-62-HD_Male_Horizontal_P2.41x1.98mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm -62-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.41x1.98mm, pin-PCB-offset 3.0300000000000002mm, distance of mounting holes 63.5mm, distance of mounting holes to PCB edge 4.9399999999999995mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -62-pin D-Sub connector horizontal angled 90deg THT male pitch 2.41x1.98mm pin-PCB-offset 3.0300000000000002mm mounting-holes-distance 63.5mm mounting-hole-offset 63.5mm -0 -64 -63 -Connector_Dsub -DSUB-62-HD_Male_Horizontal_P2.41x1.98mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm -62-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.41x1.98mm, pin-PCB-offset 8.35mm, distance of mounting holes 63.5mm, distance of mounting holes to PCB edge 10.889999999999999mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -62-pin D-Sub connector horizontal angled 90deg THT male pitch 2.41x1.98mm pin-PCB-offset 8.35mm mounting-holes-distance 63.5mm mounting-hole-offset 63.5mm -0 -64 -63 -Connector_Dsub -DSUB-62-HD_Male_Horizontal_P2.41x1.98mm_EdgePinOffset9.40mm -62-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.41x1.98mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -62-pin D-Sub connector horizontal angled 90deg THT male pitch 2.41x1.98mm pin-PCB-offset 9.4mm -0 -62 -62 -Connector_Dsub -DSUB-62-HD_Male_Horizontal_P2.41x2.54mm_EdgePinOffset9.40mm -62-pin D-Sub connector, horizontal/angled (90 deg), THT-mount, male, pitch 2.41x2.54mm, pin-PCB-offset 9.4mm, see http://docs-europe.electrocomponents.com/webdocs/1585/0900766b81585df2.pdf -62-pin D-Sub connector horizontal angled 90deg THT male pitch 2.41x2.54mm pin-PCB-offset 9.4mm -0 -62 -62 -Connector_Dsub -DSUB-62-HD_Male_Vertical_P2.41x1.98mm_MountingHoles -62-pin D-Sub connector, straight/vertical, THT-mount, male, pitch 2.41x1.98mm, distance of mounting holes 63.5mm, see https://disti-assets.s3.amazonaws.com/tonar/files/datasheets/16730.pdf -62-pin D-Sub connector straight vertical THT male pitch 2.41x1.98mm mounting holes distance 63.5mm -0 -64 -63 +7 +6 diff --git a/src/netdaemon/checkfile.c b/src/netdaemon/checkfile.c new file mode 100644 index 0000000..8b0b2ac --- /dev/null +++ b/src/netdaemon/checkfile.c @@ -0,0 +1,127 @@ +/* + * daemon.c - functions for running in background like a daemon + * + * Copyright 2013 Edward V. Emelianoff + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include // opendir +#include "checkfile.h" +#include "usefull_macros.h" + +/** + * @brief readPSname - read process name from /proc/PID/cmdline + * @param pid - PID of interesting process + * @return filename or NULL if not found + * don't use this function twice for different names without copying + * its returning by strdup, because `name` contains in static array + */ +char *readPSname(pid_t pid){ + static char name[PATH_MAX]; + char *pp = name, byte, path[PATH_MAX]; + FILE *file; + int cntr = 0; + size_t sz; + snprintf(path, PATH_MAX, PROC_BASE "/%d/cmdline", pid); + file = fopen(path, "r"); + if(!file) return NULL; // there's no such file + do{ // read basename + sz = fread(&byte, 1, 1, file); + if(sz != 1) break; + if(byte != '/') *pp++ = byte; + else{ + pp = name; + cntr = 0; + } + }while(byte && cntr++ < PATH_MAX-1); + name[cntr] = 0; + fclose(file); + return name; +} + +static char *pidfilename_ = NULL; // store the name of pidfile here + +/** + * check wether there is a same running process + * exit if there is a running process or error + * Checking have 3 steps: + * 1) lock executable file + * 2) check pidfile (if you run a copy?) + * 3) check /proc for executables with the same name (no/wrong pidfile) + * @param pidfilename - name of pidfile or NULL if none + * @return 0 if all OK or PID of first running process found + */ +pid_t check4running(char *pidfilename){ + DIR *dir; + FILE *pidfile; + struct dirent *de; + struct stat s_buf; + pid_t pid = 0, self; + char *name, *myname; + self = getpid(); // get self PID + if(!(dir = opendir(PROC_BASE))){ // open /proc directory + ERR(PROC_BASE); + } + if(!(name = readPSname(self))){ // error reading self name + ERR("Can't read self name"); + } + myname = strdup(name); + if(pidfilename && stat(pidfilename, &s_buf) == 0){ // pidfile exists + pidfile = fopen(pidfilename, "r"); + if(pidfile){ + if(fscanf(pidfile, "%d", &pid) > 0){ // read PID of (possibly) running process + if((name = readPSname(pid)) && strncmp(name, myname, 255) == 0){ + fclose(pidfile); + goto procfound; + } + } + fclose(pidfile); + } + } + // There is no pidfile or it consists a wrong record + while((de = readdir(dir))){ // scan /proc + if(!(pid = (pid_t)atoi(de->d_name)) || pid == self) // pass non-PID files and self + continue; + if((name = readPSname(pid)) && strncmp(name, myname, 255) == 0) + goto procfound; + } + pid = 0; // OK, not found -> create pid-file if need + if(pidfilename){ + pidfile = fopen(pidfilename, "w"); + if(!pidfile){ + WARN("Can't open PID file"); + }else{ + fprintf(pidfile, "%d\n", self); // write self PID to pidfile + fclose(pidfile); + if(pidfilename_) FREE(pidfilename_); + pidfilename_ = strdup(pidfilename); + } + } +procfound: + closedir(dir); + free(myname); + return pid; +} + +/** + * @brief unlink_pidfile - remove pidfile @ exit + */ +void unlink_pidfile(){ + if(!pidfilename_) return; + unlink(pidfilename_); + FREE(pidfilename_); +} diff --git a/src/netdaemon/checkfile.h b/src/netdaemon/checkfile.h new file mode 100644 index 0000000..acd7ede --- /dev/null +++ b/src/netdaemon/checkfile.h @@ -0,0 +1,39 @@ +/* + * This file is part of the Zphocus project. + * Copyright 2019 Edward V. Emelianov . + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once +#ifndef CHECKFILE_H__ +#define CHECKFILE_H__ + +#include // getpid, unlink + +#ifndef PROC_BASE +#define PROC_BASE "/proc" +#endif +#ifndef WEAK +#define WEAK __attribute__ ((weak)) +#endif + +// check that our process is exclusive +pid_t check4running(char *pidfilename); +// read name of process by its PID +char *readPSname(pid_t pid); +void unlink_pidfile(); + + +#endif // CHECKFILE_H__ diff --git a/src/netdaemon/cmdlnopts.c b/src/netdaemon/cmdlnopts.c index 69fe486..974f515 100644 --- a/src/netdaemon/cmdlnopts.c +++ b/src/netdaemon/cmdlnopts.c @@ -35,6 +35,7 @@ static glob_pars G; // default values for Gdefault & help #define DEFAULT_COMDEV "/dev/ttyUSB0" #define DEFAULT_PORT "4444" +#define DEFAULT_PIDFILE "/tmp/TSYS01daemon.pid" // DEFAULTS // default global parameters @@ -45,7 +46,9 @@ glob_pars const Gdefault = { .savepath = NULL, .makegraphs = 0, .rest_pars = NULL, - .rest_pars_num = 0 + .rest_pars_num = 0, + .adjfilename = "tempadj.txt", + .pidfilename = DEFAULT_PIDFILE }; /* @@ -60,6 +63,9 @@ myoption cmdlnopts[] = { {"terminal",NO_ARGS, NULL, 't', arg_int, APTR(&G.terminal), _("run as terminal")}, {"savepath",NEED_ARG, NULL, 's', arg_string, APTR(&G.savepath), _("path where files would be saved (if none - don't save)")}, {"graphplot",NO_ARGS, NULL, 'g', arg_int, APTR(&G.makegraphs),_("make graphics with gnuplot")}, + {"testadjfile",NO_ARGS, NULL, 'T', arg_int, APTR(&G.testadjfile),_("test format of file with T adjustements and force running proces to re-read it")}, + {"adjname", NEED_ARG, NULL, 'N', arg_string, APTR(&G.adjfilename),_("name of adjustements file (default: tempadj.txt)")}, + {"pidfile", NEED_ARG, NULL, 'P', arg_string, APTR(&G.pidfilename),_("name of PID file (default: " DEFAULT_PIDFILE ")")}, end_option }; diff --git a/src/netdaemon/cmdlnopts.h b/src/netdaemon/cmdlnopts.h index 92eb2aa..556e910 100644 --- a/src/netdaemon/cmdlnopts.h +++ b/src/netdaemon/cmdlnopts.h @@ -37,6 +37,9 @@ typedef struct{ int makegraphs; // ==1 to make graphics with gnuplot int rest_pars_num; // number of rest parameters char** rest_pars; // the rest parameters: array of char* (path to logfile and thrash) + int testadjfile; // test format of file with adjustments + char *adjfilename; // name of adjustements file + char *pidfilename; // name of PID file } glob_pars; diff --git a/src/netdaemon/gnuplot.c b/src/netdaemon/gnuplot.c index 1442f71..84f3a76 100644 --- a/src/netdaemon/gnuplot.c +++ b/src/netdaemon/gnuplot.c @@ -55,7 +55,7 @@ static int formfile(char *fname, double data[2][NCHANNEL_MAX+1][NCTRLR_MAX+1], i const sensor_data *sdata = get_sensor_location(i, N, p); if(!sdata) continue; if(Z != sdata->Z) continue; - fprintf(F, "%d\t%d\t%.2f\n", sdata->X, sdata->Y, T - sdata->dt); + fprintf(F, "%d\t%d\t%.2f\n", sdata->X, sdata->Y, T - sdata->dt - sdata->Tadj); } } } diff --git a/src/netdaemon/main.c b/src/netdaemon/main.c index 4429cb4..a1b730a 100644 --- a/src/netdaemon/main.c +++ b/src/netdaemon/main.c @@ -18,15 +18,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ -#include "usefull_macros.h" #include #include // wait #include //prctl +#include "checkfile.h" #include "cmdlnopts.h" #include "socket.h" +#include "usefull_macros.h" -glob_pars *G; +glob_pars *G; // non-static: some another files should know about it! +static pid_t childpid = 0; // PID of child - to kill it if need +// default signals handler void signals(int signo){ restore_console(); restore_tty(); @@ -34,35 +37,64 @@ void signals(int signo){ exit(signo); } +// SIGUSR1 handler - re-read Tadj file +void refreshAdj(_U_ int signo){ + DBG("refresh adj"); + if(childpid){ // I am a master + putlog("Force child %d to re-read adj-file", childpid); + kill(childpid, SIGUSR1); + }else{ // I am a child + putlog("Re-read adj-file"); + read_adj_file(G->adjfilename); + } +} + int main(int argc, char **argv){ initial_setup(); - signal(SIGTERM, signals); // kill (-15) - quit - signal(SIGHUP, SIG_IGN); // hup - ignore - signal(SIGINT, signals); // ctrl+C - quit - signal(SIGQUIT, signals); // ctrl+\ - quit - signal(SIGTSTP, SIG_IGN); // ignore ctrl+Z G = parse_args(argc, argv); if(G->rest_pars_num) openlogfile(G->rest_pars[0]); if(G->makegraphs && !G->savepath){ ERRX(_("Point the path to graphical files")); } - #ifndef EBUG - if(daemon(1, 0)){ - ERR("daemon()"); + DBG("t=%d", G->testadjfile); + int raf = read_adj_file(G->adjfilename); + pid_t runningproc = check4running(G->pidfilename); + if(G->testadjfile){ + if(raf == 0){ + green("Format of file %s is right\n", G->adjfilename); + if(runningproc){ // fore running process to re-read it + kill(runningproc, SIGUSR1); + } + return 0; + } + return 1; } - while(1){ // guard for dead processes - pid_t childpid = fork(); - if(childpid){ - putlog("create child with PID %d\n", childpid); - DBG("Created child with PID %d\n", childpid); - wait(NULL); - putlog("child %d died\n", childpid); - WARNX("Child %d died\n", childpid); - sleep(1); - }else{ - prctl(PR_SET_PDEATHSIG, SIGTERM); // send SIGTERM to child when parent dies - break; // go out to normal functional + if(runningproc) ERRX("Found running process, pid=%d.", runningproc); + signal(SIGTERM, signals); // kill (-15) - quit + signal(SIGHUP, SIG_IGN); // hup - ignore + signal(SIGINT, signals); // ctrl+C - quit + signal(SIGQUIT, signals); // ctrl+\ - quit + signal(SIGTSTP, SIG_IGN); // ignore ctrl+Z + signal(SIGUSR1, refreshAdj); // refresh adjustements + #ifndef EBUG + if(!G->terminal){ + if(daemon(1, 0)){ + ERR("daemon()"); + } + while(1){ // guard for dead processes + childpid = fork(); + if(childpid){ + putlog("create child with PID %d\n", childpid); + DBG("Created child with PID %d\n", childpid); + wait(NULL); + putlog("child %d died\n", childpid); + WARNX("Child %d died\n", childpid); + sleep(1); + }else{ + prctl(PR_SET_PDEATHSIG, SIGTERM); // send SIGTERM to child when parent dies + break; // go out to normal functional + } } } #endif diff --git a/src/netdaemon/sens_place.c b/src/netdaemon/sens_place.c index ecfddb7..26bc19f 100644 --- a/src/netdaemon/sens_place.c +++ b/src/netdaemon/sens_place.c @@ -19,6 +19,7 @@ #include "sens_place.h" #include "stdbool.h" #include "usefull_macros.h" +#include "math.h" // fabs /** Sensor place Dt X Y Z @@ -104,97 +105,96 @@ 571 18 0.02 13 3 0 */ -static const sensor_data sensors[] = { +static sensor_data sensors[NSENSORS] = { // {Dt,X,Y,Z}, - {-0.07, 19, 7, 0}, // 0 - {0.03, 20, 0, 0}, // 1 - {0.03, 19, -7, 0}, // 2 - {-0.05, 17, -10, 1}, // 3 - {0.02, 17, -22, 0}, // 4 - {-0.03, 15, -13, 0}, // 5 - {0.02, 22, -17, 0}, // 6 - {-0.09, 24, -14, 1}, // 7 - {0.03, 25, -10, 0}, // 8 - {0.02, 27, -4, 0}, // 9 - {-0.01, 27, 4, 0}, // 10 - {-0.09, 25, 10, 0}, // 11 - {0.07, 22, 17, 0}, // 12 - {0, 24, 14, 1}, // 13 - {0.02, 10, 25, 0}, // 14 - {0.08, 17, 22, 0}, // 15 - {-0.01, 4, 27, 0}, // 16 - {-0.03, 0, 27, 1}, // 17 - {0.04, -4, 27, 0}, // 18 - {-0.01, -10, 25, 0}, // 19 - {-0.02, -17, 22, 0}, // 20 - {-0.04, -22, 17, 0}, // 21 - {0.03, -25, 10, 0}, // 22 - {-0.03, -24, 14, 1}, // 23 - {-0.03, -27, -4, 0}, // 24 - {0.03, -27, 4, 0}, // 25 - {-0.05, -25, -10, 0}, // 26 - {0, -24, -14, 1}, // 27 - {0.03, -22, -17, 0}, // 28 - {-0.05, -17, -22, 0}, // 29 - {-0.02, -10, -25, 0}, // 30 - {0.04, -4, -27, 0}, // 31 - {0.12, -3, -20, 0}, // 32 - {0, -10, -17, 0}, // 33 - {-0.08, -15, -13, 0}, // 34 - {-0.08, -17, -10, 1}, // 35 - {-0.1, -19, -7, 0}, // 36 - {-0.04, -20, 0, 0}, // 37 - {-0.08, -19, 7, 0}, // 38 - {0.03, -17, 10, 1}, // 39 - {0.11, -15, 13, 0}, // 40 - {0.07, -10, 17, 0}, // 41 - {0.09, -3, 20, 0}, // 42 - {-0.09, 0, 20, 1}, // 43 - {-0.1, 3, 20, 0}, // 44 - {0.04, 10, 17, 0}, // 45 - {0.05, 15, 13, 0}, // 46 - {-0.04, 17, 10, 1}, // 47 - {0.01, 9, 9, 0}, // 48 - {-0.04, 11, 7, 1}, // 49 - {0.01, 3, 13, 0}, // 50 - {-0.04, 0, 13, 1}, // 51 - {0.14, -9, 9, 0}, // 52 - {0, -3, 13, 0}, // 53 - {0.07, -13, 3, 0}, // 54 - {-0.02, -11, 7, 1}, // 55 - {0.04, -13, -3, 0}, // 56 - {-0.06, -11, -7, 1}, // 57 - {0.01, -9, -9, 0}, // 58 - {0.08, -3, -13, 0}, // 59 - {-0.09, 3, -13, 0}, // 60 - {-0.04, 0, -13, 1}, // 61 - {0.06, 3, -20, 0}, // 62 - {-0.05, 0, -20, 1}, // 63 - {0.05, 4, -27, 0}, // 64 - {-0.08, 0, -27, 1}, // 65 - {0.1, 10, -17, 0}, // 66 - {-0.05, 10, -25, 0}, // 67 - {0, 9, -9, 0}, // 68 - {0.01, 11, -7, 1}, // 69 - {0, 3, -5, 0}, // 70 - {-0.02, 0, -6, 1}, // 71 - {0.05, -3, -5, 0}, // 72 - {-0.03, -6, 0, 0}, // 73 - {0.03, -3, 5, 0}, // 74 - {0.06, 0, 6, 1}, // 75 - {0, 3, 5, 0}, // 76 - {-0.06, 6, 0, 0}, // 77 - {-0.07, 13, -3, 0}, // 78 - {0.02, 13, 3, 0}, // 79 + {-0.07, 19, 7, 0, 0}, // 0 + {0.03, 20, 0, 0, 0}, // 1 + {0.03, 19, -7, 0, 0}, // 2 + {-0.05, 17, -10, 1, 0}, // 3 + {0.02, 17, -22, 0, 0}, // 4 + {-0.03, 15, -13, 0, 0}, // 5 + {0.02, 22, -17, 0, 0}, // 6 + {-0.09, 24, -14, 1, 0}, // 7 + {0.03, 25, -10, 0, 0}, // 8 + {0.02, 27, -4, 0, 0}, // 9 + {-0.01, 27, 4, 0, 0}, // 10 + {-0.09, 25, 10, 0, 0}, // 11 + {0.07, 22, 17, 0, 0}, // 12 + {0, 24, 14, 1, 0}, // 13 + {0.02, 10, 25, 0, 0}, // 14 + {0.08, 17, 22, 0, 0}, // 15 + {-0.01, 4, 27, 0, 0}, // 16 + {-0.03, 0, 27, 1, 0}, // 17 + {0.04, -4, 27, 0, 0}, // 18 + {-0.01, -10, 25, 0, 0}, // 19 + {-0.02, -17, 22, 0, 0}, // 20 + {-0.04, -22, 17, 0, 0}, // 21 + {0.03, -25, 10, 0, 0}, // 22 + {-0.03, -24, 14, 1, 0}, // 23 + {-0.03, -27, -4, 0, 0}, // 24 + {0.03, -27, 4, 0, 0}, // 25 + {-0.05, -25, -10, 0, 0}, // 26 + {0, -24, -14, 1, 0}, // 27 + {0.03, -22, -17, 0, 0}, // 28 + {-0.05, -17, -22, 0, 0}, // 29 + {-0.02, -10, -25, 0, 0}, // 30 + {0.04, -4, -27, 0, 0}, // 31 + {0.12, -3, -20, 0, 0}, // 32 + {0, -10, -17, 0, 0}, // 33 + {-0.08, -15, -13, 0, 0}, // 34 + {-0.08, -17, -10, 1, 0}, // 35 + {-0.1, -19, -7, 0, 0}, // 36 + {-0.04, -20, 0, 0, 0}, // 37 + {-0.08, -19, 7, 0, 0}, // 38 + {0.03, -17, 10, 1, 0}, // 39 + {0.11, -15, 13, 0, 0}, // 40 + {0.07, -10, 17, 0, 0}, // 41 + {0.09, -3, 20, 0, 0}, // 42 + {-0.09, 0, 20, 1, 0}, // 43 + {-0.1, 3, 20, 0, 0}, // 44 + {0.04, 10, 17, 0, 0}, // 45 + {0.05, 15, 13, 0, 0}, // 46 + {-0.04, 17, 10, 1, 0}, // 47 + {0.01, 9, 9, 0, 0}, // 48 + {-0.04, 11, 7, 1, 0}, // 49 + {0.01, 3, 13, 0, 0}, // 50 + {-0.04, 0, 13, 1, 0}, // 51 + {0.14, -9, 9, 0, 0}, // 52 + {0, -3, 13, 0, 0}, // 53 + {0.07, -13, 3, 0, 0}, // 54 + {-0.02, -11, 7, 1, 0}, // 55 + {0.04, -13, -3, 0, 0}, // 56 + {-0.06, -11, -7, 1, 0}, // 57 + {0.01, -9, -9, 0, 0}, // 58 + {0.08, -3, -13, 0, 0}, // 59 + {-0.09, 3, -13, 0, 0}, // 60 + {-0.04, 0, -13, 1, 0}, // 61 + {0.06, 3, -20, 0, 0}, // 62 + {-0.05, 0, -20, 1, 0}, // 63 + {0.05, 4, -27, 0, 0}, // 64 + {-0.08, 0, -27, 1, 0}, // 65 + {0.1, 10, -17, 0, 0}, // 66 + {-0.05, 10, -25, 0, 0}, // 67 + {0, 9, -9, 0, 0}, // 68 + {0.01, 11, -7, 1, 0}, // 69 + {0, 3, -5, 0, 0}, // 70 + {-0.02, 0, -6, 1, 0}, // 71 + {0.05, -3, -5, 0, 0}, // 72 + {-0.03, -6, 0, 0, 0}, // 73 + {0.03, -3, 5, 0, 0}, // 74 + {0.06, 0, 6, 1, 0}, // 75 + {0, 3, 5, 0, 0}, // 76 + {-0.06, 6, 0, 0, 0}, // 77 + {-0.07, 13, -3, 0, 0}, // 78 + {0.02, 13, 3, 0, 0}, // 79 }; - /** - * @brief get_sensor_location - return pointer to sensor_data for given sensor + * @brief get_sensor_location - search given sensor in `sensors` table * @param Nct - controller number * @param Nch - channel number * @param Ns - sensor number - * @return + * @return pointer to sensor_data for given sensor */ const sensor_data *get_sensor_location(int Nct, int Nch, int Ns){ if(Nct < 1 || Nct > NCTRLR_MAX || Nch > NCHANNEL_MAX || Ns > 1){ @@ -204,6 +204,106 @@ const sensor_data *get_sensor_location(int Nct, int Nch, int Ns){ int idx = 2*(NCHANNEL_MAX+1)*(Nct - 1) + 2*Nch + Ns; DBG("Sensor code %d%d%d (idx=%d):\n", Nct, Nch, Ns, idx); const sensor_data *s = sensors + idx; - DBG("\tdT=%g; coords=(%d, %d, %d)\n", s->dt, s->X, s->Y, s->Z); + DBG("\tdT=%g (adj:%g); coords=(%d, %d, %d)\n", s->dt, s->Tadj, s->X, s->Y, s->Z); return s; } + +// return next non-space character in line until first '\n' or NULL if met '#' or '\n' +static char *omitspaces(char *str){ + char ch; + do{ + ch = *str; + if(!ch) return NULL; // EOL + if(ch == ' ' || ch == '\t'){ + ++str; + continue; + } + if(ch == '#' || ch == '\n'){ + return NULL; // comment + } + return str; + }while(1); + return NULL; +} + +/** + * @brief read_adj_file - try to read file with thermal adjustments + * @param fname - filename + * @return 0 if all OK + * thermal adjustments file should have simple structure: + * No of sensor (like in output format, e.g. 561) and Tcorr value (Treal = T - Tcorr) + * all data after # ignored + */ +int read_adj_file(char *fname){ + double Tadj[NSENSORS] = {0,}; + if(!fname){ + WARNX("read_adj_file(): filename missing"); + return 1; + } + mmapbuf *buf = My_mmap(fname); + if(!buf) return 1; + char *adjf = buf->data, *eof = adjf + buf->len; + DBG("buf: %s", adjf); + int strnum = 1; // start string number from 1 + while(adjf < eof){ + char *eol = strchr(adjf, '\n'); + char *nextchar = omitspaces(adjf); + if(!nextchar){ + goto cont; + } + DBG("First char: %c", *nextchar); + char *endptr = NULL; + long num = strtol(nextchar, &endptr, 10); + if(endptr == nextchar || !endptr){ + WARNX("Wrong integer number!"); + goto reperr; + } + DBG("first num: %ld", num); + int Nctrl = num / 100; + int Nch = (num - Nctrl*100) / 10; + int Nsen = num%10; + DBG("Nc=%d, Nch=%d, NS=%d", Nctrl, Nch, Nsen); + if(num < 0 || (Nsen != 0 && Nsen != 1) || (Nch < 0 || Nch > NCHANNEL_MAX) || (Nctrl < 1 || Nctrl > NCTRLR_MAX)){ + WARNX("Wrong sensor number: %ld", num); + goto reperr; + } + int idx = 2*(NCHANNEL_MAX+1)*(Nctrl - 1) + 2*Nch + Nsen; + DBG("index: %d", idx); + if(idx < 0 || idx > NSENSORS-1){ + WARNX("Sensor index (%d) over range 0..%d", idx, NSENSORS-1); + } + nextchar = omitspaces(endptr); + if(!nextchar){ + WARNX("There's no temperature data after sensor's number"); + goto reperr; + } + double t = strtod(nextchar, &endptr); + if(endptr == nextchar || !endptr){ + WARNX("Wrong double number!"); + goto reperr; + } + DBG("double num: %g", t); + Tadj[idx] = t; + if(omitspaces(endptr)){ + WARNX("Wrong file format: each string should include two numbers (and maybe comment after #)"); + goto reperr; + } +cont: + if(!eol) break; + adjf = eol + 1; + ++strnum; + } + My_munmap(buf); + for(int i = 0; i < NSENSORS; ++i){ + if(fabs(Tadj[i]) > DBL_EPSILON){ + printf("Tadj[%d] = %g\n", i, Tadj[i]); + } + sensors[i].Tadj = Tadj[i]; + } + return 0; +reperr: + red("Error in string %d:\n", strnum); + printf("%s\n", adjf); + putlog("Erroneous log file %s in line %d", fname, strnum); + return 1; +} diff --git a/src/netdaemon/sens_place.h b/src/netdaemon/sens_place.h index ead4524..08abc00 100644 --- a/src/netdaemon/sens_place.h +++ b/src/netdaemon/sens_place.h @@ -23,14 +23,19 @@ #define NCTRLR_MAX (5) // max number of channel #define NCHANNEL_MAX (7) +// total amount of sensors @ the mirror +#define NSENSORS (NCTRLR_MAX*2*(NCHANNEL_MAX+1)) typedef struct{ float dt; int X; int Y; int Z; + float Tadj; } sensor_data; const sensor_data *get_sensor_location(int Nct, int Nch, int Ns); +int read_adj_file(char *fname); + #endif // SENS_PLACE_H__ diff --git a/src/netdaemon/socket.c b/src/netdaemon/socket.c index 27f1f30..ebd9201 100644 --- a/src/netdaemon/socket.c +++ b/src/netdaemon/socket.c @@ -282,10 +282,10 @@ Item quick_select(Item *idata, int n){ static void process_T(){ int i, N, p, Num = 0; time_t tmeasmax = 0; - double arr[128]; + double arr[NSENSORS]; // mean temperatures over 15 scans static double Tmean[2][NCHANNEL_MAX+1][NCTRLR_MAX+1]; - static int Nmean; // amount of measurements for Tmean + static int Nmean[2][NCHANNEL_MAX+1][NCTRLR_MAX+1], Nmeanmax; // amount of measurements for Tmean // get statistics poll_sensors(0); // poll N2 // scan over controllers on mirror & calculate median @@ -304,32 +304,35 @@ static void process_T(){ } // calculate mean double Tmed = quick_select(arr, Num); - double Tbot = Tmed - 3., Ttop = Tmed + 3.; + double Tbot = Tmed - 10., Ttop = Tmed + 10.; DBG("Got %d values, Tmed=%g", Num, Tmed); - // throw out all more than +-3degrC and calculate meanT + // throw out all more than +-10degrC and calculate meanT Num = 0; double Tsum = 0.; for(i = 1; i <= NCTRLR_MAX; ++i){ for(p = 0; p < 2; ++p) for(N = 0; N <= NCHANNEL_MAX; ++N){ double T = t_last[p][N][i]; - if(T > Ttop || T < Tbot || tmeasmax - tmeasured[p][N][i] > 1800){ + if(T > Ttop || T < Tbot || tmeasmax - tmeasured[p][N][i] > 1800){ // not longer than 3 minutes ago! t_last[p][N][i] = -300.; - Tmean[p][N][i] = -3e9; }else{ ++Num; Tsum += T; Tmean[p][N][i] += T; + ++Nmean[p][N][i]; } } } // make graphics if(G->savepath){ - if(++Nmean == GRAPHS_AMOUNT){ - for(i = 1; i <= NCTRLR_MAX; ++i)for(p = 0; p < 2; ++p)for(N = 0; N <= NCHANNEL_MAX; ++ N){ - Tmean[p][N][i] /= Nmean; + if(++Nmeanmax == GRAPHS_AMOUNT){ + for(i = 1; i <= NCTRLR_MAX; ++i)for(N = 0; N <= NCHANNEL_MAX; ++ N)for(p = 0; p < 2; ++p){ + if(Nmean[p][N][i]){ + Tmean[p][N][i] /= Nmean[p][N][i]; + Nmean[p][N][i] = 0; + }else Tmean[p][N][i] = -300.; // no data } plot(Tmean, G->savepath); memset(Tmean, 0, sizeof(double)*2*(NCTRLR_MAX+1)*(NCHANNEL_MAX+1)); - Nmean = 0; + Nmeanmax = 0; } } meanT = Tsum / Num; @@ -384,7 +387,7 @@ static void daemon_(int sock){ buf = &ptrs[sdata->Z]; len = &lens[sdata->Z]; // iNp x y T(corrected) time l = snprintf(*buf, *len, "%d%d%d\t%d\t%d\t%.2f\t%ld\n", i, N, p, - sdata->X, sdata->Y, T - sdata->dt, tmeasured[p][N][i]); + sdata->X, sdata->Y, T - sdata->dt - sdata->Tadj, tmeasured[p][N][i]); } *len -= l; *buf += l; diff --git a/src/netdaemon/tempadj.txt b/src/netdaemon/tempadj.txt new file mode 100644 index 0000000..cb482e1 --- /dev/null +++ b/src/netdaemon/tempadj.txt @@ -0,0 +1,6 @@ +#No dT (Treal = T - dT) +100 -0.02 +101 3. +# some more comments + 560 -0.06 # another comment +571 -0.01 # test diff --git a/src/netdaemon/term.c b/src/netdaemon/term.c index d5a4081..48796e8 100644 --- a/src/netdaemon/term.c +++ b/src/netdaemon/term.c @@ -133,7 +133,7 @@ static int parse_answer(char *buf, int N){ //DBG("sensor #%d", v); //if(v < 0 || v > 81) return 0; i = v/10; v -= i*10; - if(i < 0 || i > NCTRLR_MAX) return 0; + if(i < 0 || i > NCHANNEL_MAX) return 0; //DBG("i=%d, v=%d", i,v); if((v & 1) != v) return 0; // should be only 0 or 1 if(*buf != '=' ) return 0; @@ -144,6 +144,7 @@ static int parse_answer(char *buf, int N){ return 0; } t_last[v][i][N] = ((double)T) / 100.; + DBG("T(%d_%d%d)=%g", N, i, v, T/100.); tmeasured[v][i][N] = time(NULL); return 1; } @@ -196,7 +197,7 @@ int poll_sensors(int N){ } int ngot = 0; double t0 = dtime(); - while(dtime() - t0 < T_POLLING_TMOUT && ngot < 16){ // timeout reached or got data from all + while(dtime() - t0 < T_POLLING_TMOUT && ngot < 2*(NCHANNEL_MAX+1)){ // timeout reached or got data from all if((ans = read_string())){ // parse new data //DBG("got %s", ans); if(*ans == CMD_MEASURE_T){ // data from sensor diff --git a/src/netdaemon/usefull_macros.c b/src/netdaemon/usefull_macros.c index 8e24425..30f07ab 100644 --- a/src/netdaemon/usefull_macros.c +++ b/src/netdaemon/usefull_macros.c @@ -204,7 +204,7 @@ mmapbuf *My_mmap(char *filename){ void My_munmap(mmapbuf *b){ if(munmap(b->data, b->len)){ /// "Не могу munmap" - ERR(_("Can't munmap")); + WARN(_("Can't munmap")); } FREE(b); } @@ -290,12 +290,12 @@ void restore_tty(){ #endif // init: void tty_init(char *comdev){ - DBG("\nOpen port %s ...\n", comdev); + DBG("\nOpen port %s ...", comdev); do{ comfd = open(comdev,O_RDWR|O_NOCTTY|O_NONBLOCK); }while (comfd == -1 && errno == EINTR); if(comfd < 0){ - WARN("Can't use port %s\n",comdev); + WARN("Can't use port %s",comdev); signals(-1); // quit? } // make exclusive open @@ -321,7 +321,7 @@ void tty_init(char *comdev){ WARN(_("Can't set settings")); signals(-1); } - DBG(" OK\n"); + DBG(" OK"); } /**