Skip to content

Commit

Permalink
INDI Receiver and rtl-sdr (#1661)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia Platone committed May 28, 2022
1 parent 46d8e3b commit 3c6f767
Show file tree
Hide file tree
Showing 35 changed files with 4,988 additions and 1,002 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Expand Up @@ -403,6 +403,7 @@ ENDIF(OGGTHEORA_FOUND)
ENDIF(UNIX)

SET(libdsp_C_SRC
${CMAKE_CURRENT_SOURCE_DIR}/libs/dsp/fits.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/dsp/file.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/dsp/buffer.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/dsp/convert.c
Expand Down Expand Up @@ -2072,6 +2073,10 @@ if (INDI_BUILD_DRIVERS OR INDI_BUILD_CLIENT OR INDI_BUILD_QT5_CLIENT)
${CMAKE_CURRENT_SOURCE_DIR}/eventloop.h
${CMAKE_CURRENT_SOURCE_DIR}/indidriver.h
${CMAKE_CURRENT_SOURCE_DIR}/libs/dsp/dsp.h
${CMAKE_CURRENT_SOURCE_DIR}/libs/dsp/fits_extensions.h
${CMAKE_CURRENT_SOURCE_DIR}/libs/dsp/fits.h
${CMAKE_CURRENT_SOURCE_DIR}/libs/dsp/sdfits.h
${CMAKE_CURRENT_SOURCE_DIR}/libs/dsp/fitsidi.h
${CMAKE_CURRENT_SOURCE_DIR}/libs/indibase/pid/pid.h
${CMAKE_CURRENT_SOURCE_DIR}/libs/indibase/indibase.h
${CMAKE_CURRENT_SOURCE_DIR}/libs/indibase/indibasetypes.h
Expand Down
6 changes: 3 additions & 3 deletions drivers/receiver/indi_rtlsdr.cpp
Expand Up @@ -113,10 +113,10 @@ RTLSDR::RTLSDR(int32_t index)
char name[MAXINDIDEVICE];
snprintf(name, MAXINDIDEVICE, "%s %s%c", getDefaultName(), index < 0 ? "TCP" : "USB", index < 0 ? '\0' : index + '1');
setDeviceName(name);

// We set the Receiver capabilities
uint32_t cap = SENSOR_CAN_ABORT | SENSOR_HAS_STREAMING | SENSOR_HAS_DSP;
SetReceiverCapability(cap);

}

bool RTLSDR::Connect()
Expand Down Expand Up @@ -174,6 +174,7 @@ bool RTLSDR::initProperties()
setMinMaxStep("RECEIVER_SETTINGS", "RECEIVER_GAIN", 0.0, 25.0, 0.1, false);
setMinMaxStep("RECEIVER_SETTINGS", "RECEIVER_BANDWIDTH", 2.5e+5, 2.0e+6, 2.5e+5, false);
setMinMaxStep("RECEIVER_SETTINGS", "RECEIVER_BITSPERSAMPLE", 16, 16, 0, false);
setMinMaxStep("RECEIVER_SETTINGS", "RECEIVER_ANTENNA", 1, 1, 0, false);
setIntegrationFileExtension("fits");

// Add Debug, Simulator, and Configuration controls
Expand Down Expand Up @@ -391,8 +392,7 @@ void RTLSDR::grabData()
IntegrationComplete();
} else {
StartIntegration(1.0 / Streamer->getTargetFPS());
int32_t size = getBufferSize();
Streamer->newFrame(getBuffer(), size);
Streamer->newFrame(getBuffer(), getBufferSize());
}
}
}
Expand Down

0 comments on commit 3c6f767

Please sign in to comment.