This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CAPTIVATE-FR2676: CAPTIVATE-FR2676, • CAPTIVATE-BSWP panel : management of a simultaneous press in the panel

Part Number: CAPTIVATE-FR2676

Hi All,

- My project is based on the following elements:

-I have configured the Panel buttons as follows:

  • 3 buttons as self induction
  • 0 to Button1, CAP0.1 to Button2, CAP0.3 to Button3
  • Scan period is 100 ms
  • ….

-In the callback functions in my code project, I implemented:

  • A variable for each button with two states possible (pressed or released )
  • In the call back function, i used the (uint8_t dominantElement = CAPT_getDominantButton(pSensor) ) function   to retrieve the state of each button (button 1, 2, 3 is  pressed or released ) in the  Panel

-In the application part of my project, I need to manage the simultaneous pressing of two buttons among the three. I am unable to respond to this requirement; in fact I have found in Debug mode that:

When pressing simultaneously, the call back is not triggered, so no information is returned, while the user has to perform an action on the Panel !!! 

My questions are:

·         You can confirm this observation for me : that  the call back cannot be triggered during a simultaneous press?

·         Is there a specific configuration at the CaptivateDesignCentre level to be able to best respond to this simultaneous support management?

·         Is there any other function that can help me deal with this concurrency constraint other than the CAPT_getDominantButton (pSensor) function?

 

Do not hesitate to ask me for more elements in order to better understand my problem

Thanks for your support

  • Hi halouane,

    Great - it sounds like you have all three buttons in a single button group, so this would be a single sensor and therefore one callback to handle all three buttons.

    Not sure where you are reading that if buttons are pressed, the callback is not triggered.  The callback is called every time after the sensor is scanned, independent of the state of the any button (pressed or not pressed).  So if you are looking to see which buttons are touched, here is a simple example that loops through each cycle and element in a sensor and counts the number of buttons in 'touch' and sets a bit position corresponding to that button.

    volatile uint8_t ui8NrOfButtons = 0;
    volatile uint8_t ui8ButtonsInDetect = 0;

    void sensorCallback(tSensor* pSensor)
    {
        uint8_t ui8Index=0;
        uint8_t ui8Cycle;
        uint8_t ui8Element;

        ui8NrOfButtons = 0;
        ui8ButtonsInDetect = 0;

        for(ui8Cycle=0; ui8Cycle<pSensor->ui8NrOfCycles; ui8Cycle++)
        {
           for(ui8Element=0; ui8Element<pSensor->pCycle[ui8Cycle]->ui8NrOfElements; ui8Element++)
           {
               if(pSensor->pCycle[ui8Cycle]->pElements[ui8Element]->bTouch == true)
               {
                   ui8NrOfButtons++;
                   ui8ButtonsInDetect |= (1 << ui8Index);
               }
               ui8Index++;
           }
        }
        _no_operation();  // for debugging
    }

  • Hi halouane,

    It's been a few days since I have heard from you so I’m assuming your question has been answered.
    If this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information.
    If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

**Attention** This is a public forum