📄 cal_com.c
字号:
}
else if(strnicmp("SHOW_TIMING_REPORT", pLine, strlen("SHOW_TIMING_REPORT")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the SHOW_TIMING_REPORT from %s\n", CALSETUP_FILE);
}
else {
CalSetup.showTimingReport = (testVal) ? TRUE : FALSE;
}
}
else if(strnicmp("PER_PASS_LIMIT", pLine, strlen("PER_PASS_LIMIT")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%ld", &CalSetup.perPassLimit)) {
uiPrintf("Unable to read the PER_PASS_LIMIT from %s\n", CALSETUP_FILE);
}
}
else if(strnicmp("SEN_PASS_LIMIT", pLine, strlen("SEN_PASS_LIMIT")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%ld", &CalSetup.senPassLimit)) {
uiPrintf("Unable to read the SEN_PASS_LIMIT from %s\n", CALSETUP_FILE);
}
}
else if(strnicmp("PPM_MAX_LIMIT", pLine, strlen("PPM_MAX_LIMIT")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%ld", &CalSetup.ppmMaxLimit)) {
uiPrintf("Unable to read the PPM_MAX_LIMIT from %s\n", CALSETUP_FILE);
}
}
else if(strnicmp("AUTO_PIER_START", pLine, strlen("AUTO_PIER_START")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%ld", &goldenParams.channelStart)) {
uiPrintf("Unable to read the AUTO_PIER_START from %s\n", CALSETUP_FILE);
}
}
else if(strnicmp("AUTO_PIER_STOP", pLine, strlen("AUTO_PIER_STOP")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%ld", &goldenParams.channelStop)) {
uiPrintf("Unable to read the AUTO_PIER_STOP from %s\n", CALSETUP_FILE);
}
}
else if(strnicmp("AUTO_PIER_STEP", pLine, strlen("AUTO_PIER_STEP")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%ld", &goldenParams.measurementStep)) {
uiPrintf("Unable to read the AUTO_PIER_STEP from %s\n", CALSETUP_FILE);
}
}
else if(strnicmp("PPM_MIN_LIMIT", pLine, strlen("PPM_MIN_LIMIT")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%ld", &CalSetup.ppmMinLimit)) {
uiPrintf("Unable to read the PPM_MIN_LIMIT from %s\n", CALSETUP_FILE);
}
}
else if(strnicmp("NUM_MASK_FAIL_POINTS", pLine, strlen("NUM_MASK_FAIL_POINTS")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%ld", &CalSetup.maskFailLimit)) {
uiPrintf("Unable to read the NUM_MASK_FAIL_POINTS from %s\n", CALSETUP_FILE);
}
}
else if((strnicmp("FORCE_PIERS", pLine, strlen("FORCE_PIERS")) == 0) &&
((pLine[strlen("FORCE_PIERS")] == ' ') ||
(pLine[strlen("FORCE_PIERS")] == '\t') ) ){
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
pLine = strtok(pLine," ;#");
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the FORCE_PIERS from %s\n", CALSETUP_FILE);
}
else {
CalSetup.forcePiers = (testVal) ? TRUE : FALSE;
}
}
else if((strnicmp("FORCE_PIERS_LIST", pLine, strlen("FORCE_PIERS_LIST")) == 0) &&
((pLine[strlen("FORCE_PIERS_LIST")] == ' ') ||
(pLine[strlen("FORCE_PIERS_LIST")] == '\t') ) ){
pLine = strchr(pLine, '=');
pLine++;
pLine = strtok(pLine,";#");
ii = 0;
pLine = strtok(pLine, " ,");
while ((pLine != NULL) && (pLine[0] != ';') && (ii < 10))
{
if(!sscanf(pLine, "%d", &signedTempVal )){
uiPrintf("Unable to read next forced pier from -->%s<--\n", pLine);
} else
{
CalSetup.piersList[ii++] = (A_UINT16) signedTempVal;
}
pLine = strtok(NULL, " ,");
}
CalSetup.numForcedPiers = ii;
if (ii < 1) {
uiPrintf("Unable to read the FORCE_PIERS_LIST from %s\n", CALSETUP_FILE);
}
// This restriction on force_piers_list begin and end taken out starting eeprom version 3.3 to
// support 4.9G band. - PD 9/02
/*
if((CalSetup.piersList[0] != goldenParams.channelStart) || (CalSetup.piersList[CalSetup.numForcedPiers-1] != goldenParams.channelStop))
{
uiPrintf("ERROR: The first and last entries in the FORCE_PIERS_LIST in calsetup.txt are \n");
uiPrintf("required to be %d and %d, respectively.\n", goldenParams.channelStart, goldenParams.channelStop);
exit(0);
}
*/
}
else if((strnicmp("FORCE_PIERS_11b", pLine, strlen("FORCE_PIERS_11b")) == 0) &&
((pLine[strlen("FORCE_PIERS_11b")] == ' ') ||
(pLine[strlen("FORCE_PIERS_11b")] == '\t') ) ){
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
pLine = strtok(pLine," ;#");
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the FORCE_PIERS_11b from %s\n", CALSETUP_FILE);
}
else {
CalSetup.forcePiers_2p4[MODE_11b] = (testVal) ? TRUE : FALSE;
}
}
else if((CalSetup.forcePiers_2p4[MODE_11b]) &&
((strnicmp("FORCE_PIERS_LIST_11b", pLine, strlen("FORCE_PIERS_LIST_11b")) == 0) &&
((pLine[strlen("FORCE_PIERS_LIST_11b")] == ' ') ||
(pLine[strlen("FORCE_PIERS_LIST_11b")] == '\t') ) ) ){
pLine = strchr(pLine, '=');
pLine++;
pLine = strtok(pLine,";#");
ii = 0;
pLine = strtok(pLine, " ,");
while ((pLine != NULL) && (pLine[0] != ';') && (ii < numRAWChannels_2p4))
{
if(!sscanf(pLine, "%d", &signedTempVal )){
uiPrintf("Unable to read next 11b forced pier from -->%s<--\n", pLine);
} else
{
CalSetup.piersList_2p4[MODE_11b][ii++] = (A_UINT16) signedTempVal;
}
pLine = strtok(NULL, " ,");
}
CalSetup.numForcedPiers_2p4[MODE_11b] = ii;
if (ii < 1) {
uiPrintf("Unable to read the FORCE_PIERS_LIST_11b from %s\n", CALSETUP_FILE);
}
}
else if((strnicmp("FORCE_PIERS_11g", pLine, strlen("FORCE_PIERS_11g")) == 0) &&
((pLine[strlen("FORCE_PIERS_11g")] == ' ') ||
(pLine[strlen("FORCE_PIERS_11g")] == '\t') ) ){
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
pLine = strtok(pLine," ;#");
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the FORCE_PIERS_11g from %s\n", CALSETUP_FILE);
}
else {
CalSetup.forcePiers_2p4[MODE_11g] = (testVal) ? TRUE : FALSE;
}
}
else if((CalSetup.forcePiers_2p4[MODE_11g]) &&
((strnicmp("FORCE_PIERS_LIST_11g", pLine, strlen("FORCE_PIERS_LIST_11g")) == 0) &&
((pLine[strlen("FORCE_PIERS_LIST_11g")] == ' ') ||
(pLine[strlen("FORCE_PIERS_LIST_11g")] == '\t') ) ) ){
pLine = strchr(pLine, '=');
pLine++;
pLine = strtok(pLine,";#");
ii = 0;
pLine = strtok(pLine, " ,");
while ((pLine != NULL) && (pLine[0] != ';') && (ii < numRAWChannels_2p4))
{
if(!sscanf(pLine, "%d", &signedTempVal )){
uiPrintf("Unable to read next 11g forced pier from -->%s<--\n", pLine);
} else
{
CalSetup.piersList_2p4[MODE_11g][ii++] = (A_UINT16) signedTempVal;
}
pLine = strtok(NULL, " ,");
}
CalSetup.numForcedPiers_2p4[MODE_11g] = ii;
if (ii < 1) {
uiPrintf("Unable to read the FORCE_PIERS_LIST_11g from %s\n", CALSETUP_FILE);
}
}
else if(strnicmp("USE_11g_CAL_FOR_11b", pLine, strlen("USE_11g_CAL_FOR_11b")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &testVal)) {
uiPrintf("Unable to read the USE_11g_CAL_FOR_11b from %s\n", CALSETUP_FILE);
}
else {
CalSetup.useOneCal = (testVal) ? TRUE : FALSE;
}
}
else if((strnicmp("MACID_FILENAME", pLine, strlen("MACID_FILENAME")) == 0) &&
((pLine[strlen("MACID_FILENAME")] == ' ') ||
(pLine[strlen("MACID_FILENAME")] == '\t') ) ){
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%s", CalSetup.macidFile)) {
uiPrintf("Unable to read the MACID_FILENAME from %s\n", CALSETUP_FILE);
}
else {
}
}
else if(strnicmp("CASE_TEMPERATURE", pLine, strlen("CASE_TEMPERATURE")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%d", &CalSetup.caseTemperature)) {
uiPrintf("Unable to read the CASE_TEMPERATURE from %s\n", CALSETUP_FILE);
}
}
else if(strnicmp("I_COEFF_5G", pLine, strlen("I_COEFF_5G")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%ld", &CalSetup.i_coeff_5G)) {
uiPrintf("Unable to read the I_COEFF_5G from %s\n", CALSETUP_FILE);
}
}
else if(strnicmp("Q_COEFF_5G", pLine, strlen("Q_COEFF_5G")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%ld", &CalSetup.q_coeff_5G)) {
uiPrintf("Unable to read the Q_COEFF_5G from %s\n", CALSETUP_FILE);
}
}
else if(strnicmp("I_COEFF_2G", pLine, strlen("I_COEFF_2G")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%ld", &CalSetup.i_coeff_2G)) {
uiPrintf("Unable to read the I_COEFF_2G from %s\n", CALSETUP_FILE);
}
}
else if(strnicmp("Q_COEFF_2G", pLine, strlen("Q_COEFF_2G")) == 0) {
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%ld", &CalSetup.q_coeff_2G)) {
uiPrintf("Unable to read the Q_COEFF_2G from %s\n", CALSETUP_FILE);
}
}
else if((strnicmp("GOLDEN_IP_ADDR", pLine, strlen("GOLDEN_IP_ADDR")) == 0) &&
((pLine[strlen("GOLDEN_IP_ADDR")] == ' ') ||
(pLine[strlen("GOLDEN_IP_ADDR")] == '\t') ) ){
pLine = strchr(pLine, '=');
pLine = strtok(pLine, delimiters);
if(!sscanf(pLine, "%s", CalSetup.goldenIPAddr)) {
uiPrintf("Unable to read the GOLDEN_IP_ADDR from %s\n", CALSETUP_FILE);
}
else {
// uiPrintf("read the golden IP addr to be %s\n", CalSetup.goldenIPAddr);
}
}
} // End while (get line)
fclose(fStream);
}
void load_eep_vals(A_UINT32 devNum)
{
A_UINT32 pd_lo, pd_hi;
A_UINT32 tx_clip, cck_scale;
// load board specific cal section from the appropriate eep file
load_cal_section();
if ((CalSetup.modeMaskForRadio[0] & 0x1) == 0x1) {
CalSetup.instanceForMode[MODE_11g] = 1;
} else if ((CalSetup.modeMaskForRadio[1] & 0x1) == 0x1) {
CalSetup.instanceForMode[MODE_11g] = 2;
}
CalSetup.instanceForMode[MODE_11b] = CalSetup.instanceForMode[MODE_11g];
if ((CalSetup.modeMaskForRadio[0] & 0x2) == 0x2) {
CalSetup.instanceForMode[MODE_11a] = 1;
} else if ((CalSetup.modeMaskForRadio[1] & 0x2) == 0x2) {
CalSetup.instanceForMode[MODE_11a] = 2;
}
// load mode specific configuration settings for this board.
// eep file should already be parsed by ART for these
if(CalSetup.Amode) {
// Begin loading 11a Parameters
CalSetup.ob_1 = art_getFieldForMode(devNum,"rf_ob", MODE_11A, BASE);
CalSetup.db_1 = art_getFieldForMode(devNum,"rf_db", MODE_11A, BASE);
CalSetup.ob_2 = art_getFieldForMode(devNum,"rf_ob", MODE_11A, BASE);
CalSetup.db_2 = art_getFieldForMode(devNum,"rf_db", MODE_11A, BASE);
CalSetup.ob_3 = art_getFieldForMode(devNum,"rf_ob", MODE_11A, BASE);
CalSetup.db_3 = art_getFieldForMode(devNum,"rf_db", MODE_11A, BASE);
CalSetup.ob_4 = art_getFieldForMode(devNum,"rf_ob", MODE_11A, BASE);
CalSetup.db_4 = art_getFieldForMode(devNum,"rf_db", MODE_11A, BASE);
CalSetup.switchSettling = art_getFieldForMode(devNum,"bb_switch_settling", MODE_11A, BASE);
CalSetup.txrxAtten = art_getFieldForMode(devNum,"bb_txrxatten", MODE_11A, BASE);
CalSetup.rxtx_margin[MODE_11a] = art_getFieldForMode(devNum,"bb_rxtx_margin_2ghz", MODE_11A, BASE);
CalSetup.thresh62 = art_getFieldForMode(devNum,"bb_thresh62", MODE_11A, BASE);
CalSetup.txEndToXLNAOn = art_getFieldForMode(devNum,"bb_tx_end_to_xlna_on", MODE_11A, BASE);
CalSetup.txEndToXPAOff = art_getFieldForMode(devNum,"bb_tx_end_to_xpaa_off", MODE_11A, BASE);
CalSetup.txFrameToXPAOn = art_getFieldForMode(devNum,"bb_tx_frame_to_xpaa_on", MODE_11A, BASE);
if(((sw
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -