summaryrefslogtreecommitdiffstats
path: root/backend_shinkos6245.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-29 19:36:10 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-30 00:07:32 -0400
commitb0beca13242979c9b18e6f0e14012b266f22fc0b (patch)
tree0df8a5f0666ab2bcfbd9c284dd478a368c235fa6 /backend_shinkos6245.c
parenta0d109785a7ef80efa962905aac900207e063322 (diff)
downloadselphy_print-b0beca13242979c9b18e6f0e14012b266f22fc0b.tar.gz
selphy_print-b0beca13242979c9b18e6f0e14012b266f22fc0b.tar.bz2
selphy_print-b0beca13242979c9b18e6f0e14012b266f22fc0b.zip
shinkos2245: Further improvements:
* Support setting image quality in the print command * Error code list improved. * Correct image correction data queries * Better documentation * Fix settime call Still broken: * Corrdata parsing * Print 'mode' enumeration (possibly media checking too) * And Printing, duh.
Diffstat (limited to 'backend_shinkos6245.c')
-rw-r--r--backend_shinkos6245.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/backend_shinkos6245.c b/backend_shinkos6245.c
index f14b3b8..e504644 100644
--- a/backend_shinkos6245.c
+++ b/backend_shinkos6245.c
@@ -142,17 +142,6 @@ static const struct sinfonia_param s6245_params[] =
#define PARAM_SLEEP_120MIN 0x00000004
#define PARAM_SLEEP_240MIN 0x00000005
-struct s6245_settime_cmd {
- struct sinfonia_cmd_hdr hdr;
- uint8_t enable; /* 0 or 1 */
- uint8_t second;
- uint8_t minute;
- uint8_t hour;
- uint8_t day;
- uint8_t month;
- uint8_t year;
-} __attribute__((packed));
-
static const char *s6245_error_codes(uint8_t major, uint8_t minor)
{
switch(major) {
@@ -1174,13 +1163,13 @@ static int shinkos6245_main_loop(void *vctx, const void *vjob) {
/* Send Set Time */
if (ctx->dev.type != P_KODAK_8810) {
- struct s6245_settime_cmd *settime = (struct s6245_settime_cmd *)cmdbuf;
+ struct sinfonia_settime_cmd *settime = (struct sinfonia_settime_cmd *)cmdbuf;
time_t now = time(NULL);
struct tm *cur = localtime(&now);
memset(cmdbuf, 0, CMDBUF_LEN);
cmd->cmd = cpu_to_le16(SINFONIA_CMD_SETTIME);
- cmd->len = cpu_to_le16(0);
+ cmd->len = cpu_to_le16(sizeof(*settime)-sizeof(settime->hdr));
settime->enable = 1;
settime->second = cur->tm_sec;
settime->minute = cur->tm_min;
@@ -1479,7 +1468,7 @@ static const char *shinkos6245_prefixes[] = {
struct dyesub_backend shinkos6245_backend = {
.name = "Sinfonia CHC-S6245 / Kodak 8810",
- .version = "0.34" " (lib " LIBSINFONIA_VER ")",
+ .version = "0.35" " (lib " LIBSINFONIA_VER ")",
.uri_prefixes = shinkos6245_prefixes,
.cmdline_usage = shinkos6245_cmdline,
.cmdline_arg = shinkos6245_cmdline_arg,