Home Forums Software Development TX_STATEPATH_SCREENBOUNDS

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #3923
    Edward Ryklin
    Participant

    After upgrading to EyeX SDK 1.5.466 the function no longer works:

    success = (txGetStateValueAsSize2(hStateBag, TX_STATEPATH_SCREENBOUNDS, &screenBounds) == TX_RESULT_OK);

    success returns 0, can you fix it please.

    #3935
    Jenny [Tobii]
    Participant

    Hi Edward,

    Hm, it works with the latest EyeX Engine. I have a vague memory that we had an engine version where this state path and a number of other state paths that have been deprecated accidentally didn’t work, but it was fixed in the following engine release. Which version of the EyeX Engine are you using?

    Anyway, as described in the Readme for the 1.5 SDK that state path has been deprecated and you should use TX_STATEPATH_EYETRACKINGSCREENBOUNDS instead, on EyeX Engine 1.3.0 and higher.

    #3937
    Edward Ryklin
    Participant

    Hi Jenny,

    I’m looking into this right now. You’re right that there is mention in the readme.txt of SDK Version 1.5 dated 2015-06-12 that
    DisplaySize has been deprecated in favor of EyeTrackintgDisplaySize. I tried replacing it but still returns 0.0; worth noting I also had to declare the variable as TX_RECT instead of TX_SIZE2 and calling
    success = (txGetStateValueAsRectangle(hStateBag, TX_STATEPATH_EYETRACKINGSCREENBOUNDS, &screenBounds) == TX_RESULT_OK);
    instead of txGetStateValueAsSize2,. Though it did compile, at runtime it still returns 0.0 for screenBounds.width and height. I will try upgrading to SDK 1.6 now and will get back to the forum.

    -Edward

    #3939
    Jenny [Tobii]
    Participant

    Hi Edward,

    Hm. It works fine with txGetStateValueAsSize2 in the MinimalStatusNotification sample. So, it wouldn’t compile unless you used a TX_RECT?

    Are you using txGetStateAsync or a state changed handler? If the former, what state path are you using for the txGetStateAsync call? It should work with both TX_STATEPATH_EYETRACKINGSCREENBOUNDS and TX_STATEPATH_EYETRACKING (though the latter includes many more states).

    #3941
    Edward Ryklin
    Participant

    I tried updating to SDK 1.6.477 and also to EyeXEngine 2.0.2.219 but neither helped.

    Apparently the problem lies in the heart of txGetState(hContext, TX_STATEPATH_EYETRACKING, &hStateBag); It’s returning a null hStateBag.

    I will try switching to the asynchronous version txGetAsyncDataContent as shown in the MinimalStatusNotifications.c in the SDK 1.6.477

    #3942
    Edward Ryklin
    Participant

    No I was using txGetState()

    void TX_CALLCONVENTION OnEngineConnectionStateChanged(TX_CONNECTIONSTATE connectionState, TX_USERPARAM userParam)
    {
    TX_HANDLE hStateBag = TX_EMPTY_HANDLE;
    TX_BOOL success;

    switch (connectionState) {
    case TX_CONNECTIONSTATE_CONNECTED:

    txGetState(hContext, TX_STATEPATH_EYETRACKING, &hStateBag);

    #3943
    Edward Ryklin
    Participant

    txGetStateAsync works, but txGetState does not.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.