Display Time Block Bug

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
bungeshea
Posts: 207
Joined: 14 Aug 2011, 08:45
Location: Australia
Contact:

Display Time Block Bug

Post by bungeshea »

I have noticed a bug with the Display Number/Display Time blocks from Team Hassenplug. If you wire a timer into these blocks and place it in a loop, when the timer reaches 33 seconds, instead of displaying 0:33:00 it displays 0:-31:00 and continues counting down in minus until it reaches 0:00:00 and then it starts happening all over again. I have attached a video made with NeXT Screen and Hyper Cam 2, and the test program. Does anyone else experience this bug?

Attachments:
Display Time Bug.zip

(Because the attachment file will not upload, follow the above link to download it from the Mindboards Repository)
Last edited by bungeshea on 29 Apr 2011, 08:38, edited 3 times in total.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Display Time/Number blocks bug

Post by mattallen37 »

studbrickmaster wrote:...I have attached a video ... and the test program...
Where is it?
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
bungeshea
Posts: 207
Joined: 14 Aug 2011, 08:45
Location: Australia
Contact:

Display Time Block Bug

Post by bungeshea »

mattallen37 wrote:
studbrickmaster wrote:...I have attached a video ... and the test program...
Where is it?
It was not uploading with the message. I do not know if it is an issue of size (2.1MB) or just phpBB. I have uploaded the file to here.
timpattinson
Posts: 224
Joined: 30 Oct 2010, 04:10
Location: 127.0.0.1
Contact:

Re: Display Time Block Bug

Post by timpattinson »

studbrickmaster wrote:I have attached a video made with NeXT Screen and Hyper Cam 2, and the test program.
Can't you just use the Capture AVI feature in NXTScreen
Commit to Lego Mindstorms StackExchange Q&A http://area51.stackexchange.com/proposals/4105
Minboards IRC Channel #mindboards on Freenode
My blog: http://timpattinson.wordpress.com/
bungeshea
Posts: 207
Joined: 14 Aug 2011, 08:45
Location: Australia
Contact:

Re: Display Time Block Bug

Post by bungeshea »

timpattinson wrote:
studbrickmaster wrote:I have attached a video made with NeXT Screen and Hyper Cam 2, and the test program.
Can't you just use the Capture AVI feature in NXTScreen
What capture AVI feature?
timpattinson
Posts: 224
Joined: 30 Oct 2010, 04:10
Location: 127.0.0.1
Contact:

Re: Display Time Block Bug

Post by timpattinson »

studbrickmaster wrote:
timpattinson wrote:
studbrickmaster wrote:I have attached a video made with NeXT Screen and Hyper Cam 2, and the test program.
Can't you just use the Capture AVI feature in NXTScreen
What capture AVI feature?
avi.jpg
Commit to Lego Mindstorms StackExchange Q&A http://area51.stackexchange.com/proposals/4105
Minboards IRC Channel #mindboards on Freenode
My blog: http://timpattinson.wordpress.com/
bungeshea
Posts: 207
Joined: 14 Aug 2011, 08:45
Location: Australia
Contact:

Re: Display Time Block Bug

Post by bungeshea »

:?:
Attachments
nextscreen.JPG
timpattinson
Posts: 224
Joined: 30 Oct 2010, 04:10
Location: 127.0.0.1
Contact:

Re: Display Time Block Bug

Post by timpattinson »

Try upgrading nxtscreen/bricxcc
Which one are you using.
Commit to Lego Mindstorms StackExchange Q&A http://area51.stackexchange.com/proposals/4105
Minboards IRC Channel #mindboards on Freenode
My blog: http://timpattinson.wordpress.com/
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: Display Time Block Bug

Post by h-g-t »

There are 2 links to the file - who cares what he used to create it?
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Display Time Block Bug

Post by mattallen37 »

It does that because the value is a 16-bit signed value. Because time can't be negative, the block should use either an unsigned 16-bit variable (up to ~65,000), or an unsigned 32-bit variable (up to >4,000,000,000).
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests