⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 meta_factory_result_handle.cpp

📁 MTK 手机软件开发 META 源代码,开发环境: C++ Builder
💻 CPP
📖 第 1 页 / 共 2 页
字号:
    {
        return false;
    }

    try
    {

        MF_rf_txiq_ptr->REQ_Write_To_File(asCalFile.c_str(),  m_pCal->ui_rf_id, m_pCal->e_bbtxcfg_ver );
        return true;
    }
    catch (...)
    {
        ShowMessage( " Write : write calibration result file : " + asCalFile + " error ");
    }
    return true;
}

//=================================================================================================
bool __fastcall T_META_factory_calibration::WriteAPCCalResultToFile(AnsiString asCalFile, AnsiString asExeName, bool b_CalResultPath, int band )
{

    AnsiString asPath;
    if (b_CalResultPath)
    {
        asPath = m_pCal->as_CalPath + "\\";
    }
    else
    {
        getPathFromStr(asExeName, asPath);
    }

    if ( withPath( asPath) && !withPath( asCalFile) )
    {
        asCalFile = asPath + asCalFile;
    }
    else
    {
        return false;
    }

    try
    {
        MF_rf_apc_ptr->REQ_Write_APC_To_File_Single_Band(asCalFile.c_str(), m_pCal->ui_rf_id, band, m_pCal->b_TADOSupport );
        return true;
    }
    catch (...)
    {
        ShowMessage( " Write : write calibration result file : " + asCalFile + " error ");
    }
    return true;
}

//=================================================================================================
bool __fastcall T_META_factory_calibration::WriteEpskAPCCalResultToFile(AnsiString asCalFile, AnsiString asExeName, bool b_CalResultPath, int band )
{

    AnsiString asPath;
    if (b_CalResultPath)
    {
        asPath = m_pCal->as_CalPath + "\\";
    }
    else
    {
        getPathFromStr(asExeName, asPath);
    }

    if ( withPath( asPath) && !withPath( asCalFile) )
    {
        asCalFile = asPath + asCalFile;
    }
    else
    {
        return false;
    }

    try
    {
        MF_rf_apc_8psk_ptr->REQ_Write_APC_To_File_Single_Band(asCalFile.c_str(), m_pCal->ui_rf_id, band);
        return true;
    }
    catch (...)
    {
        ShowMessage( " Write : write calibration result file : " + asCalFile + " error ");
    }
    return true;
}

//=================================================================================================
bool __fastcall T_META_factory_calibration::WriteTxPhaseErrCalResultToFile(AnsiString asCalFile, AnsiString asExeName, bool b_CalResultPath)
{
    AnsiString asPath;
    if (b_CalResultPath)
    {
        asPath = m_pCal->as_CalPath + "\\";
    }
    else
    {
        getPathFromStr(asExeName, asPath);
    }

    if ( withPath( asPath) && !withPath( asCalFile) )
    {
        asCalFile = asPath + asCalFile;
    }
    else
    {
        return false;
    }

    try
    {
#if 0
        S_BB_TX_PARAMETER_ACCESS s_BBTXParAccess;
        s_BBTXParAccess.b_bbtx_common_mode_voltage = true;
        s_BBTXParAccess.b_bbtx_gain                = true;
        s_BBTXParAccess.b_bbtx_calrcsel            = true;
        s_BBTXParAccess.b_bbtx_trimI               = true;
        s_BBTXParAccess.b_bbtx_trimQ               = true;
        s_BBTXParAccess.b_bbtx_offsetI             = true;
        s_BBTXParAccess.b_bbtx_offsetQ             = true;
        s_BBTXParAccess.b_bbtx_isCalibrated        = true;
        s_BBTXParAccess.b_apc_bat_low_voltage      = true;
        s_BBTXParAccess.b_apc_bat_high_voltage     = true;
        s_BBTXParAccess.b_apc_bat_low_temperature  = true;
        s_BBTXParAccess.b_apc_bat_high_temperature = true;
        // high band
        bool flag = ((RF_ID_MT6140C == m_Cal.ui_rf_id) || (RF_ID_MT6140C == m_Cal.ui_rf_id));
        s_BBTXParAccess.b_bbtx_common_mode_voltage_h = flag;
        s_BBTXParAccess.b_bbtx_gain_h = flag;
        s_BBTXParAccess.b_bbtx_calrcsel_h = flag;
        s_BBTXParAccess.b_bbtx_trimI_h = flag;
        s_BBTXParAccess.b_bbtx_trimQ_h = flag;
        s_BBTXParAccess.b_bbtx_offsetI_h = flag;
        s_BBTXParAccess.b_bbtx_offsetQ_h = flag;
       // s_BBTXParAccess.b_bbtx_isCalibrated_h = flag;
        s_BBTXParAccess.b_bbtx_phsel_h = flag;
#endif
        MF_rf_txiq_ptr->REQ_Write_To_File( asCalFile.c_str(), m_pCal->ui_rf_id, m_pCal->e_bbtxcfg_ver  );
        return true;
    }
    catch (...)
    {
        ShowMessage( " Write : write calibration result file : " + asCalFile + " error ");
    }
    return true;
}

