[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] progress indicator

From: Joerg Wunsch
Subject: Re: [avrdude-dev] progress indicator
Date: Fri, 25 Jul 2003 22:10:14 +0200
User-agent: Mutt/1.2.5i

As Rune Christensen wrote:

> I see two different solutions the one I have send earlier or
> the one that Brian had send:
>   Writing: |###########                              |  29% ETA 22.3 sec

(Which is about the same as my earlier suggestion, plus the added
ETA.  I do know where Brian's got that idea from. :-)

> But if I have understood the problem right when capturing the output
> not all control characters (0x00 - 0x1f) have exactly the same
> function as in the terminal. The \r gives a new line (Alex said so)
> when it is put on the screen in VI or emacs but it returns the
> cursor to the start of the same line as it is on now in a terminal.

Progress indicators don't make any sense when the output is captured,
regardless of whether it's in vi, Emacs, or just in a file.  They
only make sense when output is a tty.  So i think it's OK to turn -q
automatically on when output is not a tty.

In Emacs, you get something like:

$ avrdude -pm128 -o/tmp/foo -v

avrdude: Version 4.1.0cvs
         Copyright (c) 2000-2003 Brian Dean, address@hidden

         System wide configuration file is "/usr/local/etc/avrdude.conf"
         User configuration file is "/usr/home/j/.avrduderc"

         Using Port            : /dev/cuaa2
         Using Programmer      : stk500
         AVR Part              : ATMEGA128
         Chip Erase delay      : 9000 us
         PAGEL                 : PD7
         BS2                   : PA0
         RESET disposition     : dedicated
         RETRY pulse           : SCK
         serial program mode   : yes
         parallel program mode : yes
         Memory Detail         :

                                     Page                       Polled
           Memory Type Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ------ ------ ---- ------ ----- ----- ---------
           eeprom      no       4096    8     0  9000  9000 0xff 0xff
           flash       yes    131072  256   512  4500  9000 0xff 0x00
           lfuse       no          1    0     0     0     0 0x00 0x00
           hfuse       no          1    0     0     0     0 0x00 0x00
           efuse       no          1    0     0     0     0 0x00 0x00
           lock        no          1    0     0     0     0 0x00 0x00
           calibration no          1    0     0     0     0 0x00 0x00
           signature   no          3    0     0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500
         Hardware Version: 2
         Firmware Version: 1.14

avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e9702
avrdude: reading flash memory:
^M      ^M     0^M      ^M   256^M      ^M   512^M      ^M   768^M      ^M  
1024^M      ^M  1280^M      ^M  1536^M      ^M  1792^M      ^M  2048^M      ^M  
2304^M      ^M  2560^M      ^M  2816^M      ^M  3072^M      ^M  3328^M      ^M  
3584^M      ^M  3840^M      ^M  4096^M      ^M  4352^M      ^M  4608^M      ^M  
4864^M      ^M  5120^M      ^M  5376^M      ^M  5632^M      ^M  5888^M      ^M  
6144^M      ^M  6400^M      ^M  6656^M      ^M  6912^M      ^M  7168^M      ^M  
7424^M      ^M  7680^M      ^M  7936^M      ^M  8192^M      ^M  8448^M      ^M  
8704^M      ^M  8960^M      ^M  9216^M      ^M  9472^M      ^M  9728^M     ...

> Therefore the selected solution should be a solution that works both in VI,
> emacs and in a terminal.

You can't have that.  So just make it work for a terminal, and provide
an option to turn it off for those who don't like it at all (e. g.
since their tty output is too slow).

J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]