From f415f409dedf3bd85837a0c187a4a8f3c7f0c737 Mon Sep 17 00:00:00 2001 From: Jamie Mazer Date: Fri, 30 Mar 2018 16:53:23 -0600 Subject: [PATCH] - added and tested better mac support.. at least it's tested :-) --- README.md | 22 +++++++++++---------- lj-python-setup.sh => linux-python-setup.sh | 0 mac-lj-python-setup.sh | 22 +++++++++++++++++++++ 3 files changed, 34 insertions(+), 10 deletions(-) rename lj-python-setup.sh => linux-python-setup.sh (100%) create mode 100644 mac-lj-python-setup.sh diff --git a/README.md b/README.md index 4eb8e48..f9e9025 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,14 @@ USB device using LabJack's supplied tools to do continuous analog sampling and digital I/O sync'd to the host computer's clock (to within 1 ms precision). -*Only tested under Linux!* Timing measuresment validated against a -Measurement Computing PCIe-DAS1062/16 using `comedi`. +Tested under Linux (Mint 18.2) and OSX (10.12.6 Sierra). Timing +measurements validated against a Measurement Computing PCIe-DAS1062/16 +sing `comedi` under linux (only). -To setup and use you should run the lj-python-setup.sh script to -install current versions of the LabJack drivers. This is a fully -automated script that needs to be run as root: +To setup and use you should run either {mac,linux}=lj-python-setup.sh +script to install current versions of the LabJack drivers if they're not +already installed. These are fully automated scripts that needs to be +run as root: % sudo sh ./lj-python-setup.sh @@ -23,10 +25,10 @@ the data to stdout. If you're using this -- it's not a bad idea to sample for 10ms or as soon as the labjack module is imported to initialize all the -code. Otherwise, you can get some lag the first time the acquisition -is started. Pretty sure this has something to do with delayed loading -of `librt` by `ctypes` monoclock.py - it's not actually loaded until -it's used, or something like that. - +code. Otherwise, it looks like you can get some lag the first time +the acquisition is started. I'm pretty sure this has something to do +with delayed loading of `librt` by `ctypes` in the monotonic clock +function. This problem could be gone, but not worth testing right +now. diff --git a/lj-python-setup.sh b/linux-python-setup.sh similarity index 100% rename from lj-python-setup.sh rename to linux-python-setup.sh diff --git a/mac-lj-python-setup.sh b/mac-lj-python-setup.sh new file mode 100644 index 0000000..f33accf --- /dev/null +++ b/mac-lj-python-setup.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# complete installation of labjack-python support for mac osx + +wget --no-check-certificate https://labjack.com/sites/default/files/software/Exodriver_NativeUSB_Setup.zip +unzip -l Exodriver_NativeUSB_Setup.zip +unzip Exodriver_NativeUSB_Setup.zip +open Exodriver_NativeUSB_Setup.pkg + +git clone https://github.com/labjack/LabJackPython.git +cd LabJackPython +python ./setup.py install +cd .. + +rm -rf LabJackPython Exodriver_NativeUSB_Setup.* __MACOSX + +cat <