From: PASCHAL,DAVID (HP-Roseville,ex1) <dav...@hp...> - 2000-12-06 00:06:14
|
Hi, Joe. Joe Piolunek wrote: > There wasn't any real improvement after changing the port > type. Without the > usenibble=1 option, xojpanel still fails to start 1/25 times > averaged over > 500 attempts to execute. That's strange. So are there any error messages in syslog related to this? If I know where it fails, then I might know what needs to be fixed. You could also try adding the "debug=1" parameter when loading ieee12844pp.o. > cat /proc/parports/0/devices showed this: > IEEE1284.4 device > lp I noticed that situation too when playing around with printing the other day. It seems dangerous to me, even though I could still print, so that's why I added a note in color_printing.txt recommending to change the port from /dev/lpX to /dev/null. (regarding patch's error messages) > The trouble seems to have been related the the last line in > your patch, which > contained only '^@' . I made my own diff -c and then using > diff, compared > your patch and mine. The difference was a newline at the end > of one of the > files. Looking at both patches in vim shows '^@' at the end > of your patch, > but not at the end of mine. Is the last character something > added by your > editor? I just looked at a hex dump of the message I got back from the mailing list, and I didn't see any null bytes in the message. Perhaps your mail client is adding them when you save attachments? You could always remove the offending character before patching. Has anybody else seen this problem, where patch complains that "patch unexpectedly ends in middle of line"? > Every time the printer polling timer fires (500ms), it calls > getPrinterLcdMessages() which uses some of the original > xojpanel code to make > a request for each one of the message lines, one immediately > after the other. > They are separate requests in that sense, but the time > interval would be > extremely small unless a delay were introduced somewhere > outside xojpanel. > None of the code I added to xojpanel would create any > deliberate delay > between asking for line 1 and line 2. I still don't know how > the low-level > code retrieves the two message lines, but I haven't spent > much time looking > at it. It probably would be easier to understand if there were more > documentation in the code. What happens is that for each line, getPrinterLCDMessages() calls PMLGetObjectValue, which sends the request to the peripheral, and then calls PMLProcess, which sits around and waits for the response. When PMLProcess gets the response, it calls XojPanel::processorFunc (which is a callback function registered at startup by PMLSetup), which saves the string for the correct line. I'm not sure why you couldn't add a delay between lines 1 and 2. Did you try calling sleep(5 seconds or whatever) in between the two line requests in getPrinterLCDMessages? David |