To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 649
648  |  650
Subject: 
Re: useful battery program
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Wed, 12 Jan 2000 02:48:53 GMT
Viewed: 
1425 times
  
Ben Jackson schrieb:
Yes, the current behavior of displaying the return address for the interrupt
handler isn't very useful.  :-)  I was considering making it display battery

Saved my life a couple of times, when LNP was locking up the system in
an entirely incomprehensible way. (I'd really appreciate "Unreachable
code" warnings sometimes... or maybe they scrolled away.)

voltage.  It would be neat if some combination of VIEW and other buttons could
be used to do basic things like select sensor type and display mode for quick
debugging.

How about this: a short button press changes to the next sensor, whereas
keeping the button down slowly cycles through the sensor modes? Saves us
from combinations like Ctrl-Alt-Del and the like ;-)

I'm taking about the decimal points in the "text" area.  My battery program
uses dlcd_show(LCD_3_DOT) to make `8.7v'.  If you just hit RUN to stop it, you
end up with 'ST.OP' in the text area.  I think the decimal points should be
considered part of the text area.  I was wondering if cputs("9.6v") should
actually *use* them, but then cputs doesn't have a 1:1 mapping of input
character to output LCD digit.

Clear them, of cause.

printf to conio or just for networking?  I've been thinking about writing
myself a library to display longer messages in the text area.  So something
like cputs("put\nme\ndown") cycles through cputs("put") cputs("me")
cputs("down") once a second.

Once you're interpreting special symbols like \n, you might as well use
the decimal dots where they're available, and interpret "m" as "nn", "M"
as "NN" and so on.

Two seperate printfs would be overkill. I'd prefer a strprintf, or
rather a strnprintf for security. Fine for the current state of
networking, and cprintf would be a mere wrapper then, as output niceties
are handled in cputs.

Markus.



Message is in Reply To:
  Re: useful battery program
 
(...) Yes, the current behavior of displaying the return address for the interrupt handler isn't very useful. :-) I was considering making it display battery voltage. It would be neat if some combination of VIEW and other buttons could be used to do (...) (25 years ago, 12-Jan-00, to lugnet.robotics.rcx.legos)

4 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR