MarkH
August 7th, 2006, 07:41 PM
Is there a tried-and-true approach for maintaining persistent state with Girder 4.0?
I have an older Samsung DLP TV set that does not have discrete codes for selecting inputs. I have three sources connected to the set -- "Component 2", "Component 3" and "PC". The Samsung insists that "Antenna" is also present, even though I have no OTA antenna connected. To choose an input source using the Samsung remote, I press the "Input" key then use the arrow keys to navigate up or down to the appropriate source, then press the "Enter" key to select that source. Learning the IR codes for these four actions is straightforward -- but I am completely new to Girder, and don't see the best way to maintain the state of the selected input source inside Girder (even following a reboot of the PC). The effect I'm after is to be able to use my Firefly remote and press "Video", then have the appropriate combination of IR codes emitted from my USB-UIRT to select the Samsung input source menu, navigate up or down as appropriate to (in this case) the "Component 3" source, then emit the "Enter" code. There are four possible states (Antenna, Component 2, Component 3, PC) and the navigation from any of these sources to any other is simple to enumerate -- but for this to work robustly, I need to have a way to persist the state of the input source inside Girder. (For those of you with programming background, this is simply a small finite-state machine). I suspect the answer lies with using the ptable library, but I'm so new to Girder (and never heard of Lua before now) so I thought I'd ask before heading down this road. Is there a simpler way to do this?
-M.
I have an older Samsung DLP TV set that does not have discrete codes for selecting inputs. I have three sources connected to the set -- "Component 2", "Component 3" and "PC". The Samsung insists that "Antenna" is also present, even though I have no OTA antenna connected. To choose an input source using the Samsung remote, I press the "Input" key then use the arrow keys to navigate up or down to the appropriate source, then press the "Enter" key to select that source. Learning the IR codes for these four actions is straightforward -- but I am completely new to Girder, and don't see the best way to maintain the state of the selected input source inside Girder (even following a reboot of the PC). The effect I'm after is to be able to use my Firefly remote and press "Video", then have the appropriate combination of IR codes emitted from my USB-UIRT to select the Samsung input source menu, navigate up or down as appropriate to (in this case) the "Component 3" source, then emit the "Enter" code. There are four possible states (Antenna, Component 2, Component 3, PC) and the navigation from any of these sources to any other is simple to enumerate -- but for this to work robustly, I need to have a way to persist the state of the input source inside Girder. (For those of you with programming background, this is simply a small finite-state machine). I suspect the answer lies with using the ptable library, but I'm so new to Girder (and never heard of Lua before now) so I thought I'd ask before heading down this road. Is there a simpler way to do this?
-M.