From 19174f581bcfe09e84cbfe60d7b3240b9c56989c Mon Sep 17 00:00:00 2001 From: Alexander Chemeris Date: Sat, 18 Jun 2016 11:16:54 +0300 Subject: radioInterface: Initialize power scale with a meaningful default. Right now if you forget to send "POWER" control command, osmo-trx will transmitt zeros. This is counter-intuitive and I've spent several hours debugging this "issue". The issue may happen easily, because osmo-bts doesn't send "POWER" command if there is no "power" setting in the configuration file. Given that "POWER" command actually sets attenuation, it's percieved as optional and in absence of it should default to "POWER 0" (no attenuation), which translates to power scale being 1.0. Signed-off-by: Tom Tsou --- Transceiver52M/radioInterface.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Transceiver52M') diff --git a/Transceiver52M/radioInterface.cpp b/Transceiver52M/radioInterface.cpp index 7256b9b..b719c94 100644 --- a/Transceiver52M/radioInterface.cpp +++ b/Transceiver52M/radioInterface.cpp @@ -70,6 +70,8 @@ bool RadioInterface::init(int type) convertSendBuffer[i] = new short[sendBuffer[i]->size() * 2]; convertRecvBuffer[i] = new short[recvBuffer[i]->size() * 2]; + + powerScaling[i] = 1.0; } sendCursor = 0; -- cgit v1.2.3