summaryrefslogtreecommitdiff
path: root/spectro/insttypes.c
diff options
context:
space:
mode:
Diffstat (limited to 'spectro/insttypes.c')
-rwxr-xr-x[-rw-r--r--]spectro/insttypes.c90
1 files changed, 84 insertions, 6 deletions
diff --git a/spectro/insttypes.c b/spectro/insttypes.c
index 760d678..2a61d21 100644..100755
--- a/spectro/insttypes.c
+++ b/spectro/insttypes.c
@@ -26,6 +26,7 @@
#include "sa_config.h"
#endif /* !SALONEINSTLIB */
#include "numsup.h"
+#include "cgats.h"
#include "xspect.h"
#include "insttypes.h"
#include "conv.h"
@@ -39,8 +40,8 @@
/* Given a device type, return the corrsponding */
/* category */
-extern icom_type inst_category(instType itype) {
- switch (itype) {
+extern icom_type dev_category(devType dtype) {
+ switch (dtype) {
/* Color measurement instruments */
case instDTP22:
@@ -80,19 +81,26 @@ extern icom_type inst_category(instType itype) {
return icomt_instrument;
+#ifdef ENABLE_VTPGLUT
/* 3D cLUT box */
+ case devRadiance:
+ return icomt_v3dlut | icomt_vtpg;
+ case devPrisma:
+ return icomt_v3dlut;
/* Video test patern generator box */
- /* Printers */
- case devEpsonR1800:
- return icomt_printer;
+#endif
+
+
case instFakeDisp:
return icomt_unknown; // ???
- }
+ case devUnknown:
+ return icomt_unknown; // ???
+ }
return icomt_cat_any;
}
@@ -166,6 +174,16 @@ char *inst_sname(instType itype) {
case instColorHug2:
return "ColorHug2";
+
+#ifdef ENABLE_VTPGLUT
+ case devRadiance:
+ return "Radiance";
+ case devPrisma:
+ return "Prisma";
+#endif
+
+
+
default:
break;
}
@@ -242,6 +260,16 @@ char *inst_name(instType itype) {
case instColorHug2:
return "Hughski ColorHug2";
+
+#ifdef ENABLE_VTPGLUT
+ case devRadiance:
+ return "Lumagen Radiance";
+ case devPrisma:
+ return "Q, Inc Prisma";
+#endif
+
+
+
default:
break;
}
@@ -337,6 +365,16 @@ instType inst_enum(char *name) {
return instColorHug2;
+#ifdef ENABLE_VTPGLUT
+ if (strcmp(name, "Lumagen Radiance") == 0)
+ return devRadiance;
+
+ if (strcmp(name, "Q, Inc Prisma") == 0)
+ return devPrisma;
+#endif
+
+
+
return instUnknown;
}
@@ -371,6 +409,8 @@ int nep) { /* Number of end points */
return instI1Disp3;
if (idProduct == 0x6003) /* ColorMinki Smile (aka. ColorMunki Display Lite) */
return instSmile;
+ if (idProduct == 0x6008) /* ColorMunki i1Studio */
+ return instColorMunki;
if (idProduct == 0xD020) /* DTP20 */
return instDTP20;
if (idProduct == 0xD092) /* DTP92Q */
@@ -427,6 +467,8 @@ int nep) { /* Number of end points */
+
+
return instUnknown;
}
@@ -536,4 +578,40 @@ int inst_illuminant(xspect *sp, instType itype) {
return 1;
}
+/* ============================================================= */
+/* XRGA support */
+
+/* Return a string for the xcalstd enum */
+char *xcalstd2str(xcalstd std) {
+ switch(std) {
+ case xcalstd_native:
+ return "NATIVE";
+ case xcalstd_xrdi:
+ return "XRDI";
+ case xcalstd_gmdi:
+ return "GMDI";
+ case xcalstd_xrga:
+ return "XRGA";
+ default:
+ break;
+ }
+ return "None";
+}
+
+/* Parse a string to xcalstd, */
+/* return xcalstd_none if not recognized */
+xcalstd str2xcalstd(char *str) {
+ if (strcmp(str, "NATIVE") == 0)
+ return xcalstd_native;
+ if (strcmp(str, "XRDI") == 0)
+ return xcalstd_xrdi;
+ if (strcmp(str, "GMDI") == 0)
+ return xcalstd_gmdi;
+ if (strcmp(str, "XRGA") == 0)
+ return xcalstd_xrga;
+
+ return xcalstd_none;
+}
+
+