From: Walter L. (ETM) <Wal...@et...> - 2001-06-22 07:47:35
|
Hi Bruce, To come back on the Timer issue. It was a fault in my code as i'm used the timer variable more then once thats why it never resets. Another question concerning the WEB interface. Im pretty busy with building a GUI based on the MH WEB interface. I must say this is working great. I made some sections for example MP3 player, lights, phone. Theres 1 problem with this, when for example i put the light off with the WEB interface then status in the web interface is also set to off, thats ok. But when somebody put the light on with the remote control or timed event then the status is not updated to ON. Is there a way to refresh the web page (light status) to reflect the current state? Thanks for your effort, Walter -----Original Message----- From: Walter Leemput (ETM) Sent: vrijdag 18 mei 2001 15:11 To: 'mis...@li...' Subject: RE: [misterhouse-users] Timer unset command Hi Bruce, The only difference I see in your example and my that im using the "my $var" and you dont. I made the variable global by putting it in the 1e column. (my $dsp_timer;) Is the "my" not really neccessary for creating the timer object? Thanks, Walter -----Original Message----- From: Bruce Winter [mailto:br...@mi...] Sent: vrijdag 18 mei 2001 14:41 To: mis...@li... Subject: RE: [misterhouse-users] Timer unset command > I defined a global timer which is reset by set $dsp_timer 0; > .This is working (timer is cancelled) > But when using unset $dsp_timer; which should be the equivalent > the timer is never reset! > > My dsp_timer = New Timer; > > set $dsp_timer 0; #this works > unset $dsp_timer; #this is NOT working > > set $dsp_timer 4, '&startmp3', 1; > > Did somebody have the same experience? I just tried the attached test case ... seems to work ok (I don't get the expired message if I run either test 2 or 3 to unset the timer). Must be something else in your code that is triggering the problem. If you send me you full code file, I'll try it here. Bruce $dsp_timer = new Timer; $dsp_timer_v = new Voice_Cmd 'dsp timer [1,2,3]'; if ($state = said $dsp_timer_v) { set $dsp_timer 2 if $state == 1; set $dsp_timer 0 if $state == 2; unset $dsp_timer if $state == 3; } print_log 'DSP timer expired' if expired $dsp_timer; ________________________________________________________ To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365 |