Announcement

Collapse
No announcement yet.

com_Sync() does not return expected values

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • com_Sync() does not return expected values

    Hello, I have been working with COM buffers using qualifiers on the 43DCT, and from what I understand from the documentation com_Sync() should return 0 until the qualifier is received, after which it should return a 1. However, while the buffer begins to be filled after the qualifier is received, com_Sync() returns -12392 regardless of the "qualified" status.

    I have tried both the example code here as well as the following to boil it down to the bare minimum:

    Code:
    #platform "uLCD-43DCT"
    
    #inherit "4DGL_16bitColours.fnc"
    
    var combuf[100];
    
    func main()
        gfx_ScreenMode(LANDSCAPE) ;
        com_Init(combuf, 12, ':' );
    
        setbaud(BAUD_19200);
    
        repeat
                txt_MoveCursor(0,1);
                print("Buffered: ", com_Count(), "\nQualified: ", com_Sync());
        until(com_Full());
    
        repeat
            gfx_Cls();
            txt_MoveCursor(0,1);
            print("Buffer Full");
        forever
    
    endfunc
    Am I missing something obvious, or does this not work as intended for anyone else?

  • #2
    Ah, yes, the com sync calls all return an 'odd' number on Diablo.

    This will be fixed in a future PmmC release.

    Do you really need this function? (I tend to use com_Count() in a 'similar' way, although I can see that it is not exactly the same)
    Mark

    Comment


    • #3
      I am currently using a similar method to the one you mentioned. And while using com_Sync() would have been more straight forward for my purposes, the workaround I am using suffices for the time being. Thanks for verifying this for me!

      Comment

      Working...
      X