//=================================================================================================
bool __fastcall T_META_factory_calibration::WriteADCCalResultToFile(AnsiString asCalFile, AnsiString asExeName, bool b_CalResultPath)
{
    AnsiString asPath;

    if (b_CalResultPath)
    {
        asPath = m_pCal->as_CalPath + "\\";
    }
    else
    {
        getPathFromStr(asExeName, asPath);
    }

    if ( withPath( asPath) && !withPath( asCalFile))
    {
        asCalFile = asPath + asCalFile;
    }
    else
    {
        return false;
    }

    try
    {
        MF_BB_ADC_ptr->REQ_Write_To_File( asCalFile.c_str() );
        return true;
    }
    catch (...)
    {
        ShowMessage( " Write : write calibration result file : " + asCalFile + " error ");
    }
    return true;
}

//==============================================================================
bool __fastcall T_META_factory_calibration::WriteBtCapIDCalResultToFile(AnsiString asCalFile, AnsiString asExeName, bool b_CalResultPath, BT_ModuleID_S bt_module)
{
    AnsiString asPathName;
    if (!Get_CalFilePathName(asCalFile, asExeName, b_CalResultPath, asPathName))
    {
        return false;
    }

    return true;
}

//==============================================================================
bool __fastcall T_META_factory_calibration::WriteWiFiAPCCalResultToFile(AnsiString asCalFile, AnsiString asExeName, bool b_CalResultPath, E_WIFI_GENERATION e_802_11_idx )
{
    AnsiString asPath;
    if (b_CalResultPath)
    {
        asPath = m_pCal->as_CalPath + "\\";
    }
    else
    {
        getPathFromStr(asExeName, asPath);
    }

    if ( withPath( asPath) && !withPath( asCalFile) )
    {
        asCalFile = asPath + asCalFile;
    }
    else
    {
        return false;
    }

    switch (e_802_11_idx )
    {
        case WIFI_802_11A_IDX:
        {
            if( ! m_pCal->s_cal_obj.pc_WIFI_APC_Obj->REQ_Write_TxPower5000M_To_File( asCalFile.c_str() )  )
            {   return false;
            }
        }
        break;

        case WIFI_802_11B_IDX:
        {
            if( ! m_pCal->s_cal_obj.pc_WIFI_APC_Obj->REQ_Write_TxPower2400M_To_File( asCalFile.c_str() )  )
            {   return false;
            }
        }
        break;

        case WIFI_802_11G_IDX:
        {
            if( ! m_pCal->s_cal_obj.pc_WIFI_APC_Obj->REQ_Write_TxPower2400M_To_File( asCalFile.c_str() )  )
            {   return false;
            }
        }
        break;

        default:
            return false;
      
    }

    return true;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bool __fastcall T_META_factory_calibration::WriteWiFiALCCalResultToFile(AnsiString asCalFile, AnsiString asExeName, bool b_CalResultPath)
{

    AnsiString asPath;
    if ( b_CalResultPath )
    {
        asPath = m_pCal->as_CalPath + "\\";
    }
    else
    {
        getPathFromStr(asExeName, asPath);
    }

    if (withPath(asPath) && !withPath(asCalFile))
    {
        asCalFile = asPath + asCalFile;
    }
    else
    {
        return false;
    }


    if (!m_pCal->s_cal_obj.pc_WIFI_ALC_Obj->REQ_Write_To_File(asCalFile.c_str()))
    {
        return false;
    }

    return true;
}

//=============================================================================
bool __fastcall T_META_factory_calibration::WriteWiFiTxDcOffsetCalResultToFile(AnsiString asCalFile, AnsiString asExeName, bool b_CalResultPath)
{

    AnsiString asPath;
    if ( b_CalResultPath )
    {
        asPath = m_pCal->as_CalPath + "\\";
    }
    else
    {
        getPathFromStr(asExeName, asPath);
    }

    if ( withPath( asPath) && !withPath( asCalFile) )
    {
        asCalFile = asPath + asCalFile;
    }
    else
    {
        return false;
    }

    if (! m_pCal->s_cal_obj.pc_WIFI_TXDC_Obj->REQ_Write_To_File(asCalFile.c_str() ))
    {   return false;
    }

    return true;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -