From: Jens Steinhauser Date: Sun, 19 Oct 2014 19:45:16 +0000 (+0200) Subject: nrf24l01/gen-testfiles.py: Minor fix, use new sigrok-cli arguments. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=8e11d5a761a255c64e1ce87896e0bfc6231d3700;p=sigrok-dumps.git nrf24l01/gen-testfiles.py: Minor fix, use new sigrok-cli arguments. --- diff --git a/spi/nrf24l01/gen-testfiles.py b/spi/nrf24l01/gen-testfiles.py index 6377539..0e19603 100755 --- a/spi/nrf24l01/gen-testfiles.py +++ b/spi/nrf24l01/gen-testfiles.py @@ -40,8 +40,8 @@ class SPI: def add(self, mosi, miso): for _ in range(8): - mo = mosi & 0x80 - mi = miso & 0x80 + mo = (mosi & 0x80) >> 7 + mi = (miso & 0x80) >> 7 mosi <<= 1 miso <<= 1 self._data.append([0, 0, mo, mi]) @@ -57,7 +57,7 @@ class SPI: w.writerows(self._data) fn = '{}.sr'.format(self._filename) - I = 'csv:header=true:samplerate=1k' + I = 'csv:header=true:samplerate=1000' subprocess.check_call(['sigrok-cli', '-I', I, '-i', tf.name, '-o', fn]) spi = SPI('nrf24l01-test-activate')