PDA

View Full Version : States seem to be in reverse order


cholland
October 13th, 2002, 03:55 PM
Hi,

Girder v3.0.21

I have gone past 2 states and I noticed something I thought I would bring up...

I might not be interpeting the "State Count" and "Begin State" correctly. I have one button that changes the size of the video.

This is the way I was expecting it to be. Going from top down...
Begin State State Count
160x120 1 5
240x180 2 5
320x240 3 5
640x480 4 5
Full Screen 5 5

But, it actually operates in reverse order. Again, going from top down...

Begin State State Count
160x120 5 5
240x180 4 5
320x240 3 5
640x480 2 5
Full Screen 1 5

It would be nice to just put them in the state order instead of actually filling in the states. Not sure, maybe people do something weird where they need to fill in the states, or maybe it is a pain to add this feature :)

Thanks for your help Ron! Working great!

Ron
October 13th, 2002, 03:55 PM
Command with a state of 1 will be run,
thus the before you press a button it looks like this: (before the button press)

Command CurrentState BeginState Run
--------------------------------------
160x120 1 5 *
240x180 2 5
320x240 3 5
640x480 4 5
Full Screen 5 5

Second time you press a button it the states will look like this (before the button press)

Command CurrentState BeginState Run
--------------------------------------
160x120 2 5
240x180 3 5
320x240 4 5
640x480 5 5
Full Screen 1 5 *

3rd time it will look like this:

Command CurrentState BeginState Run
--------------------------------------
160x120 3 5
240x180 4 5
320x240 5 5
640x480 1 5 *
Full Screen 2 5

I hope this makes it clear,

-Ron

cholland
October 13th, 2002, 03:55 PM
Clear as mud. It is cornfusing. It does operate the way you are saying, which seems to be in reverse order?

I am having a hard time understanding the
"Current State", "Begin State" & "State Count".

The "Current State" doesn't change until the "Begin State" is changed and the "Apply" or "OK" Button is pressed. So, the way I am interpeting it is...

"State Count" = The number of states in the state group.
"Begin State" = "Current State" = The command which will be executed when the state occurs.

I would expect Girder to initialize to State 1, then proceed to State 2, then State 3 and so on.

It's kinda neat that I can execute 2 commands using the same remote button. I have it setup where I change channels and have Say saying "Channel Changed". (Just a test) I am wondering the order in which they occur, Tree order I imagine?

Thanks for you help. Girder is awesome. I see it as being the entertainment center of the future. Using a computer instead of an expensive entertainment center. Controlling Winamp, TV & Phone & other devices. (My little project). If you need help, I am fairly proficient in programming languages.

Thanks again,

Ron
October 13th, 2002, 03:55 PM
No the Begin state is the state that Girder initializes the command to when it loads the .gir file or when you select "Reset states" from the "edit" menu. So beginstate is fixed.


************************************************** ******

How it works in words:

Girder checks the CurrentState to see if it is 1 when invert is NOT checked, if so it executes the command.

Girder checks the CurrentState to see if it is NOT 1 when invert IS checked, if so it executes the command.

Girder increases the CurrentState by 1

Girder check if the CurrentState is larger
than StateCount, if so it sets the CurrentState to 1. ( wrap around.)



************************************************** ******

Pseudo programing language:

IF ( CurrentState is "1" ) THEN
EXECUTE command
ELSE
IF ( Invert is checked ) THEN
EXECUTE command
ELSE
DO NOTHING
END
END

CurrentState = CurrentState + 1

IF ( CurrentState > StateCount ) THEN
CurrentState = 1


************************************************** ******

Example :

Lets say we are looking at 1 command with the following options:

Beginstate 3, CurrentState 3 (we just loaded the .gir file), and StateCount 5. Not inverted.

You press a button on the remote (or whatever event happend), our command was assigned that event!

Girder checks the state, it finds 3, invert
is not checked so it just increases the current state. Its now 4.

You press again

Girder checks, and finds 4 for the current state, not inverted thus only increase the state. Its now 5

You press again

Girder checks, and finds 5 for the current state, not inverted thus only increase the state. And the immediately set it to 1 as the statecount is 5. Current State is now 1

You press again

Girder checks, and finds 1 for the current
state!! Ahh execute the command!! Then
increase the currentstate. Current state is
now 2.

You press again

Girder checks, and finds 2 for the current state, not inverted thus only increase the state. Current State is now 3

And we have made a complete circle.

I hope this clarifies things!

-Ron

[Edited by RonB on 02-25-2001 at 10:56 AM GMT]

cholland
October 13th, 2002, 03:55 PM
Ok,

I suppose I will end this. It is a tough subject for me. Thanks for bearing with me.
The way I set it up works just fine. Just thought I would mention it.

Command-BeginState-CurrentState-StateCount
160x120-5-5-5
240x180-4-4-5
320x240-3-3-5
640x480-2-2-5
Full Screen-1-1-5

(The "Current State" is automatically set to the "Begin State")

When I press the remote it operates in that order. From 5 downto 1. (160x120 first, Full-Screen last and initializes/First State = Full Screen)

It is very confusing, understanding the
"Begin State", "Current State" & "State Count".

I guess I will play around with the settings more till I fully understand it and possibly explain it in a way others can understand, because it's just not making sense yet.

Regards,

cholland
October 13th, 2002, 03:55 PM
Ok,

I suppose I will end this. It is a tough subject for me. Thanks for bearing with me.
The way I set it up works just fine. Just thought I would mention it.

Command-BeginState-CurrentState-StateCount
160x120-5-5-5
240x180-4-4-5
320x240-3-3-5
640x480-2-2-5
Full Screen-1-1-5

(The "Current State" is automatically set to the "Begin State")

When I press the remote it operates in that order. From 5 downto 1. (160x120 first, Full-Screen last and initializes/First State = Full Screen)

It is very confusing, understanding the
"Begin State", "Current State" & "State Count".

I guess I will play around with the settings more till I fully understand it and possibly explain it in a way others can understand, because it's just not making sense yet.

Regards,

cholland
October 13th, 2002, 03:55 PM
ahhhhhhhhhh Cripes.

Problem with "Preview" and "Send Reply" in previous Message. Best to just click "Send Reply" instead of previewing Message.

I give up. Goodbye cruel world :)