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 / 3998
3997  |  3999
Subject: 
Re: Shutdown/Off while program running crashes BrickOS
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Sun, 17 Jun 2007 06:21:39 GMT
Viewed: 
15744 times
  
In lugnet.robotics.rcx.legos, Steve Hassenplug wrote:
I have a big and somewhat complicated BrickOS program that I believe is
reasonably well behaved.  All my loops monitor shutdown_requested and I
have
tested stopping the program with the Run button while the program is in
various
states and it always seems to shutdown perfectly.  My problem is if I
shutdown
with the Off button.  In that case the firmware crashes and I have to pull
the
battery out to reset the RCX and then re-download the firmware.

I believe the same thing happens if I leave the program running and the
RCX does
an auto-shutoff though I don't have recent experience with this.  How do
you set
the auto-shutoff to either a very long time or disable it completely?

Gus,

It sounds like the code is testing for pressing the run button, but not
pressing the power button.

I would think testing for shutdown would be good enough, but who knows...
:)  What version of BrickOS are you using?

I'd be glad to take a look at it, if you want.

Steve

I'm using what appears to be called BrickOS 0.9.0.  It was installed using John
Hansen's simplified installation from his BricxCC sourceforge site.

I was under the impression that on later versions of BrickOS, like what I am
using, the firmware handles the Run and Power buttons.  My code does use the
View and Prgm buttons but I do no special handling of the other two buttons
other then monitoring shutdown_requested and exiting and killing all tasks when
that is encountered.

Hitting the Run button while my program is running, does causes
shutdown_requested to return true and my program does exit cleanly.  Hitting the
On/Off button while the program is running does appear to turn off the RCX but
when I turn it back on it appears at first to be okay but when I run the program
things go haywire and then I have to reset the RCX by removing a battery.
Powering off with the On/Off button while the program is not running does not
seem to cause any ill effects.

This is part of my Line Maze program but it is not critical, it just would have
been nice to have had it resolved before going to BrickWorld.  If I accidentally
forget to stop the program before hitting Off or if I let the auto-off do its
thing, then I know I will need to re-download the firmware and my program.  I
will show you in Chicago and maybe you can help figure out a solution when we
meet.

Gus



Message has 1 Reply:
  Re: Shutdown/Off while program running crashes BrickOS
 
(...) Yes, that should be the latest version. (...) That is correct. You shouldn't need to do anything else. At one point, I made some changes to the firmware so the program could also access the run button. But, normally all that is handled in the (...) (17 years ago, 17-Jun-07, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: Shutdown/Off while program running crashes BrickOS
 
(...) Gus, It sounds like the code is testing for pressing the run button, but not pressing the power button. I would think testing for shutdown would be good enough, but who knows... :) What version of BrickOS are you using? I'd be glad to take a (...) (17 years ago, 17-Jun-07, to lugnet.robotics.rcx.legos)

4 Messages in This Thread:

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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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