[SX126x] Fixed incorrect variable names
This commit is contained in:
parent
265847b82d
commit
0818230a7c
3 changed files with 6 additions and 5 deletions
|
@ -79,7 +79,8 @@ void loop() {
|
||||||
Serial.print(F("[SX1262] Starting spectral scan ... "));
|
Serial.print(F("[SX1262] Starting spectral scan ... "));
|
||||||
|
|
||||||
// start spectral scan
|
// start spectral scan
|
||||||
// number of bands: 2048 (fewer bands = better temporal resolution)
|
// number of scans in each line is 2048
|
||||||
|
// fewer scans leads to better temporal resolution,
|
||||||
int state = radio.spectralScanStart(2048);
|
int state = radio.spectralScanStart(2048);
|
||||||
if(state == RADIOLIB_ERR_NONE) {
|
if(state == RADIOLIB_ERR_NONE) {
|
||||||
Serial.println(F("success!"));
|
Serial.println(F("success!"));
|
||||||
|
|
|
@ -1427,7 +1427,7 @@ int16_t SX126x::uploadPatch(const uint32_t* patch, size_t len, bool nonvolatile)
|
||||||
return(state);
|
return(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t SX126x::spectralScanStart(uint16_t numBands, uint8_t window, uint8_t interval) {
|
int16_t SX126x::spectralScanStart(uint16_t numScans, uint8_t window, uint8_t interval) {
|
||||||
// abort first - not sure if this is strictly needed, but the example code does this
|
// abort first - not sure if this is strictly needed, but the example code does this
|
||||||
spectralScanAbort();
|
spectralScanAbort();
|
||||||
|
|
||||||
|
@ -1439,7 +1439,7 @@ int16_t SX126x::spectralScanStart(uint16_t numBands, uint8_t window, uint8_t int
|
||||||
RADIOLIB_ASSERT(state);
|
RADIOLIB_ASSERT(state);
|
||||||
|
|
||||||
// now set the actual spectral scan parameters
|
// now set the actual spectral scan parameters
|
||||||
uint8_t data[3] = { (uint8_t)((numBands >> 8) & 0xFF), (uint8_t)(numBands & 0xFF), interval };
|
uint8_t data[3] = { (uint8_t)((numScans >> 8) & 0xFF), (uint8_t)(numScans & 0xFF), interval };
|
||||||
return(_mod->SPIwriteStream(RADIOLIB_SX126X_CMD_SET_SPECTR_SCAN_PARAMS, data, 3));
|
return(_mod->SPIwriteStream(RADIOLIB_SX126X_CMD_SET_SPECTR_SCAN_PARAMS, data, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1078,7 +1078,7 @@ class SX126x: public PhysicalLayer {
|
||||||
/*!
|
/*!
|
||||||
\brief Start spectral scan. Requires binary path to be uploaded.
|
\brief Start spectral scan. Requires binary path to be uploaded.
|
||||||
|
|
||||||
\param numBands Number of bands for the scan. Fewer bands = better temporal resolution, but fewer power samples.
|
\param numScans Number of scans for each iteration. Fewer scans = better temporal resolution, but fewer power samples.
|
||||||
|
|
||||||
\param window RSSI averaging window size.
|
\param window RSSI averaging window size.
|
||||||
|
|
||||||
|
@ -1086,7 +1086,7 @@ class SX126x: public PhysicalLayer {
|
||||||
|
|
||||||
\returns \ref status_codes
|
\returns \ref status_codes
|
||||||
*/
|
*/
|
||||||
int16_t spectralScanStart(uint16_t numBands, uint8_t window = RADIOLIB_SX126x_SPECTRAL_SCAN_WINDOW_DEFAULT, uint8_t interval = RADIOLIB_SX126X_SCAN_INTERVAL_8_20_US);
|
int16_t spectralScanStart(uint16_t numScans, uint8_t window = RADIOLIB_SX126x_SPECTRAL_SCAN_WINDOW_DEFAULT, uint8_t interval = RADIOLIB_SX126X_SCAN_INTERVAL_8_20_US);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Abort an ongoing spectral scan.
|
\brief Abort an ongoing spectral scan.
|
||||||
|
|
Loading…
Add table
Reference in a new issue