+ Reply to Thread
Results 1 to 8 of 8

Thread: Testing percent prefix

  1. #1

    Default Testing percent prefix

    Code:
    OBJ
    
      PST    :  "FullDuplexSerial"
      GPS    :  "FullDuplexSerial"
    
    CON
    
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    
      GetLat   = $05
      GetLong  = $06
    
    PUB main 
    
      PST.start(31, 30, 0, 115200)
      GPS.start(0, 0, %1100, 9600)                ' GPS connected to pin0
       
      repeat
        GPS.str(string("!GPS"))                   ' GPS command header
        GPS.tx(GetLat)                            '  for latitude  
        WriteVal
       
        PST.str(string(",")) 
        GPS.str(string("!GPS"))                   ' GPS command header
        GPS.tx(GetLong)                           '  for longitude 
        WriteVal
        PST.str(string(13))
        WaitCnt(ClkFreq + Cnt)                    ' Wait 1 second
      
    PRI  WriteVal | Degrees, Minutes, MinutesD, Dir, workVal
    
      WaitCnt(ClkFreq / 10 + Cnt)                 ' 1/10 second wait
    
      Degrees := GPS.rx                           ' Retrieve bytes from GPS
      Minutes := GPS.rx
      MinutesD := (GPS.rx << 8) | GPS.rx
      Dir := GPS.rx==1
      
      if dir == -1                                ' If Dir = -1, prepend - sign
        PST.str(string("-"))
      PST.dec(Degrees)
      PST.str(string("."))
    
      workVal := (Minutes * 1000 / 6) + (MinutesD / 60)
      PST.dec(workVal)

  2. #2

    Default Re: Testing percent prefix

    Copy and pasted from Notepad:

    Code:
    OBJ
    
      PST    :  "FullDuplexSerial"
      GPS    :  "FullDuplexSerial"
    
    CON
    
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    
      GetLat   = $05
      GetLong  = $06
    
    PUB main 
    
      PST.start(31, 30, 0, 115200)
      GPS.start(0, 0, %1100, 9600)                ' GPS connected to pin0
       
      repeat
        GPS.str(string("!GPS"))                   ' GPS command header
        GPS.tx(GetLat)                            '  for latitude  
        WriteVal
       
        PST.str(string(",")) 
        GPS.str(string("!GPS"))                   ' GPS command header
        GPS.tx(GetLong)                           '  for longitude 
        WriteVal
        PST.str(string(13))
        WaitCnt(ClkFreq + Cnt)                    ' Wait 1 second
      
    PRI  WriteVal | Degrees, Minutes, MinutesD, Dir, workVal
    
      WaitCnt(ClkFreq / 10 + Cnt)                 ' 1/10 second wait
    
      Degrees := GPS.rx                           ' Retrieve bytes from GPS
      Minutes := GPS.rx
      MinutesD := (GPS.rx << 8) | GPS.rx
      Dir := GPS.rx==1
      
      if dir == -1                                ' If Dir = -1, prepend - sign
        PST.str(string("-"))
      PST.dec(Degrees)
      PST.str(string("."))
    
      workVal := (Minutes * 1000 / 6) + (MinutesD / 60)
      PST.dec(workVal)

  3. #3

    Default Re: Testing percent prefix

    Copy and pasted from WordPad (can support Unicode)

    Code:
    OBJ
    
      PST    :  "FullDuplexSerial"
      GPS    :  "FullDuplexSerial"
    
    CON
    
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    
      GetLat   = $05
      GetLong  = $06
    
    PUB main 
    
      PST.start(31, 30, 0, 115200)
      GPS.start(0, 0, %1100, 9600)                ' GPS connected to pin0
       
      repeat
        GPS.str(string("!GPS"))                   ' GPS command header
        GPS.tx(GetLat)                            '  for latitude  
        WriteVal
       
        PST.str(string(",")) 
        GPS.str(string("!GPS"))                   ' GPS command header
        GPS.tx(GetLong)                           '  for longitude 
        WriteVal
        PST.str(string(13))
        WaitCnt(ClkFreq + Cnt)                    ' Wait 1 second
      
    PRI  WriteVal | Degrees, Minutes, MinutesD, Dir, workVal
    
      WaitCnt(ClkFreq / 10 + Cnt)                 ' 1/10 second wait
    
      Degrees := GPS.rx                           ' Retrieve bytes from GPS
      Minutes := GPS.rx
      MinutesD := (GPS.rx << 8) | GPS.rx
      Dir := GPS.rx==1
      
      if dir == -1                                ' If Dir = -1, prepend - sign
        PST.str(string("-"))
      PST.dec(Degrees)
      PST.str(string("."))
    
      workVal := (Minutes * 1000 / 6) + (MinutesD / 60)
      PST.dec(workVal)

  4. #4

    Default Re: Testing percent prefix

    And now copied and pasted, then edited

    Code:
    OBJ
    
      PST    :  "FullDuplexSerial"
      GPS    :  "FullDuplexSerial"
    
    CON
    
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    
      GetLat   = $05
      GetLong  = $06
    
    PUB main 
    
      PST.start(31, 30, 0, 115200)
      GPS.start(0, 0, 00, 9600)                ' GPS connected to pin0
       
      repeat
        GPS.str(string("!GPS"))                   ' GPS command header
        GPS.tx(GetLat)                            '  for latitude  
        WriteVal
       
        PST.str(string(",")) 
        GPS.str(string("!GPS"))                   ' GPS command header
        GPS.tx(GetLong)                           '  for longitude 
        WriteVal
        PST.str(string(13))
        WaitCnt(ClkFreq + Cnt)                    ' Wait 1 second
      
    PRI  WriteVal | Degrees, Minutes, MinutesD, Dir, workVal
    
      WaitCnt(ClkFreq / 10 + Cnt)                 ' 1/10 second wait
    
      Degrees := GPS.rx                           ' Retrieve bytes from GPS
      Minutes := GPS.rx
      MinutesD := (GPS.rx << 8) | GPS.rx
      Dir := GPS.rx==1
      
      if dir == -1                                ' If Dir = -1, prepend - sign
        PST.str(string("-"))
      PST.dec(Degrees)
      PST.str(string("."))
    
      workVal := (Minutes * 1000 / 6) + (MinutesD / 60)
      PST.dec(workVal)
    Last edited by GordonMcComb; 03-12-2012 at 11:00 PM. Reason: Test to see if the %11 prefix disappears -- it does

  5. #5

    Default Re: Testing percent prefix

    Posts without editing: OK.
    Posts with editing: Seems to drop characters, at least for me.

    Using Firefox 10.0.2 under Windows XP SP3.

    -- Gordon

  6. #6

    Default Re: Testing percent prefix

    Per Phil's suggestion I'm now using the forum's plain text editor. After posting this I will edit it, to see if the percent prefix goes awry.

    Code:
    OBJ
    
      PST    :  "FullDuplexSerial"
      GPS    :  "FullDuplexSerial"
    
    CON
    
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    
      GetLat   = $05
      GetLong  = $06
    
    PUB main 
    
      PST.start(31, 30, 0, 115200)
      GPS.start(0, 0, %1100, 9600)                ' GPS connected to pin0
       
      repeat
        GPS.str(string("!GPS"))                   ' GPS command header
        GPS.tx(GetLat)                            '  for latitude  
        WriteVal
       
        PST.str(string(",")) 
        GPS.str(string("!GPS"))                   ' GPS command header
        GPS.tx(GetLong)                           '  for longitude 
        WriteVal
        PST.str(string(13))
        WaitCnt(ClkFreq + Cnt)                    ' Wait 1 second
      
    PRI  WriteVal | Degrees, Minutes, MinutesD, Dir, workVal
    
      WaitCnt(ClkFreq / 10 + Cnt)                 ' 1/10 second wait
    
      Degrees := GPS.rx                           ' Retrieve bytes from GPS
      Minutes := GPS.rx
      MinutesD := (GPS.rx << 8) | GPS.rx
      Dir := GPS.rx==1
      
      if dir == -1                                ' If Dir = -1, prepend - sign
        PST.str(string("-"))
      PST.dec(Degrees)
      PST.str(string("."))
    
      workVal := (Minutes * 1000 / 6) + (MinutesD / 60)
      PST.dec(workVal)
    Last edited by GordonMcComb; 03-13-2012 at 01:35 AM. Reason: Test for percent; if it's still there, the problem is in editing a post and using the WYSIWYG editor

  7. #7

    Default Re: Testing percent prefix

    'Looks like it worked! I wonder what the fancy editor thinks when it sees %nn? Hex codes, maybe?

    -Phil

  8. #8

    Default Re: Testing percent prefix

    Testing percent prefix using the WYSIWYG editor: %40, A, B, C.

    Code:
    %40, A, B, C
    I entered the hex codes for "@", "A", "B", and "C". It interpreted all but the %40. In the code section, I even included a [noparse] tag, but to no avail. This is seriously screwed up and needs to be fixed.

    -Phil

+ Reply to Thread

Similar Threads

  1. Need another prefix
    By Phil Pilgrim (PhiPi) in forum Support for Using this Forum
    Replies: 4
    Last Post: 10-03-2011, 11:44 PM
  2. Testing sig
    By potatohead in forum Test Forum
    Replies: 0
    Last Post: 02-24-2008, 01:02 AM
  3. testing
    By Paul in forum Test Forum
    Replies: 3
    Last Post: 01-28-2008, 01:09 AM
  4. Math & percent
    By Archiver in forum BASIC Stamps Archive
    Replies: 15
    Last Post: 05-09-2002, 12:16 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts