cancel
Showing results for 
Search instead for 
Did you mean: 

touchgfx scroll list scroll acceleration configuration not working

Eddie1066
Associate II

We have an issue with a scroll list widget, on the hardware when you touch and scroll to a point, stop then lift your finger of the display the list accelerates  in the direction it was dragged in initially. This behaviour is not seen the simulator. 

In the designer, we have scrollable container with a scroll list inside it. Setting animation has no effect, easing option = In, Swipe Acc = 0, Drag Acc = 0, Overshoot % = 0. we have tried adjusting the both Acc without any effect.

The list has up to 50 entries.scroll listscroll list

 
void listMenuView::setupScreen()
{
    menuItems = presenter->getListItermParams();
    scrollList1.setItemSelectedCallback(scrollListItemSelectedCallback);
    params = static_cast<CONTROL_VERTICAL_MENU_T *>(presenter->getWidgetParams());
    menuHeader1.params = &params->menuHeader;
    menuHeader1.updateConfigs();
    menuHeader1.setEventListener(this);
    messageBox1.setEventListener(this);

    // set the size of the scroll list based on the number of items and iterm hight.
    float h = scrollList1ListItems[0].getItemHeight();  // get the height of the first item.
    h += 0.98f;  // add a little extra to make sure the last item is fully visible.
    h *= params->visibleItems;  // multiply by the number of items.

    // Note: make sure the height of the scroll list window size in touchgfx is
    // large enough to show the max list when generating code.
    scrollList1.setPosition(0, 0, 459, h);
    scrollList1.setNumberOfItems(params->visibleItems);
    scrollList1.invalidate();

    scrollableContainer1.invalidate();


    // give each list entry a unique ID.
    uint8_t id{0};
    for (auto it = menuItems->begin(); it != menuItems->end(); it++) {
        if (it->second.state == ItemState::NORMAL ||
            it->second.state == ItemState::READONLY ||
            it->second.state == ItemState::SELECTED)
        {
            scrollList1ListItems[id].setID(id);
            scrollList1ListItems[id].bindParams(&it->second);
            scrollList1ListItems[id].update();

            // handle list with a tick mark.
            if (params->hasTickMark) {
                if (id == params->tickMarkIndex) {
                    scrollList1ListItems[id].setTickMark();
                } else {
                    scrollList1ListItems[id].clearRightIcons();
                }
            }

            id++;
        }
    }

Any ideas on what we are missing, how to resolve the issue?

Eddie

2 REPLIES 2
JohanAstrup
ST Employee

Hello @Eddie1066.

Since it works in the simulator, I suspect an issue with your touch controller, most likely in the software layer that transfers touch inputs to TouchGFX.

Could you try to perform a thorough test of the touch data you are receiving (coordinates, events, and timing) and verify that it matches your inputs?

Best regards,
Johan

Hi @JohanAstrup thanks for the replay.

We have notice the same behaviour on a STM32F469I DISCO dev kit. I have attached 2 videos illustrating the problem. The issue is more prominent on our custom display but is also present on the stm32 dev kit example. Thanks.