User Tag List

Results 1 to 8 of 8

Thread: Strings and serial object

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    Sweden
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Strings and serial object

    Hi.

    Does anyone have any experience of using the serial object?
    I am trying to use it to read values of a serial port that is connected to an GPS. I have no problem connecting and getting data, my problem is making something of it.

    The problem is this - I need to divide this data into lines and process each line to get the GPS position.
    However, I have a problem. If I use the edit object as temporary storage when the serial object has data, then I can't get a specific line (first line of edit object in this case) since Edit object doesn't seam to support that action. What I would like to do is simply put data into edit object and then read first line to use that, then use next line and so on.

    So I put the output from the serial object into a list object with the add line action if serial object has data. The problem of this is that now the serial object and the list object has different concepts of rows. The serial object will happily put half rows in one row of list object. List object don't seam to listen to row breaks as edit box does. This makes the output unusable. I would have an example of text here but I can't post it since the forum will not accept it.

    Does someone has a suggestion of how to break the serial object output into lines before adding lines in the list object or a way to use something like the edit object but with the possibility to "load" a specific line from the text? The row breaks seam to be correct in a edit box, so that would be the object to use if I could only get a specified row from it.

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2007
    Location
    USA
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Strings and serial object

    How is the information outputted? It is possible you can tokenize the string in some cases.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    Sweden
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Strings and serial object

    Hi.

    This is how the information looks like in the edit object:
    $GPGGA,242790.799,,,,,0,00,,,M,0.0,M,,0000*22
    $GPGSA,A,1,,,,,,,,,,,,,,,*1W
    $GPRMC,272940.789,V,,,,,,,051208,,*22
    $GPGGA,112041.799,,,,,0,00,,,M,0.0,M,,0000*23
    $GPGSA,A,1,,,,,,,,,,,,,,,*1W
    $GPGSV,3,2,22,13,67,105,,13,17,093,,14,76,642,,15, 70,421,*11
    $GPGSV,3,2,12,02,34,302,,20,26,128,,07,21,182,,16, 19,074,*11
    $GPGSV,3,3,12,08,16,122,,21,08,000,,27,08,153,,42, 18,128,*1A

    (Don't try to make sens of the numbers, I've changed them since they gave away my position... )

    A list object looks like this:
    90.799,,,,,0,00,,,M,0.0,M,,0000*22@@
    $GPGSA,A,1,,,,,,,,,,,,,,,*1W@@$GPRMC,272940.789,V, ,,,,,,051208,,*22@@$GPGGA,112041.799,,,,,0,00,,,M, 0.0,M,,0000*23@@
    $GPGSA,A,1,,,,,,,,,,,,,,,*1W@@
    $
    GPGSV,3,2,22,13,67,105,,13,17,093,,14,76,642,,15,7 0,421,*11@@
    $GPGSV,3,2,12,02,34,302,,20,26,128,,07,21,182,,16, 19,074,*11@@
    $
    GPGSV,3,3,12,08,16,122,,21,08,000,,27,08,153,,42,1 8,128,*1A@@

    (Since I can't print all character here, you have to replace @ with an empty square, something I think mean rowbreak in MMFish).

  4. #4
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2006
    Location
    In a Dark room with only a lamp
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Strings and serial object

    why not use the rich edit object? You can select lines using this object.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    Sweden
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Strings and serial object

    Good idea.
    However, I don't see any "select line" action?
    How do you do?

  6. #6
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2006
    Location
    In a Dark room with only a lamp
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Strings and serial object

    i'll knock an example together for you. it involves getting the first character number of the line and the last character of the line and then selecting the text between the numbers.

  7. #7
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2006
    Location
    In a Dark room with only a lamp
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Strings and serial object

    Sorry for the double post - can't edit the previous one.

    Here is the example i promised you

    http://lembi2001.googlepages.com/Example.zip

    commented to help you understand it

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    Sweden
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Strings and serial object

    Thank you lembi2001!

Similar Threads

  1. The Serial Object: MMF2 Serial Port Control
    By aw5 in forum Extension Development
    Replies: 19
    Last Post: 29th December 2020, 05:15 AM
  2. need help with serial number using INI object
    By BrashMonkey in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 30th July 2011, 09:58 AM
  3. serial object programmer!
    By rurkryber in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 21st September 2009, 09:12 PM
  4. question about serial object
    By cel in forum Extension Development
    Replies: 0
    Last Post: 26th August 2009, 12:17 PM
  5. question about the serial object
    By cel in forum Extension Development
    Replies: 1
    Last Post: 23rd March 2009, 06:57 PM

Posting Permissions

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