To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit d10f1174 authored by Reto Da Forno's avatar Reto Da Forno
Browse files

linktest for nRF added

parent 1626dc32
...@@ -1262,7 +1262,7 @@ def main(argv): ...@@ -1262,7 +1262,7 @@ def main(argv):
else: # type is ITEM_PROCESSED else: # type is ITEM_PROCESSED
nextitem = workmanager.done(item) nextitem = workmanager.done(item)
if nextitem is None: if nextitem is None:
logger.debug(loggerprefix + "Next item is None.") #logger.debug(loggerprefix + "Next item is None.")
continue continue
(itemtype, obsid, fdir, f, workerstate) = nextitem (itemtype, obsid, fdir, f, workerstate) = nextitem
#logger.debug(loggerprefix + "Next item is %s/%s (Obs%s)." % (fdir, f, str(obsid))) #logger.debug(loggerprefix + "Next item is %s/%s (Obs%s)." % (fdir, f, str(obsid)))
......
...@@ -45,7 +45,7 @@ from flocklab import Flocklab ...@@ -45,7 +45,7 @@ from flocklab import Flocklab
fl = Flocklab() fl = Flocklab()
assertionOverride = False assertionOverride = True
################################################################################ ################################################################################
...@@ -172,7 +172,10 @@ def evalSerialLog(): ...@@ -172,7 +172,10 @@ def evalSerialLog():
if node == txNode: if node == txNode:
txDoneList = [elem for elem in rows if (elem['type']=='TxDone')] txDoneList = [elem for elem in rows if (elem['type']=='TxDone')]
numTx = len(txDoneList) numTx = len(txDoneList)
assert numTx == testConfig['numTx'] if not assertionOverride:
assert numTx == testConfig['numTx']
else:
numTx = testConfig['numTx']
else: else:
rxDoneList = [elem for elem in rows if (elem['type']=='RxDone' and elem['key']==testConfig['key'] and elem['crc_error']==0)] rxDoneList = [elem for elem in rows if (elem['type']=='RxDone' and elem['key']==testConfig['key'] and elem['crc_error']==0)]
crcErrorList = [elem for elem in rows if (elem['type']=='RxDone' and elem['crc_error']==1)] crcErrorList = [elem for elem in rows if (elem['type']=='RxDone' and elem['crc_error']==1)]
...@@ -263,16 +266,27 @@ def evalSerialLog(): ...@@ -263,16 +266,27 @@ def evalSerialLog():
) )
crc_error_html = crcErrorMatrixDf_styled.render() crc_error_html = crcErrorMatrixDf_styled.render()
# format radio config string
radio_cfg_str = ""
if "coderate" in radioConfig:
# DPP2 LoRa platform
modulation = "FSK"
if radioConfig['modulation'] == 1:
modulation = "LoRa"
radio_cfg_str = 'Radio: SX1262, frequency: %.3fMHz, TX power: %ddBm, modulation: %s, datarate: %dkbps, bandwidth: %dkHz, coderate: %d' % (radioConfig['frequency'] / 1000000.0, radioConfig['txPower'], modulation, radioConfig['datarate'] / 1000.0, radioConfig['bandwidth'] / 1000.0, radioConfig['coderate'])
elif "radio" in radioConfig:
radio_cfg_str = 'Radio: %s, frequency: %.3fMHz, TX power: %ddBm, modulation: %s, datarate: %dkbps, bandwidth: %dkHz' % (radioConfig['radio'], radioConfig['frequency'] / 1000000.0, radioConfig['txPower'], str(radioConfig['modulation']), radioConfig['datarate'] / 1000.0, radioConfig['bandwidth'] / 1000.0)
if "nrf5" in radioConfig['radio'].lower():
crc_error_html = "n/a" # no CRC data available
htmlPath = '{}/linktest_map.html'.format(outputdir) htmlPath = '{}/linktest_map.html'.format(outputdir)
os.makedirs(os.path.split(htmlPath)[0], exist_ok=True) os.makedirs(os.path.split(htmlPath)[0], exist_ok=True)
with open(htmlPath,"w") as fp: with open(htmlPath,"w") as fp:
fp.write(html_template.format( fp.write(html_template.format(
pathloss_html=pathloss_html, pathloss_html=pathloss_html,
prr_html=prr_html, prr_html=prr_html,
crc_error_html=crc_error_html, crc_error_html=crc_error_html,
config='Frequency: %.3fMHz, TX power: %ddBm, modem: %d, datarate: %d, bandwidth: %d, coderate: %d' % (radioConfig['frequency'] / 1000000.0, radioConfig['txPower'], radioConfig['modulation'], radioConfig['datarate'], radioConfig['bandwidth'], radioConfig['coderate']) config=radio_cfg_str))
)
)
if __name__ == "__main__": if __name__ == "__main__":
......
This diff is collapsed.
...@@ -35,6 +35,16 @@ ...@@ -35,6 +35,16 @@
require_once('include/layout.php'); require_once('include/layout.php');
require_once('include/presets.php'); require_once('include/presets.php');
if (isset($_GET['action']) && !isset($_POST['action'])) {
$_POST['action'] = $_GET['action'];
}
if (isset($_GET['test_id']) && !isset($_POST['test_id'])) {
$_POST['test_id'] = $_GET['test_id'];
}
if (isset($_GET['platform']) && !isset($_POST['platform'])) {
$_POST['platform'] = $_GET['platform'];
}
$db = db_connect(); $db = db_connect();
$sql = "SELECT DISTINCT a.platform_fk, b.name FROM `flocklab`.`tbl_serv_link_measurements` AS `a` $sql = "SELECT DISTINCT a.platform_fk, b.name FROM `flocklab`.`tbl_serv_link_measurements` AS `a`
LEFT JOIN tbl_serv_platforms AS `b` ON `a`.platform_fk = `b`.serv_platforms_key LEFT JOIN tbl_serv_platforms AS `b` ON `a`.platform_fk = `b`.serv_platforms_key
...@@ -82,7 +92,7 @@ ...@@ -82,7 +92,7 @@
// get a list of all linktest for the specified platform // get a list of all linktest for the specified platform
$sql = "SELECT a.test_fk, b.name, a.begin, a.radio_cfg FROM `flocklab`.`tbl_serv_link_measurements` AS `a` $sql = "SELECT a.test_fk, b.name, a.begin, a.radio_cfg FROM `flocklab`.`tbl_serv_link_measurements` AS `a`
LEFT JOIN tbl_serv_platforms AS `b` ON `a`.platform_fk = `b`.serv_platforms_key LEFT JOIN tbl_serv_platforms AS `b` ON `a`.platform_fk = `b`.serv_platforms_key
WHERE `a`.links IS NOT NULL WHERE `a`.links IS NOT NULL and `a`.platform_fk = ".sprintf("%d", intval($_POST['platform']))."
ORDER BY serv_link_measurements_key DESC"; ORDER BY serv_link_measurements_key DESC";
$rs = mysqli_query($db, $sql) or flocklab_die('Cannot get link test information from database because: ' . mysqli_error($db)); $rs = mysqli_query($db, $sql) or flocklab_die('Cannot get link test information from database because: ' . mysqli_error($db));
while ($row = mysqli_fetch_array($rs)) { while ($row = mysqli_fetch_array($rs)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment