Commit graph

53 commits

Author SHA1 Message Date
Solomon Peachy db0c7d8b99 all: Eliminate the multi-stage cmdline parsing.
Unfortunately this means we lose the '-B backend' method, but the
overall control flow is much, much simpler now.
2015-08-13 21:09:56 -04:00
Solomon Peachy 0e91abe75d canonselphy: Log the job type before the job/printer mismatch error. 2015-08-12 23:15:53 -04:00
Solomon Peachy de8a32424c all: Unified approach to extra_vid/pid/type
This required a modification to all attach() methods.

Also, fix canonselphy's parsing/attachment code.
2015-08-12 22:56:29 -04:00
Solomon Peachy f67a8f8ea5 common: Eliminate early_parse() from backend.
only canonselphy used it.  This also showed that extra_vid/pid was broken.
2015-08-12 22:51:45 -04:00
Solomon Peachy cd03e9a22f misc: Fix some unitialized variable warnings that show up with -Os 2015-07-04 10:12:57 -04:00
Solomon Peachy 24c3550feb all: Ensure all malloc() failures are caught and logged. 2015-06-23 20:48:52 -04:00
Solomon Peachy b731dc04f8 Update copyright notice. 2015-01-05 21:39:22 -05:00
Solomon Peachy ba99a0a4ca canon_selphy: Log the CP900 state. 2014-06-30 19:44:29 -04:00
Solomon Peachy c9f650166d canonselphy: Fix early parse on subsequent pages. 2014-06-25 11:53:12 -04:00
Solomon Peachy fdbb7337f4 selphy: Try a hack for the CP900. 2014-06-25 11:51:00 -04:00
Solomon Peachy 0381965f40 canonselphy: Add USB PID for CP520 2014-05-30 19:08:47 -04:00
Solomon Peachy 0f6a28019e canonselphy: Get rid of placeholders for CP910/CP820 2014-05-06 19:41:58 -04:00
Solomon Peachy 22a02e7696 canonselphy: Use CUPS error responses.
early_parse -> non-CUPS errors
 read_parse - CUPS errors
 main_loop - CUPS errors

All other cases don't matter, as they're not invoked by CUPS.
2014-04-20 11:08:04 -04:00
Solomon Peachy fce71590c4 canonselphy: Add some preliminary docs on the CP820/CP910 2014-03-13 19:51:16 -04:00
Solomon Peachy 4f11516536 canonselphy: Remove forced manufacturer string. 2014-03-13 10:52:07 -04:00
Solomon Peachy 00e905de6e canonselphy: Add error recovery string to all ES printers too.
Since the CP-series is identical (even the CP790) I decided to just try
adding the string the to the ES1 and kick off a bad print.  The error
recovery just worked.

So I copied it to all the ES printers.
2014-03-05 09:43:01 -05:00
Solomon Peachy aeeb1e3404 canonselphy: Rearrange a little, no functional change. 2014-02-18 23:33:33 -05:00
Solomon Peachy 1e8c0ae99a Silence a pile of 'cppcheck' warnings.
...And fix a legitimate bug in the process!
2014-02-11 13:41:55 -05:00
Solomon Peachy 024775eaf5 canonselphy: Revamp CP790 media detection and error detection. 2014-02-10 21:50:05 -05:00
Solomon Peachy 29bfe527de canonselphy: Forgot to bump version. 2014-02-08 15:54:15 -05:00
Solomon Peachy a359fa17c4 canonselphy: Split the CP790 and ES40 handling apart.
They share nothing beyond a common spool file format:
  * Different readbacks (though the necessary parts are unique)
  * Different error codes
  * Different media reporting system and identifiers
2014-02-08 14:45:55 -05:00
Solomon Peachy 8856cb2512 canonselphy: Add another error condition on the CP790.
Also disable paper type checking on the CP790 for the moment.
2014-02-08 13:59:24 -05:00
Solomon Peachy 485300982e canonselphy: Detect 'ribbon depleted' conditition with CP-10.
Also add an "unknown error" for the CP790.
2014-02-04 07:44:19 -05:00
Solomon Peachy edbad88f05 canonselphy: Send the error recovery/reset sequence after an error occurs.
And add error recovery code for the CP-10.

(I wonder if the ES series uses the same reset sequence?)
2014-02-03 20:12:00 -05:00
Solomon Peachy 704d29354d canonselphy: Differentiate between 'out of paper' vs 'wrong paper' and
'out of ribbon' vs 'wrong ribbon' errors on CP_XXX models.

Also disable the error recovery code, as it caused more problems than it
helped.
2014-01-31 13:23:04 -05:00
Solomon Peachy 0d8336a4e7 canonselphy: Attempt to recover from error conditions if we know how.
This is experimental!
2014-01-31 09:38:53 -05:00
Solomon Peachy 34e3b64fc4 all: Get rid of the now-obsolete 'multipage_capable' flag. 2014-01-30 21:37:07 -05:00
Solomon Peachy 64938b839e canonselphy: Independently report on incorrect paper/ribbon errors for
the CP_XXX family.

Also make the errors more consistent with their language.
2014-01-30 20:00:21 -05:00
Solomon Peachy 4094e9d635 canonselphy: Add 'media feed error' to CP790 error list.
Also add placeholder entries for CP820 and CP910
2014-01-30 08:50:08 -05:00
Solomon Peachy 85284b321f canonselphy: ES1 now detects depleted media. 2014-01-29 22:11:32 -05:00
Solomon Peachy 4d2d9bed87 canonselphy: Improve ES3 error detection -- Incorrect media. 2014-01-29 21:36:17 -05:00
Solomon Peachy 7f8fe44269 canonselphy: Improve ES2 error derection some more. 2014-01-29 21:31:26 -05:00
Solomon Peachy 0b1e2dd6e3 canonselphy: ES1 error handling improved. 2014-01-29 21:26:59 -05:00
Solomon Peachy 1eefa82b64 canonselphy: We need to match the full 8-bit papercode for all models other than the CP790. 2014-01-29 21:05:21 -05:00
Solomon Peachy d577517a24 canonselphy: Fix init sequence detect for cp790/es40 2014-01-29 12:02:12 -05:00
Solomon Peachy 5e996322e3 canonselphy: Log the types when we fail to match on media. 2014-01-29 10:29:22 -05:00
Solomon Peachy 7a4b99f6d7 canonselphy: Tweak the paper type detection. 2014-01-29 10:26:56 -05:00
Solomon Peachy 3764319eb2 canonselphy: Rewrite the error detection code.
Now instead of a dumb offset/flag, we parse the whole response from the
printer and holistically figure out what's wrong.  On a per-printer type
basis.

This was needed because the ES40 and CP790 share a single "backend" but
have radically different error reporting.
2014-01-29 10:22:20 -05:00
Solomon Peachy 375aed9243 canonselphy: Theoretically add support for the CP790 2014-01-28 21:23:24 -05:00
Solomon Peachy ee7dae82a5 canonselphy: Document what's known about the CP790.
Next up is to code support.
2014-01-28 19:59:58 -05:00
Solomon Peachy acd4eea41d canonselphy: Add USB ID for SELPHY CP790 2014-01-27 14:09:23 -05:00
Solomon Peachy 6c335ea1e4 Update copyright notice; it's 2014 now! 2014-01-23 16:07:25 -05:00
Solomon Peachy 6acc8b553c backends: say "## copies remaining" to differentiate between pages. 2014-01-22 09:10:34 -05:00
Solomon Peachy 4aa050f695 backends: Fix a double-free error in all backends.
Since we always call read_parse() we always free the data buffers.  Make
sure we set them to NULL or we will try to double-free them when we
terminate normally.
2014-01-21 20:34:00 -05:00
Solomon Peachy 2eb20f90f4 backends: A 0-length read when doing our inital header load is
and EOF, so treat it as such and don't error out.
2014-01-20 19:41:52 -05:00
Solomon Peachy d7d60b7191 backends: Enhance to add multipage capabilities.
DNP ds40/ds80 and Sony UP-DR150/200 backends do NOT support this yet.

Next up is to commit the core.
2014-01-17 22:54:25 -05:00
Solomon Peachy 821fc52db9 README updates. 2014-01-17 21:24:18 -05:00
Solomon Peachy 76c2e87fad selphy: Retry short reads when loading in plane data.
Also check for short read when loading header and footer.
2014-01-13 18:29:50 -05:00
Solomon Peachy 1888254860 all: Move to using the common read_data() instead of direct libusb functions. 2013-12-21 22:55:33 -05:00
Solomon Peachy 875ebd2d76 all: Silence nearly all DEBUG outputs unless DYESUB_DEBUG is set in the
environment.
2013-12-21 22:15:18 -05:00