Last in today's run of annoying questions: adding new Blade_ID button press

We’ve touched on this before, but I want to add a button press to force the Proffieboard to either:

  • Reboot,
  • Run Blade-ID

Using SA22C’s prop, I added the lines below to the BladeID section, but it didn’t work. The aim was to press and hold Main and Aux together for X seconds until the Proffie does one of the above.

I confess I know nothing about coding, and this was really just a guess. My question now is can this be fixed by just changing this bit - and if so what do I need to add - or will it require some work deeper in the OS?

As always thoughts welcome.
Then I promise to leave you in peace for a bit! LOL!

      case EVENTID(BUTTON_AUX, EVENT_HELD_LONG, MODE_OFF | BUTTON_POWER, EVENT_HELD_LONG, MODE_OFF):
        blade_detected_ = false;
        FindBladeAgain();
        SaberBase::DoBladeDetect(false);
        return true;      
#endif

The mod doesn’t get a duration. I think you can just do

      case EVENTID(BUTTON_AUX, EVENT_HELD_LONG, MODE_OFF | BUTTON_POWER):
        FindBladeAgain();
        return true;      

However this might conflict with turning the blade on if the power press is the mod.
Might want to swap the buttons so you press and hold POW while AUX is down.

Thanks Brian.
Just tried as you suggested both ways and unfortunately the saber didn’t do anything at all. :confused:

toss a printout in there to see that you’re registering the event, like
STDOUT << " This should be finding blade again\n";

Then look for it in Serial Monitor.
I am breezing over this so, this isn’t the fix, just a first step that doesn’t hurt.