Features
SPI Communication Support
- Added new
lager spicommand for SPI (Serial Peripheral Interface) communication via LabJack T7 - Subcommands:
read,write,transfer,config - Supports all standard SPI parameters: mode (0-3), bit order (MSB/LSB), frequency, chip select polarity, word size (8/16/32-bit)
- Multiple output formats: hex, bytes, JSON
- Data input via hex string (
--data) or binary file (--data-file) - Automatic padding and truncation for transfer operations
SPI Python API
- New
SPINetclass accessible viaNet.get('my_spi', NetType.SPI) - Methods:
config(),read(),read_write(),transfer(),write() - Full-duplex read/write support with configurable chip select behavior
Bug Fixes
LabJack Handle Sharing
- Fixed an issue where GPIO operations would close the LabJack device and kill active SPI connections
- ADC, DAC, and GPIO modules now use a global shared handle manager instead of opening and closing per operation
- Added atexit cleanup handler to properly release hardware resources on process exit
Improvements
LabJack SPI Hardware Limitation Workaround
- Automatically forces 800kHz clock speed for SPI transactions of 3 or more bytes when a lower frequency is requested, due to a LabJack T7 hardware limitation
- Prints a warning when this override occurs so users are aware of the adjusted frequency
- LabJack T7 firmware 1.0332 or later is required for SPI support
Deployment
- Improved Lager Box deployment scripts

