Subversion Repositories freemyipod

Rev

Rev 951 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 951 Rev 959
Line 434... Line 434...
434
            <bitmask>: the bitmask of the consoles to read from.
434
            <bitmask>: the bitmask of the consoles to read from.
435
        """
435
        """
436
        bitmask = to_int(bitmask)
436
        bitmask = to_int(bitmask)
437
        while True:
437
        while True:
438
            resp = self.emcore.cread()
438
            resp = self.emcore.cread()
439
            self.logger.write(resp.data)
439
            self.logger.write(resp.data.decode("ascii"))
440
            time.sleep(0.1 / resp.maxsize * (resp.maxsize - len(resp.data)))
440
            time.sleep(0.1 / resp.maxsize * (resp.maxsize - len(resp.data)))
441
    
441
    
442
    @command
442
    @command
443
    def writedevconsole(self, bitmask, *args):
443
    def writedevconsole(self, bitmask, *args):
444
        """
444
        """
Line 449... Line 449...
449
        text = ""
449
        text = ""
450
        for word in args:
450
        for word in args:
451
            text += word + " "
451
            text += word + " "
452
        text = text[:-1]
452
        text = text[:-1]
453
        self.logger.info("Writing '%s' to the device consoles identified with 0x%X\n" % (text, bitmask))
453
        self.logger.info("Writing '%s' to the device consoles identified with 0x%X\n" % (text, bitmask))
454
        self.emcore.cwrite(text, bitmask)
454
        self.emcore.cwrite(text.encode("ascii"), bitmask)
455
    
455
    
456
    @command
456
    @command
457
    def flushconsolebuffers(self, bitmask):
457
    def flushconsolebuffers(self, bitmask):
458
        """
458
        """
459
            flushes one or more of the device consoles' buffers.
459
            flushes one or more of the device consoles' buffers.