Loading ...
Sorry, an error occurred while loading the content.

15418Re: How can I test the current speed in a script?

Expand Messages
  • francois.rogez
    Apr 2, 2013
      --- In tracker2@yahoogroups.com, James Ewen <ve6srv@...> wrote:
      > It all depends upon what you need this routine to do, and how much you
      > are changing between the profiles.
      > Let's pretend that you want to change the path used from WIDE2-2 while
      > moving to WIDE2-1 when sitting still, but only after sitting still for
      > 5 minutes.


      > Well, set up a script that tests against being in profile 2, and while
      > in profile 2, start a timer. Increment the timer every second, and
      > when the timer reaches 300 (5 minutes * 60 seconds), execute the
      > command to change the path to WIDE2-1.
      > You'll need to test if you switch back to profile 1, and if you do,
      > clear the timer value to zero, and set the path in profile 2 back to
      > WIDE2-2. You can set a variable to check to see if you've changed
      > parameters while in profile 2 or not so you don't do unnecessary
      > writes.


      > So, what do you want to do, and how often do you want to do it?
      > --
      > James
      > VE6SRV

      Thanks James, I updated my script based on your explanation.
      My initial script was not working, because I had assumed that the profiles defined in OTWINCFG were static, and just used to set the active parameters.
      Instead, as you described, the profiles are directly modified avery time a script modifies a parameter, therefore I needed to re-set the parameters to their original value.
      The parameters I want to change are POWER, INTERVAL, and COMMENT.
      The attached script has been working well for the last 2 weeks

      If Profile 1
        Do Once
          Exec "POWER ON"
          Exec "INTERVAL 60"
          Exec "COMMENT S"
          Set Counter 1 = 0
          Exec "BEACON"
        End Block
        On Second
          Increment Counter 1
          If Counter 1 = 300
            Exec "COMMENT P"
            Exec "POWER 3"
            Exec "INTERVAL 900"
          End Block
        End Block
      End Block
      If Profile 2
        Do Once
          Exec "COMMENT M"
          Exec "BEACON"
        End Block
      End Block

    • Show all 8 messages in this topic