Help finding the power on delay for qx7 in source code

Need some advice? Trying out a new idea? Fancy a beer?
Join us for some general banter and good times.
Post Reply
bengmo
Posts: 2
Joined: Tue Apr 17, 2018 12:16 am
Country: -

Help finding the power on delay for qx7 in source code

Post by bengmo » Tue Apr 17, 2018 12:30 am

I have downloaded and after much trial an error, got the source for opentx 2.2 to compile. I found the PWR_OFF_DELAY and reduced it to 1.5 seconds. Now I would like to find the power on delay code and reduce that delay to zero but I can't seem to find it anywhere!

I've done some experimenting with java and C++ years ago, but this is beyond me.

Can one of you fine gentlemen/ladies help me find the code that controls that delay before powering on the Taranis Qx7? What I'm talking about is the little squares that pop up while you hold the power button, the radio doesn't actually boot up until four of them appear, one by one. What I would prefer is if the radio would just come on instantly, I'm not worried about accidentally turning it on. :D

User avatar
MikeB
9x Developer
Posts: 15725
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Help finding the power on delay for qx7 in source code

Post by MikeB » Tue Apr 17, 2018 1:36 pm

radio\src\targets\Taranis\board.cpp

Code: Select all

    while (pwrPressed()) {
      duration = get_tmr10ms() - start;
      if (duration < PWR_PRESS_DURATION_MIN) {
        unsigned index = duration / (PWR_PRESS_DURATION_MIN / 4);
        lcdClear();
#if defined(PCBX9E)
        lcdDrawBitmap(76, 2, bmp_startup, index*60, 60);
#else
        for(uint8_t i= 0; i < 4; i++) {
          if (index >= i) {
            lcdDrawFilledRect(LCD_W / 2 - 18 + 10 * i, LCD_H / 2 - 3, 6, 6, SOLID, 0);
          }
        }
#endif
PWR_PRESS_DURATION_MIN is defined as 100 (units of 10mS) so 1 second.

Mike
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

Post Reply

Return to “The Pickled Gnu (The Pub)”