RFC: hacks to get the SureLab D700 working

Solomon Peachy <[email protected]>
Newsgroups gmane.linux.printing.gimp-print.devel
Message-ID <[email protected]>
Here are the non-XML changes sitting in my tree. The changes in 
stpi_escp2_init_printer() need to be gated off some sort of feature 
flag, perhaps <rollOnly/> in the model.xml file that defines a 
MODEL_ROLL_ONLY capability bit?  Not sure what approach I should take 
here.

The other change disables the special-case in 720x360 resolution so the 
ESC(U command matches what the windows driver sends the printer, but 
there doesn't seem to be any adverse effects to leaving it unchanged.

diff --git a/src/main/escp2-driver.c b/src/main/escp2-driver.c
index 13c39e73..011a43e1 100644
--- a/src/main/escp2-driver.c
+++ b/src/main/escp2-driver.c
@@ -405,6 +405,16 @@ escp2_set_dot_size(stp_vars_t *v)
     stp_send_command(v, "\033(e", "bcc", 0, pd->drop_size);
 }
 
+static void
+escp2_set_cutter(stp_vars_t *v)
+{
+  escp2_privdata_t *pd = get_privdata(v);
+  int l = pd->page_true_height * 2880 / 72;
+  /* always 2880, independent of configured resolutions */
+
+  stp_send_command(v, "\033(g", "bl", l);
+}
+
 static void
 escp2_set_page_height(stp_vars_t *v)
 {
@@ -623,9 +633,12 @@ stpi_escp2_init_printer(stp_vars_t *v)
   escp2_set_printer_weave(v);
   escp2_set_printhead_speed(v);
   escp2_set_dot_size(v);
+  escp2_set_cutter(v);
   escp2_set_printhead_resolution(v);
+#if 0
   escp2_set_page_height(v);
   escp2_set_margins(v);
+#endif
   escp2_set_paper_dimensions(v);
 }
 
diff --git a/src/main/print-escp2.c b/src/main/print-escp2.c
index a1814eac..24463843 100644
--- a/src/main/print-escp2.c
+++ b/src/main/print-escp2.c
@@ -3889,8 +3889,10 @@ adjusted_vertical_resolution(const stp_vars_t *v, const res_t *res)
 {
   if (res->vres >= escp2_base_separation(v) * 2)
     return res->vres;
+#if 0 // XXX this causes ESC(U to differ from the Windows driver
   else if (res->hres >= escp2_base_separation(v) * 2)	/* Special case 720x360 */
     return escp2_base_separation(v) * 2;
+#endif
   else if (res->vres % 90 == 0)
     return res->vres;
   else


 - Solomon
-- 
Solomon Peachy			      pizza at shaftnet dot org (email&xmpp)
                                      @pizza:shaftnet dot org   (matrix)
High Springs, FL                      speachy (libra.chat)

_______________________________________________
Gimp-print-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimp-print-devel
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE3H5Sx9DyiyB5hnENrGLLO/XVulEFAmETED8ACgkQrGLLO/XV
ulGciQ//RaNpF1dPxd88QDIWo6/r6e2XZrcactmTOlXY/WDENuq7zKhH/FChqpeD
ONKYRmeiBk+acFIBomPxUQrtKdOJ/Uc8XPjyQLk4Wkdjatxu+NsUeEAUaYddzY8p
yDTHBwVLIDXsjFFSqg9xv6K9AjwCgA2z+IRMKQnLUDzqmvipqbZvMHBk3trQUBle
2LaQBISkUt9/ZQt5405KXmNAU/7uizMSEERh/t1BEW5TjcM6cITmiJSaQEhFOuS5
H1orUDymw/acvZzcWrCiFZfbMzfPw3WtcW/PoeCWdq7f4/jf3pKGpUbIzZR6OeoB
MoK3Pa67LLIvU+0TSL7diSO3DGjqYuEx5suB9c2udTUQvMvxqutYtxQYLtn8pmiu
AJtvmZzA2gAVPBmcB9XKH+iy0YZdi8+uZIAwQu4qurerGADEYIrOELbiG9JYCFoo
2tzEhFChEUzBomvejc8oG2nKCJ63Bu7yT6YcRkC345mbeXDHYYbKCgiUuSOss0x7
jVgVTBoegOCUa/edan0bBtph/VVvPatkCdiyFizamACl8yGrhesB1xsNXkZZb73M
tChdPOEkC7Do1kiAUQ/s0AbFdbWPwwqwMvKlc2pabPpJLZlZdarOWh7ghhqBEukB
Flyd8HsF5Ad61BMfNtd9ZvfbUCfrzt/ARn3QRHkL7/TbTW4wCV4=
=GfxQ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.