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

Script editor

Expand Messages
  • Scott Miller
    It s been a long day. The script editor is up and running, though it needs a bit more testing and I want to add a few more commands and variables before I
    Message 1 of 10 , Jun 1, 2008
    • 0 Attachment
      It's been a long day. The script editor is up and running, though it
      needs a bit more testing and I want to add a few more commands and
      variables before I release it.

      Script space is limited to 512 bytes for now, until I work out some
      problems with the interrupt vector redirects that share the same flash
      block as the second part of the script area.

      Altitude and speed (and maybe temperature) all need to be added as
      variables still.

      The script code executes 8 times per second, unless you use the QUICK
      token, which causes an immediate return. Note that there is NO checking
      to make sure you don't do something stupid like modify the flash
      configuration 8 times (or more) each second. Do that, and you'll likely
      wear out the flash in a few hours and render the chip unusable.

      I may add a basic check for such things, but I can't catch everything
      (see 'halting problem').

      Indentation is automatic, and adjusts as you add, delete, or move lines.
      Scripts are compiled to p-code and stored in flash, and are converted
      back into human-readable form when they're read by the config program.
      This means you can't store comments or formatting, but there's also no
      source code to keep around.

      There are a few instructions in the script engine that aren't
      implemented yet, in particular the flag manipulation instructions (set,
      clear, toggle, and test 8 boolean flags) and the PEEK/POKE instructions
      that'll let you do interesting things with the hardware.

      As the script system matures, I think it'll open up some really
      interesting possibilities for the T2. And I'm hoping that the increase
      in 'how do you do x with the script system' emails will be offset by a
      decrease in 'can you add feature y' requests. =]

      Very tired. Going to bed. Back around noon.

      Scott
    • Roger Hammond
      I m anxious to give it a try. Nice job on the interface. It sounds like you an incredible amount of work. Thanks for your efforts. Roger KCØMWM www.cnnsp.org
      Message 2 of 10 , Jun 1, 2008
      • 0 Attachment
        I'm anxious to give it a try. Nice job on the interface. It sounds like you an incredible amount of work.
        Thanks for your efforts.
         
        Roger KCØMWM
         
      • radionerd1
        I have been trying to send a one time beacon when I switch from profile 1 to 2. The script wiki shows a do once command. I Tried do once under macro T and
        Message 3 of 10 , Sep 15, 2009
        • 0 Attachment
          I have been trying to send a one time beacon when I switch from profile
          1 to 2. The script wiki shows a "do once" command. I Tried "do once"
          under macro T and others settings to no avail. The startup command works
          ok, but the other commands don't.

          How do I set the "do once" command?


          On Startup
          Exec "beacon >10-8 code-4"
          End Block
          On GPS Fix
          Exec "BEACON >NUVI-350 LOCKED ON TARGET"
          End Block
          On Interrupt
          Exec "BEACON >LOST SKY"
          End Block
          If Profile 1
          Exec "BEACON >LOCAL MODE WIDE1-1"
          End Block
          If Profile 2
          Exec "BEACON >DX MODE, WIDE1-1,WIDE2-1"
          End Block



          Thanks,
          Alan
        • Scott Miller
          ... Make sure you ve got the latest firmware version loaded. DO ONCE is a new command. ... This should be something like: On GPS Fix Do Once Exec BEACON
          Message 4 of 10 , Sep 15, 2009
          • 0 Attachment
            > I have been trying to send a one time beacon when I switch from profile
            > 1 to 2. The script wiki shows a "do once" command. I Tried "do once"

            Make sure you've got the latest firmware version loaded. DO ONCE is a
            new command.

            > On GPS Fix
            > Exec "BEACON >NUVI-350 LOCKED ON TARGET"
            > End Block

            This should be something like:

            On GPS Fix
            Do Once
            Exec "BEACON >NUVI-350 LOCKED ON TARGET"
            End Block
            End Block

            > On Interrupt
            > Exec "BEACON >LOST SKY"
            > End Block

            I don't think this is what you want. 'On Interrupt' is the IRQ input
            and has nothing to do with the GPS fix. You could use an 'else' on the
            'On GPS Fix'.

            > If Profile 1
            > Exec "BEACON >LOCAL MODE WIDE1-1"
            > End Block
            > If Profile 2
            > Exec "BEACON >DX MODE, WIDE1-1,WIDE2-1"
            > End Block

            Again, you want 'Do Once' inside each IF block.

            Scott
          • radionerd1
            Thanks Scott, I have the latest fw, but still can t figure how to put do once into the script. When I tried macro T do once shows up like this, but
            Message 5 of 10 , Sep 16, 2009
            • 0 Attachment
              Thanks Scott,
              I have the latest fw, but still can't figure how to put "do once" into the script. When I tried macro T" do once"  shows up like this, but doesn't work:
              Alan

              On GPS Fix
               Macro "Do Once"
                Exec "BEACON >NUVI-350 LOCKED ON TARGET"
                End Block
              End Block
              --- In tracker2@yahoogroups.com, Scott Miller <scott@...> wrote:
              >
              > > I have been trying to send a one time beacon when I switch from profile
              > > 1 to 2. The script wiki shows a "do once" command. I Tried "do once"
              >
              > Make sure you've got the latest firmware version loaded. DO ONCE is a
              > new command.
              >
              > > On GPS Fix
              > > Exec "BEACON >NUVI-350 LOCKED ON TARGET"
              > > End Block
              >
              > This should be something like:
              >
              > On GPS Fix
              > Do Once
              > Exec "BEACON >NUVI-350 LOCKED ON TARGET"
              > End Block
              > End Block
              >
              > > On Interrupt
              > > Exec "BEACON >LOST SKY"
              > > End Block
              >
              > I don't think this is what you want. 'On Interrupt' is the IRQ input
              > and has nothing to do with the GPS fix. You could use an 'else' on the
              > 'On GPS Fix'.
              >
              > > If Profile 1
              > > Exec "BEACON >LOCAL MODE WIDE1-1"
              > > End Block
              > > If Profile 2
              > > Exec "BEACON >DX MODE, WIDE1-1,WIDE2-1"
              > > End Block
              >
              > Again, you want 'Do Once' inside each IF block.
              >
              > Scott
              >
            • Scott Miller
              No, there should be a Do Once button in the script editor. If not, you don t have the latest version of otwincfg. Scott
              Message 6 of 10 , Sep 16, 2009
              • 0 Attachment
                No, there should be a 'Do Once' button in the script editor. If not,
                you don't have the latest version of otwincfg.

                Scott

                radionerd1 wrote:
                >
                >
                > Thanks Scott,
                > I have the latest fw, but still can't figure how to put "do once" into
                > the script. When I tried macro T" do once" shows up like this, but
                > doesn't work:
                > Alan
                >
                > On GPS Fix
                > *Macro "Do Once"*
                > Exec "BEACON >NUVI-350 LOCKED ON TARGET"
                > End Block
                > End Block
                > --- In tracker2@yahoogroups.com, Scott Miller <scott@...> wrote:
                > >
                > > > I have been trying to send a one time beacon when I switch from profile
                > > > 1 to 2. The script wiki shows a "do once" command. I Tried "do once"
                > >
                > > Make sure you've got the latest firmware version loaded. DO ONCE is a
                > > new command.
                > >
                > > > On GPS Fix
                > > > Exec "BEACON >NUVI-350 LOCKED ON TARGET"
                > > > End Block
                > >
                > > This should be something like:
                > >
                > > On GPS Fix
                > > Do Once
                > > Exec "BEACON >NUVI-350 LOCKED ON TARGET"
                > > End Block
                > > End Block
                > >
                > > > On Interrupt
                > > > Exec "BEACON >LOST SKY"
                > > > End Block
                > >
                > > I don't think this is what you want. 'On Interrupt' is the IRQ input
                > > and has nothing to do with the GPS fix. You could use an 'else' on the
                > > 'On GPS Fix'.
                > >
                > > > If Profile 1
                > > > Exec "BEACON >LOCAL MODE WIDE1-1"
                > > > End Block
                > > > If Profile 2
                > > > Exec "BEACON >DX MODE, WIDE1-1,WIDE2-1"
                > > > End Block
                > >
                > > Again, you want 'Do Once' inside each IF block.
                > >
                > > Scott
                > >
                >
                >
              • Alan
                I must be blind, The otwincfg.exe is ver 1.0.0.1 on OT2 support web page, and WIKI. can t see the do once command in script editor. Thanks, Alan
                Message 7 of 10 , Sep 16, 2009
                • 0 Attachment
                  I must be blind, The otwincfg.exe is ver 1.0.0.1 on OT2 support web page, and WIKI. can't see the "do once" command in script editor.

                  Thanks,
                  Alan




                  --- In tracker2@yahoogroups.com, Scott Miller <scott@...> wrote:
                  >
                  > No, there should be a 'Do Once' button in the script editor. If not,
                  > you don't have the latest version of otwincfg.
                  >
                  > Scott
                  >
                  > radionerd1 wrote:
                  > >
                  > >
                  > > Thanks Scott,
                  > > I have the latest fw, but still can't figure how to put "do once" into
                  > > the script. When I tried macro T" do once" shows up like this, but
                  > > doesn't work:
                  > > Alan
                  > >
                  > > On GPS Fix
                  > > *Macro "Do Once"*
                  > > Exec "BEACON >NUVI-350 LOCKED ON TARGET"
                  > > End Block
                  > > End Block
                  > > --- In tracker2@yahoogroups.com, Scott Miller <scott@> wrote:
                  > > >
                  > > > > I have been trying to send a one time beacon when I switch from profile
                  > > > > 1 to 2. The script wiki shows a "do once" command. I Tried "do once"
                  > > >
                  > > > Make sure you've got the latest firmware version loaded. DO ONCE is a
                  > > > new command.
                  > > >
                  > > > > On GPS Fix
                  > > > > Exec "BEACON >NUVI-350 LOCKED ON TARGET"
                  > > > > End Block
                  > > >
                  > > > This should be something like:
                  > > >
                  > > > On GPS Fix
                  > > > Do Once
                  > > > Exec "BEACON >NUVI-350 LOCKED ON TARGET"
                  > > > End Block
                  > > > End Block
                  > > >
                  > > > > On Interrupt
                  > > > > Exec "BEACON >LOST SKY"
                  > > > > End Block
                  > > >
                  > > > I don't think this is what you want. 'On Interrupt' is the IRQ input
                  > > > and has nothing to do with the GPS fix. You could use an 'else' on the
                  > > > 'On GPS Fix'.
                  > > >
                  > > > > If Profile 1
                  > > > > Exec "BEACON >LOCAL MODE WIDE1-1"
                  > > > > End Block
                  > > > > If Profile 2
                  > > > > Exec "BEACON >DX MODE, WIDE1-1,WIDE2-1"
                  > > > > End Block
                  > > >
                  > > > Again, you want 'Do Once' inside each IF block.
                  > > >
                  > > > Scott
                  > > >
                  > >
                  > >
                  >
                • gsdatplace
                  I was just going to post a screen cap of the button in OTWinCfg since I just recently re-wrote my config to use it rather than the set flags/clear flags route.
                  Message 8 of 10 , Sep 16, 2009
                  • 0 Attachment
                    I was just going to post a screen cap of the button in OTWinCfg since I just recently re-wrote my config to use it rather than the set flags/clear flags route.
                    "How can someone miss the button? its right th.....oh..."
                    The buttons missing in my OTWinCfg as well now...
                    Don't have my OT2 to plug in close at hand, is it conditional on if the OT2 is connected or your using a offline file?

                    Garrett
                    VE6RKY

                    --- In tracker2@yahoogroups.com, "Alan" <alan@...> wrote:
                    >
                    >
                    > I must be blind, The otwincfg.exe is ver 1.0.0.1 on OT2 support web page, and WIKI. can't see the "do once" command in script editor.
                    >
                    > Thanks,
                    > Alan
                    >
                    >
                    >
                    >
                    > --- In tracker2@yahoogroups.com, Scott Miller <scott@> wrote:
                    > >
                    > > No, there should be a 'Do Once' button in the script editor. If not,
                    > > you don't have the latest version of otwincfg.
                    > >
                    > > Scott
                  • Scott Miller
                    Somehow I got the wrong version up there. Try it now. Scott
                    Message 9 of 10 , Sep 16, 2009
                    • 0 Attachment
                      Somehow I got the wrong version up there. Try it now.

                      Scott

                      Alan wrote:
                      >
                      >
                      >
                      > I must be blind, The otwincfg.exe is ver 1.0.0.1 on OT2 support web
                      > page, and WIKI. can't see the "do once" command in script editor.
                      >
                      > Thanks,
                      > Alan
                      >
                      > --- In tracker2@yahoogroups.com <mailto:tracker2%40yahoogroups.com>,
                      > Scott Miller <scott@...> wrote:
                      > >
                      > > No, there should be a 'Do Once' button in the script editor. If not,
                      > > you don't have the latest version of otwincfg.
                      > >
                      > > Scott
                      > >
                      > > radionerd1 wrote:
                      > > >
                      > > >
                      > > > Thanks Scott,
                      > > > I have the latest fw, but still can't figure how to put "do once" into
                      > > > the script. When I tried macro T" do once" shows up like this, but
                      > > > doesn't work:
                      > > > Alan
                      > > >
                      > > > On GPS Fix
                      > > > *Macro "Do Once"*
                      > > > Exec "BEACON >NUVI-350 LOCKED ON TARGET"
                      > > > End Block
                      > > > End Block
                      > > > --- In tracker2@yahoogroups.com
                      > <mailto:tracker2%40yahoogroups.com>, Scott Miller <scott@> wrote:
                      > > > >
                      > > > > > I have been trying to send a one time beacon when I switch from
                      > profile
                      > > > > > 1 to 2. The script wiki shows a "do once" command. I Tried "do
                      > once"
                      > > > >
                      > > > > Make sure you've got the latest firmware version loaded. DO ONCE is a
                      > > > > new command.
                      > > > >
                      > > > > > On GPS Fix
                      > > > > > Exec "BEACON >NUVI-350 LOCKED ON TARGET"
                      > > > > > End Block
                      > > > >
                      > > > > This should be something like:
                      > > > >
                      > > > > On GPS Fix
                      > > > > Do Once
                      > > > > Exec "BEACON >NUVI-350 LOCKED ON TARGET"
                      > > > > End Block
                      > > > > End Block
                      > > > >
                      > > > > > On Interrupt
                      > > > > > Exec "BEACON >LOST SKY"
                      > > > > > End Block
                      > > > >
                      > > > > I don't think this is what you want. 'On Interrupt' is the IRQ input
                      > > > > and has nothing to do with the GPS fix. You could use an 'else'
                      > on the
                      > > > > 'On GPS Fix'.
                      > > > >
                      > > > > > If Profile 1
                      > > > > > Exec "BEACON >LOCAL MODE WIDE1-1"
                      > > > > > End Block
                      > > > > > If Profile 2
                      > > > > > Exec "BEACON >DX MODE, WIDE1-1,WIDE2-1"
                      > > > > > End Block
                      > > > >
                      > > > > Again, you want 'Do Once' inside each IF block.
                      > > > >
                      > > > > Scott
                      > > > >
                      > > >
                      > > >
                      > >
                      >
                      >
                    • Alan
                      Thanks Scott!!! I had to play with some conflicting settings to make it all work, TXNOFIX when set on sent both packets too close in time. Played with power
                      Message 10 of 10 , Sep 17, 2009
                      • 0 Attachment
                        Thanks Scott!!!

                        I had to play with some conflicting settings to make it all work,
                        TXNOFIX when set on sent both packets too close in time. Played with
                        power control setting, set to 2 seconds to slow down packet rate. I
                        don't power through the OT2, just using the delay. The counter with
                        250ms debounce seamed to help too. I also realised that my BK radio has
                        a 2 second self test at startup, so the power control delay allows time
                        for the radio to come out of self check before blasting off.

                        The "GPS lock" beacon must be a pulsed output, because it would beacon
                        spasticly when set.


                        I got the following script to work with my profile toggle switch, and
                        startup beacon:

                        If Profile 1
                        Do Once
                        Exec "BEACON >LOCAL MODE, WIDE1-1"
                        End Block
                        End Block
                        If Profile 2
                        Do Once
                        Exec "BEACON >DX MODE, WIDE1-1,WIDE2-1"
                        End Block
                        End Block
                        On Startup
                        Do Once
                        Exec "BEACON >10-8 CODE-4"
                        End Block
                        End Block

                        Cool features,
                        Alan




                        --- In tracker2@yahoogroups.com, Scott Miller <scott@...> wrote:
                        >
                        > Somehow I got the wrong version up there. Try it now.
                        >
                        > Scott
                        >
                        > Alan wrote:
                        > >
                        > >
                        > >
                        > > I must be blind, The otwincfg.exe is ver 1.0.0.1 on OT2 support web
                        > > page, and WIKI. can't see the "do once" command in script editor.
                        > >
                        > > Thanks,
                        > > Alan
                        > >
                        > > --- In tracker2@yahoogroups.com <mailto:tracker2%40yahoogroups.com>,
                        > > Scott Miller scott@ wrote:
                        > > >
                        > > > No, there should be a 'Do Once' button in the script editor. If
                        not,
                        > > > you don't have the latest version of otwincfg.
                        > > >
                        > > > Scott
                        > > >
                        > > > radionerd1 wrote:
                        > > > >
                        > > > >
                        > > > > Thanks Scott,
                        > > > > I have the latest fw, but still can't figure how to put "do
                        once" into
                        > > > > the script. When I tried macro T" do once" shows up like this,
                        but
                        > > > > doesn't work:
                        > > > > Alan
                        > > > >
                        > > > > On GPS Fix
                        > > > > *Macro "Do Once"*
                        > > > > Exec "BEACON >NUVI-350 LOCKED ON TARGET"
                        > > > > End Block
                        > > > > End Block
                        > > > > --- In tracker2@yahoogroups.com
                        > > <mailto:tracker2%40yahoogroups.com>, Scott Miller <scott@> wrote:
                        > > > > >
                        > > > > > > I have been trying to send a one time beacon when I switch
                        from
                        > > profile
                        > > > > > > 1 to 2. The script wiki shows a "do once" command. I Tried
                        "do
                        > > once"
                        > > > > >
                        > > > > > Make sure you've got the latest firmware version loaded. DO
                        ONCE is a
                        > > > > > new command.
                        > > > > >
                        > > > > > > On GPS Fix
                        > > > > > > Exec "BEACON >NUVI-350 LOCKED ON TARGET"
                        > > > > > > End Block
                        > > > > >
                        > > > > > This should be something like:
                        > > > > >
                        > > > > > On GPS Fix
                        > > > > > Do Once
                        > > > > > Exec "BEACON >NUVI-350 LOCKED ON TARGET"
                        > > > > > End Block
                        > > > > > End Block
                        > > > > >
                        > > > > > > On Interrupt
                        > > > > > > Exec "BEACON >LOST SKY"
                        > > > > > > End Block
                        > > > > >
                        > > > > > I don't think this is what you want. 'On Interrupt' is the
                        IRQ input
                        > > > > > and has nothing to do with the GPS fix. You could use an
                        'else'
                        > > on the
                        > > > > > 'On GPS Fix'.
                        > > > > >
                        > > > > > > If Profile 1
                        > > > > > > Exec "BEACON >LOCAL MODE WIDE1-1"
                        > > > > > > End Block
                        > > > > > > If Profile 2
                        > > > > > > Exec "BEACON >DX MODE, WIDE1-1,WIDE2-1"
                        > > > > > > End Block
                        > > > > >
                        > > > > > Again, you want 'Do Once' inside each IF block.
                        > > > > >
                        > > > > > Scott
                        > > > > >
                        > > > >
                        > > > >
                        > > >
                        > >
                        > >
                        >
                      Your message has been successfully submitted and would be delivered to recipients shortly.