From b7ef3ae7c2c72c425160b8f3271cf569b410c31e Mon Sep 17 00:00:00 2001 From: shimnex <6569788+shimnex@users.noreply.github.com> Date: Fri, 10 Dec 2021 21:49:22 -0500 Subject: [PATCH] Print SPI clockSpeed Print SPI clockSpeed in printDetails method. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index c71d052..53b466a 100644 --- a/index.js +++ b/index.js @@ -623,7 +623,7 @@ exports.connect = function (spi,ce,irq) { nrf.printDetails = function (cb) { // for debugging, mimic e.g. https://github.com/stanleyseow/RF24/blob/master/librf24-rpi/librf24/RF24.cpp#L318 if (!cb) cb = _nop; console.log("SPI device:\t",_spi); - //console.log("SPI speed:\t",'?'); + console.log("SPI speed:\t",spi.clockSpeed()); console.log("CE GPIO:\t",_ce); console.log("IRQ GPIO:\t",_irq); nrf.getStates(['STATUS','RX_DR','TX_DS','MAX_RT','RX_P_NO','TX_FULL'], function (e,d) { @@ -680,4 +680,4 @@ exports.connect = function (spi,ce,irq) { nrf.on('interrupt', function (d) { if (nrf._debug) console.log("IRQ.", d); }); return nrf; -} \ No newline at end of file +}