Skip to content

Commit

Permalink
f TXix CF32
Browse files Browse the repository at this point in the history
  • Loading branch information
paulh002 committed Jan 22, 2023
1 parent ba030b5 commit 215ea2c
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion SoapyRadioberry-Release.vgdbsettings
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</CustomSourceDirectories>
<AutoProgramSPIFFSPartition>true</AutoProgramSPIFFSPartition>
<BuildHost>
<HostName>192.168.88.47</HostName>
<HostName>192.168.88.24</HostName>
<Transport>SSH</Transport>
<UserName>pi</UserName>
</BuildHost>
Expand Down
2 changes: 1 addition & 1 deletion SoapyRadioberry.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<TargetName>libSoapyRadioberrySDR</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|VisualGDB'">
<RemoteBuildHost>192.168.88.47</RemoteBuildHost>
<RemoteBuildHost>192.168.88.24</RemoteBuildHost>
<ToolchainID>com.sysprogs.toolchain.default-gcc</ToolchainID>
<ToolchainVersion />
<GNUTargetType>DynamicLibrary</GNUTargetType>
Expand Down
11 changes: 10 additions & 1 deletion SoapyRadioberrySettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,18 @@ SoapyRadioberry::SoapyRadioberry( const SoapySDR::Kwargs &args ){
SoapySDR_setLogLevel(SOAPY_SDR_INFO);
SoapySDR_log(SOAPY_SDR_INFO, "SoapyRadioberry::SoapyRadioberry constructor called");
mox = false;
i2c_available = false;
no_channels = 1;
fd_rb = open("/dev/radioberry", O_RDWR);
try
{
i2c_ptr = std::make_unique<rpihw::driver::i2c>(rpihw::driver::i2c("/dev/i2c-1"));
i2c_available = true;
}
catch (std::string s)
{
printf("I2c not found %s", s.c_str());
i2c_available = false;
}
}

SoapyRadioberry::~SoapyRadioberry(void)
Expand Down
3 changes: 2 additions & 1 deletion SoapyRadioberryStreaming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ SoapySDR::Stream *SoapyRadioberry::setupStream(
if (format == SOAPY_SDR_CF32) {
SoapySDR_log(SOAPY_SDR_INFO, "Using format CF32.");
ptr->set_stream_format(RADIOBERRY_SDR_CF32);
mox = true;
}
else if(format == SOAPY_SDR_CS16 && direction == SOAPY_SDR_TX)
{
Expand Down Expand Up @@ -202,7 +203,7 @@ int SoapyRadioberry::readStream(
itarget_buffer[iq++] = (int16_t)(right_sample >> 8); // 16 bit sample
}
}
//printf("nr_samples %d sample: %d %d \n", nr_samples, left_sample, right_sample);
//printf("nr_samples %d sample: %f %f \n", nr_samples, (float)left_sample / 8388608.0, (float)right_sample / 8388608.0);
}
return (npackages * nr_samples); //return the number of IQ samples
}
Expand Down
Binary file modified driver/radioberry.rbf
Binary file not shown.
Binary file added driver/radioberry_old.rbf
Binary file not shown.

0 comments on commit 215ea2c

Please sign in to comment.