Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to handle set reset event using qt ?

How to handle set reset event using qt ?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 547 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Qt embedded developer
    wrote on last edited by
    #1

    i want to trigger charger connect and disconnect event. this event is random so i don't know how to handle it using qt.

    i f you know then please let me know.

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      Qt embedded developer
      wrote on last edited by
      #3

      i have written below code to handle this connect and disconnect event of charger.

      unsigned int uCount1,uCount2;

      uCount1=0;
      uCount2=0;

      if(bCharging &&(!bDischarging))
      {
      bCharging = false;
      uCount2=0;
      if(uCount1==0)
      DisplayTime(min);
      uCount1=1;
      }
      else if(bDischarging &&(!bCharging))
      {
      uCount1=0;
      bCharging = false;
      if(uCount2==0)
      DisplayTime(min);
      uCount2=1;
      }

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        How are these event generated ?
        Where do they come from ?
        On which target ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        Q 1 Reply Last reply
        0
        • Q Offline
          Q Offline
          Qt embedded developer
          wrote on last edited by
          #3

          i have written below code to handle this connect and disconnect event of charger.

          unsigned int uCount1,uCount2;

          uCount1=0;
          uCount2=0;

          if(bCharging &&(!bDischarging))
          {
          bCharging = false;
          uCount2=0;
          if(uCount1==0)
          DisplayTime(min);
          uCount1=1;
          }
          else if(bDischarging &&(!bCharging))
          {
          uCount1=0;
          bCharging = false;
          if(uCount2==0)
          DisplayTime(min);
          uCount2=1;
          }

          1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            How are these event generated ?
            Where do they come from ?
            On which target ?

            Q Offline
            Q Offline
            Qt embedded developer
            wrote on last edited by
            #4

            @SGaist 1] i2c read give status charger connected or not
            2] they come from fuel gauge ic of my board

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved