summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e418af7)
raw | patch | inline | side by side (parent: e418af7)
author | a0220410 <peter-li@ti.com> | |
Fri, 17 Jun 2016 00:44:01 +0000 (08:44 +0800) | ||
committer | a0220410 <peter-li@ti.com> | |
Fri, 17 Jun 2016 00:44:01 +0000 (08:44 +0800) |
TAS2555-FTC/ftcc/src/main/java/com/ti/tas2555/ftcc/TFTCConfiguration.java | patch | blob | history |
diff --git a/TAS2555-FTC/ftcc/src/main/java/com/ti/tas2555/ftcc/TFTCConfiguration.java b/TAS2555-FTC/ftcc/src/main/java/com/ti/tas2555/ftcc/TFTCConfiguration.java
index 0684981c33949827b028ddd1c01efed1e2ca47d6..fd5afbb49440b760e4db1007228e4428535bb2c0 100755 (executable)
package com.ti.tas2555.ftcc;\r
\r
+import android.util.Log;\r
+\r
import java.io.BufferedReader;\r
import java.io.BufferedWriter;\r
import java.io.File;\r
* Created by a0220410 on 6/10/2016.\r
*/\r
public class TFTCConfiguration {\r
- private String CALIBRATION_TIME = "CALIBRATION_TIME";\r
- private String VERIFICATION_TIME = "VERIFICATION_TIME";\r
- private String TEST_DELTA_T = "TEST_DELTA_T";\r
- private String CONFIGURATION = "CONFIGURATION";\r
- private String CONFIGURATION_CALIBRATION = "CONFIGURATION_CALIBRATION";\r
- private String SPK_T_MAX = "SPK_T_MAX";\r
- private String SPK_RE_TOL_PER = "SPK_RE_TOL_PER";\r
- private String SPK_RE_ALPHA = "SPK_RE_ALPHA";\r
- private String PPC3_RE0 = "PPC3_RE0";\r
- private String PPC3_RTV = "PPC3_RTV";\r
- private String PPC3_RTM = "PPC3_RTM";\r
- private String PPC3_RTVA = "PPC3_RTVA";\r
- private String PPC3_SYSGAIN = "PPC3_SYSGAIN";\r
- private String PPC3_DEV_NONLIN_PER = "PPC3_DEV_NONLIN_PER";\r
- private String PPC3_DELTA_T_LIMIT = "PPC3_DELTA_T_LIMIT";\r
- private String FS_RATE = "FS_RATE";\r
- private String RE_HI = "RE_HI";\r
- private String RE_LO = "RE_LO";\r
- private String F0_HI = "F0_HI";\r
- private String F0_LO = "F0_LO";\r
- private String Q_HI = "Q_HI";\r
- private String Q_LO = "Q_LO";\r
- private String T_HI = "T_HI";\r
- private String T_LO = "T_LO";\r
- private String NFS = "NFS";\r
- private String SCTH = "SCTH";\r
- public int RESULT_PASS = 0x00000000;\r
- public int RE_FAIL_HI = 0x00000001;\r
- public int RE_FAIL_LO = 0x00000010;\r
- public int F0_FAIL_HI = 0x00000100;\r
- public int F0_FAIL_LO = 0x00001000;\r
- public int Q_FAIL_HI = 0x00010000;\r
- public int Q_FAIL_LO = 0x00100000;\r
- public int T_FAIL_HI = 0x01000000;\r
- public int T_FAIL_LO = 0x10000000;\r
+ private static final String TAG = "TFTCConfiguration";\r
+ private static final String CALIBRATION_TIME = "CALIBRATION_TIME";\r
+ private static final String VERIFICATION_TIME = "VERIFICATION_TIME";\r
+ private static final String TEST_DELTA_T = "TEST_DELTA_T";\r
+ private static final String CONFIGURATION = "CONFIGURATION";\r
+ private static final String CONFIGURATION_CALIBRATION = "CONFIGURATION_CALIBRATION";\r
+ private static final String SPK_T_MAX = "SPK_T_MAX";\r
+ private static final String SPK_RE_TOL_PER = "SPK_RE_TOL_PER";\r
+ private static final String SPK_RE_ALPHA = "SPK_RE_ALPHA";\r
+ private static final String PPC3_RE0 = "PPC3_RE0";\r
+ private static final String PPC3_RTV = "PPC3_RTV";\r
+ private static final String PPC3_RTM = "PPC3_RTM";\r
+ private static final String PPC3_RTVA = "PPC3_RTVA";\r
+ private static final String PPC3_SYSGAIN = "PPC3_SYSGAIN";\r
+ private static final String PPC3_DEV_NONLIN_PER = "PPC3_DEV_NONLIN_PER";\r
+ private static final String PPC3_DELTA_T_LIMIT = "PPC3_DELTA_T_LIMIT";\r
+ private static final String FS_RATE = "FS_RATE";\r
+ private static final String RE_HI = "RE_HI";\r
+ private static final String RE_LO = "RE_LO";\r
+ private static final String F0_HI = "F0_HI";\r
+ private static final String F0_LO = "F0_LO";\r
+ private static final String Q_HI = "Q_HI";\r
+ private static final String Q_LO = "Q_LO";\r
+ private static final String T_HI = "T_HI";\r
+ private static final String T_LO = "T_LO";\r
+ private static final String NFS = "NFS";\r
+ private static final String SCTH = "SCTH";\r
+ public static final int RESULT_PASS = 0x00000000;\r
+ public static final int RE_FAIL_HI = 0x00000001;\r
+ public static final int RE_FAIL_LO = 0x00000010;\r
+ public static final int F0_FAIL_HI = 0x00000100;\r
+ public static final int F0_FAIL_LO = 0x00001000;\r
+ public static final int Q_FAIL_HI = 0x00010000;\r
+ public static final int Q_FAIL_LO = 0x00100000;\r
+ public static final int T_FAIL_HI = 0x01000000;\r
+ public static final int T_FAIL_LO = 0x10000000;\r
\r
public boolean bVerbose;\r
public boolean bLoadCalibration;\r
\r
PrepareCalFWHeader();\r
\r
+ Log.i(TAG, "FW Index =" + gnBinIndex);\r
for(int i=0; i < fwData.length; i++){\r
gpBin[gnBinIndex++] = (char) fwData[i];\r
}\r
\r
private void PrepareCalFWHeader(){\r
String datafile = "Calibration Data File";\r
- String description = "Calibration Data File";\r
+ String description = "Calibration Data File for TAS2555";\r
gpBin[3] = '2';\r
gpBin[2] = '5';\r
gpBin[1] = '5';\r
\r
gpBin[gnBinIndex++] = 0x00;\r
gpBin[gnBinIndex++] = 0x01; // one calibration data block\r
+ Log.i(TAG, "binIndex for calibration data block =" + gnBinIndex);\r
\r
String CalibrationData = "Calibration Data";\r
for(int i=0; i < CalibrationData.length(); i++){\r
}\r
gnBinIndex += CalibrationData2555.length() + 1;\r
\r
+ Log.i(TAG, "binIndex for smart amp =" + gnBinIndex);\r
gpBin[gnBinIndex++] = 0x00; // compatible program = smart amp (index 0)\r
gpBin[gnBinIndex++] = (char)nConfiguration; // compatible configuration\r
\r
gpBin[gnBinIndex++] = 0x00;\r
gpBin[gnBinIndex++] = 0x0A; // block type = 0x0A (calibration)\r
gnBinBlockIndex = gnBinIndex;\r
-\r
+ Log.i(TAG, "gnBinBlockIndex =" + gnBinIndex);\r
gnBinIndex += 4; // number of commands index\r
}\r
\r
0x00, 0x00, 0x01, 0x00\r
};\r
\r
+ Log.i(TAG, "commit sequence index=" + gnBinIndex);\r
// write the commit sequence\r
for(int i=0; i < pCommit.length; i++){\r
gpBin[gnBinIndex++] = pCommit[i];\r
\r
nCommands = ((gnBinIndex - gnBinBlockIndex) / 4) - 1;\r
\r
+ Log.i(TAG, "index=" + gnBinBlockIndex + "number of commands for calibration block =" + nCommands);\r
// write number of commands for calibration block\r
gpBin[gnBinBlockIndex++] = (char)((nCommands & 0xFF000000) >> 24);\r
gpBin[gnBinBlockIndex++] = (char)((nCommands & 0x00FF0000) >> 16);\r