Your code looks OK at first glance. Is scripting enabled in both profiles?
Scott
gsdatplace wrote:
>
>
> Just got a new vehicle and in getting ready to mount my radio again, I
> loaded the latest firmware last night into my OT2. In a braindead moment
> I loaded defaults which wiped out my scripts which power up and down my
> Nuvi and change my beacon via voltage profile changing... DOH!
> Being able to save the scrips would be nice... (hint hint ;) I'm
> resorting to printscreen lol.
>
> I started to rewrite them and tried a "modified" version of the "Do
> Once" example in the wiki:
>
> If Profile 1
> Do Once
> Exec "POWER ON"
> End Block
> Else
> Do Once
> Exec "POWER OFF"
> End Block
> End Block
>
> I didn't get the expected response from the OT2, on restart the power
> comes on as I expected, but on switching to profile 2 it never goes off.
> I switched back and forth between profiles a few times with no change.
> I tried reversing it with If Profile 2:Power Off:Else:Power On, on a
> download it stays off and switching profiles back and forth won't turn
> it on.
>
> I also tried from another example, beaconing a event I believe:
> If Profile 1
> Do Once
> Exec "POWER ON"
> End Block
> End Block
> If Profile 2
> Do Once
> Exec "POWER OFF"
> End Block
> End Block
>
> It also would start up with power on, switching to profile 2 would do
> nothing, back to 1 did nothing, then back to two would get it to power
> down, so the first switch of state seemed to get missed. It was almost
> like it didn't register the state of profile 1 on startup and was stuck
> in script waiting for the state to change.
>
> I finally was able to get it to operated properly by reversing the above
> to putting "If Profile 2" first, possibly because its starting in
> profile 1? But I'm also at a loss as to why the simpler code with "Else"
> doesn't work.
> Is there something wrong with my "Else" script at the top? It would be a
> much cleaner way to do it if I could.
>
> Garrett Sloan
> VE6RKY
>
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/tracker2/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/tracker2/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/