ms: adjust tx scaling for tx samples

The "safe" scaling factor introduced in
7ac54b10d3 is too low and dates back to
the beginning and the move from usrp1->uhd, but the modulator will
exceed +-1 so "proper" scaling leads to overflows. Let's just do what
osmotrx has been doing for many years...

Change-Id: I75a2eba1f7f7b81249c06ce3fc9dfeee08878cb9
This commit is contained in:
Eric Wild 2023-03-02 17:46:49 +01:00
parent c9af0b0ba0
commit 097a16e384
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ void tx_test(ms_trx *t, ts_hitter_q_t *q, unsigned int *tsc)
pthread_setschedparam(pthread_self(), SCHED_FIFO, &sch_params);
auto burst = genRandAccessBurst(0, 4, 0);
scaleVector(*burst, t->txFullScale * 0.7);
scaleVector(*burst, t->txFullScale);
// float -> int16
blade_sample_type burst_buf[burst->size()];

View File

@ -82,7 +82,7 @@ template <typename T> struct uhd_hw {
{
delete[] one_pkt_buf;
}
uhd_hw() : rxFullScale(32767), txFullScale(32767), rxtxdelay(-67)
uhd_hw() : rxFullScale(32767), txFullScale(32767 * 0.3), rxtxdelay(-67)
{
}