From: Scott J. <sc...@li...> - 2005-08-16 18:15:08
|
Gregg Liming wrote: > > Scott, > > Thanks for sharing. I can't(won't) count the number of times that > I've done something similar. Since it may not be clear for all, I'll > try to explain what I believe to be the issue. <snip> > Hope this helps. > Yes, it does. It's one of those things that you read and sort of understand, then when it comes time to actually code, you totally forget. And I'm sure I have other bits of similar bad code in there too so I guess I'll have to go searching for them. Thanks again. > Gregg > > > >> So for the benefit of the archives and some future newbie, here's how >> NOT to write code to turn on a window fan : >> >> >> if (($Save{room_temp} > '75') and state $window_fan eq OFF and >> $Save{outside_temp} < $Save{room_temp}) { >> set $window_fan ON; >> sleep 2; >> set $window_fan OFF; >> sleep 2; >> set $window_fan ON; >> run_voice_cmd 'Window fan ON'; >> } >> if (($Save{room_temp} < '73') and state $window_fan eq ON) { >> run_voice_cmd 'Window fan OFF'; >> } >> if (($Save{outside_temp} > $Save{room_temp}) and state $window_fan eq >> ON) { >> run_voice_cmd 'Window fan OFF'; >> } >> >> >> Thanks to all for the help tracking this down. MH is back up and >> working great! >> >> Scott >> >> >> >> >> ------------------------------------------------------- >> SF.Net email is Sponsored by the Better Software Conference & EXPO >> September 19-22, 2005 * San Francisco, CA * Development Lifecycle >> Practices >> Agile & Plan-Driven Development * Managing Projects & Teams * Testing >> & QA >> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf >> ________________________________________________________ >> To unsubscribe from this list, go to: >> http://sourceforge.net/mail/?group_id=1365 >> >> > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > ________________________________________________________ > To unsubscribe from this list, go to: > http://sourceforge.net/mail/?group_id=1365 > > |