promt user for path loss and analyzer name

- prompts user for path loss and analyzer name
- changing maximum atten value to 40 for now during bringup, this should probably be lower but need to gather more data to find good limit
This commit is contained in:
dsaha26
2019-01-15 09:56:04 -08:00
parent 0412118049
commit 069e52dc2e
3 changed files with 33 additions and 4 deletions

View File

@@ -30,6 +30,23 @@ if __name__ == '__main__':
# config_script_loader.load_config('CALIBRATION', '$DEFAULT')
context = config_loader.get_conf()
context.path_loss = raw_input("What is the path loss?")
print("\nUsing a path loss of " + context.path_loss + "db")
context.analyzer_name = "TCPIP0::K-N9030B-80108.local::hislip0::INSTR"
se = 'n'
while (se != 'y'):
print("\nUsing analyzer " + context.analyzer_name)
se = raw_input("Is this the correct analyzer?(y/n):")
if (se == 'y') or (se == 'Y'):
se = 'y'
print("\nWill use analyzer " + context.analyzer_name)
break
else:
context.analyzer_name = raw_input("Please enter the correct analyzer name:")
# context = config_script_loader.get_conf()
context.logger = create_logger()
context.server = serverinterface.LocalLaunchedServerInterface(port=5050)
@@ -45,6 +62,11 @@ if __name__ == '__main__':
# This clears /mnt/app if True
context.FLASH_CLEAR_APP = False
# COM PORT
from tools.lte.lte_comport import LTECOMServiceClient
# context.server.com = context.server.get_service_client_from_name('tools.lte.lte_comport.LTECOMServiceClient', url='com')
@@ -67,11 +89,15 @@ if __name__ == '__main__':
context.server.spectrum = context.server.get_service_client_from_name('KeysightEXASpectrumClient', url='spectrum')
# commenting out for now to test on analyzer later
# hislip is working for borrowed
context.server.spectrum.create_service("TCPIP0::K-N9030B-80108.local::hislip0::INSTR")
#context.server.spectrum.create_service("TCPIP0::K-N9030B-80108.local::hislip0::INSTR")
# NRG
# context.server.spectrum.create_service("TCPIP0::K-N9030B-41982.local::inst0::INSTR")
# system near door\
#context.server.spectrum.create_service("TCPIP0::K-N9010B-10686.local::hislip0::INSTR")
# context.server.spectrum.create_service("TCPIP0::K-N9010B-10686.local::hislip0::INSTR")
context.server.spectrum.create_service(context.analyzer_name)
with utils.stack_chdir(ROOT_FOLDER):
context.BB_MAC_ADDR = MAC_ADDR

View File

@@ -19,7 +19,7 @@ RFPAL_IN_TARGET_dBm = 30
BB_ATTN_RESOLUTION_DIVIDER = 1
BB_ATTN_MIN = 1
BB_ATTN_INIT_ATTEN = 6
BB_ATTN_MAX = 10
BB_ATTN_MAX = 40
RFPAL_FB_TARGET_dBm = -17.5
FB_ATTN_RESOLUTION_DIVIDER = 4

View File

@@ -1148,7 +1148,10 @@ class BBAttenuatorCalibrator(BBGeneratedSignalCalibrator):
def read_power_spectrum(self):
#rfmeasure.set_spectrum_path(self.context, 'UUT_ANT', tx)
self.context.server.spectrum.set_loss(31)
#self.context.server.spectrum.set_loss(31)
float_path_loss = float(self.context.path_loss)
#print("Path Loss = %f" % float_path_loss)
self.context.server.spectrum.set_loss(float_path_loss)
if not hasattr(self, 'previous'):
self.previous = None
value = read_output_power(self.context, self.context.server.spectrum)