]> Devoid-pointer.net GitWeb - libHPCS.git/commitdiff
Detect ChemStation B.06.44 and set the sampling rate accordingly
authorMichal Malý <madcatxster@devoid-pointer.net>
Tue, 5 Apr 2016 10:37:21 +0000 (12:37 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Tue, 5 Apr 2016 10:37:21 +0000 (12:37 +0200)
libhpcs.c
libhpcs_p.h

index 8856ab0124389165ced04df27dd9c96fce0e4de7..c40b70e08988541a23d5c586e5ccb96960bcc7a2 100644 (file)
--- a/libhpcs.c
+++ b/libhpcs.c
@@ -349,6 +349,10 @@ static enum HPCS_ChemStationVer detect_chemstation_version(const char*const vers
                PR_DEBUG("ChemStation B.06.43\n");
                return CHEMSTAT_B0643;
        }
+       else if (!strcmp(version_string, CHEMSTAT_B0644_STR)) {
+               PR_DEBUG("ChemStation B.06.44\n");
+               return CHEMSTAT_B0644;
+       }
        else if (strlen(version_string) == 0) {
                PR_DEBUG("ChemStation Untagged\n");
                return CHEMSTAT_UNTAGGED;
@@ -414,13 +418,17 @@ static void guess_sampling_rate(const enum HPCS_ChemStationVer version, struct H
                break;
        case CHEMSTAT_B0626:
        case CHEMSTAT_B0643:
+       case CHEMSTAT_B0644:
                switch (mdata->file_type) {
                case HPCS_TYPE_CE_DAD:
                case HPCS_TYPE_CE_CCD:
                        mdata->sampling_rate /= 100;
                        break;
                default:
-                       mdata->sampling_rate = CE_WORK_PARAM_SAMPRATE;
+                       if (version == CHEMSTAT_B0644)
+                               mdata->sampling_rate /= 100;
+                       else
+                               mdata->sampling_rate = CE_WORK_PARAM_SAMPRATE;
                        break;
                }
                break;
index 1e5363683565f5c5cd77aed8f31320433c74de0f..5e850a27b0b5aaa9106a11ba1436f20853dab2f8 100644 (file)
@@ -135,6 +135,7 @@ enum HPCS_ChemStationVer {
        CHEMSTAT_B0625,
        CHEMSTAT_B0626,
        CHEMSTAT_B0643,
+       CHEMSTAT_B0644,
        CHEMSTAT_UNKNOWN
 };
 
@@ -142,6 +143,7 @@ enum HPCS_ChemStationVer {
 const char CHEMSTAT_B0625_STR[] = "B.06.25 [0003]";
 const char CHEMSTAT_B0626_STR[] = "B.06.26 [0010]";
 const char CHEMSTAT_B0643_STR[] = "B.06.43 [0001]";
+const char CHEMSTAT_B0644_STR[] = "B.06.44 [0001]";
 
 /* Values of markers found in .ch files */
 const char BIN_MARKER_A = 0x10;