Skip to content

Commit

Permalink
TX update
Browse files Browse the repository at this point in the history
  • Loading branch information
paulh002 committed Sep 9, 2021
1 parent cd4ed97 commit edcdf1c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 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.89.252</HostName>
<HostName>192.168.88.81</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.89.252</RemoteBuildHost>
<RemoteBuildHost>192.168.88.81</RemoteBuildHost>
<ToolchainID>com.sysprogs.toolchain.default-gcc</ToolchainID>
<ToolchainVersion />
<GNUTargetType>DynamicLibrary</GNUTargetType>
Expand Down
17 changes: 8 additions & 9 deletions SoapyRadioberryStreaming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,25 +215,24 @@ int SoapyRadioberry::writeStream(SoapySDR::Stream *stream, const void * const *b
{
//printf("%x %x %x %x\n", (itarget_buffer[j] & 0xFF00) >> 8, (itarget_buffer[j] & 0x00FF), (itarget_buffer[j+1] & 0xFF00) >> 8, (itarget_buffer[j+1] & 0x00FF));

tx.i8TxBuffer[2] = (unsigned char)((itarget_buffer[j] & 0xff00) >> 8);
tx.i8TxBuffer[3] = (unsigned char)(itarget_buffer[j] & 0xff);
tx.i8TxBuffer[0] = (unsigned char)((itarget_buffer[j + 1] & 0xff00) >> 8);
tx.i8TxBuffer[1] = (unsigned char)(itarget_buffer[j + 1] & 0xff);

ret = write(fd_rb, &tx, sizeof(uint32_t));
tx.i8TxBuffer[0] = (unsigned char)((itarget_buffer[j] & 0xff00) >> 8);
tx.i8TxBuffer[1] = (unsigned char)(itarget_buffer[j] & 0xff);
tx.i8TxBuffer[2] = (unsigned char)((itarget_buffer[j + 1] & 0xff00) >> 8);
tx.i8TxBuffer[3] = (unsigned char)(itarget_buffer[j + 1] & 0xff);

ret = write(fd_rb, &tx, sizeof(uint32_t));
j += 2;
m_count++;
if (ret == 0)
{
//printf("radioberry buffer full\n");
usleep(19200); //50 samples sleep (1/48K about 20usec /sample * 50)
usleep(20000); //50 samples sleep (1/48K about 20usec /sample * 50)
}
if(m_count > 2048)
/*if(m_count > 2048)
{
m_count -= 1024;
usleep(19200); //64 samples sleep (1/48K about 20usec /sample * 64)
}
}*/
}
}
return numElems;
Expand Down

0 comments on commit edcdf1c

Please sign in to comment.