summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Lagendijk <louis.lagendijk@gmail.com>2017-01-06 23:28:56 +0100
committerLouis Lagendijk <louis.lagendijk@gmail.com>2017-01-06 23:28:56 +0100
commit9bc734042f6a2af159772eef412efe7c65ebb02f (patch)
treeb8d9038f69b2ba0c454ed788573a330583d90ddc
parent6c439bce791522aa9cd3fc04cf62087bdd6c6875 (diff)
Revert "pixma_mp150.c: scan param 0x26-0x29 should contain localtime HHMM, also for MB5000 series"
This reverts commit eb712c6bd8ca6a42a1d3941583fa18b9981b8712.
-rw-r--r--backend/pixma_mp150.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/backend/pixma_mp150.c b/backend/pixma_mp150.c
index e815d59..5e96d2b 100644
--- a/backend/pixma_mp150.c
+++ b/backend/pixma_mp150.c
@@ -58,7 +58,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/time.h>
#include <time.h> /* localtime(C90) */
#include "pixma_rename.h"
@@ -708,8 +707,6 @@ send_scan_param (pixma_t * s)
{
mp150_t *mp = (mp150_t *) s->subdriver;
uint8_t *data;
- struct timeval tv;
- struct tm *ptm;
unsigned raw_width = calc_raw_width (mp, s->param);
unsigned h = MIN (s->param->h + calc_shifting (s),
s->cfg->height * s->param->ydpi / 75);
@@ -787,11 +784,11 @@ send_scan_param (pixma_t * s)
switch (s->cfg->pid)
{
case MG5300_PID:
- case MB5000_PID:
- /* localtime (HHMM) */
- gettimeofday(&tv, NULL);
- ptm = localtime(&tv.tv_sec);
- strftime( (char *)(data +0x26), 5, "%H%M", ptm);
+ /* unknown values (perhaps counter) for MG5300 series---values must be 0x30-0x39: decimal 0-9 */
+ data[0x26] = 0x32; /* using example values from a real scan here */
+ data[0x27] = 0x31;
+ data[0x28] = 0x34;
+ data[0x29] = 0x35;
break;
default: