@@ -422,23 +422,23 @@ class Blaster : public PROP_INHERIT_PREFIX PropBase {
422422 Off ();
423423 return true ;
424424
425- #ifdef BLADE_DETECT_PIN
426- case EVENTID (BUTTON_BLADE_DETECT, EVENT_LATCH_ON, MODE_ANY_BUTTON | MODE_ON):
427- case EVENTID (BUTTON_BLADE_DETECT, EVENT_LATCH_ON, MODE_ANY_BUTTON | MODE_OFF):
428- // Might need to do something cleaner, but let's try this for now.
429- blade_detected_ = true ;
430- FindBladeAgain ();
431- SaberBase::DoBladeDetect (true );
432- return true ;
425+ #ifdef BLADE_DETECT_PIN
426+ case EVENTID (BUTTON_BLADE_DETECT, EVENT_LATCH_ON, MODE_ANY_BUTTON | MODE_ON):
427+ case EVENTID (BUTTON_BLADE_DETECT, EVENT_LATCH_ON, MODE_ANY_BUTTON | MODE_OFF):
428+ // Might need to do something cleaner, but let's try this for now.
429+ blade_detected_ = true ;
430+ FindBladeAgain ();
431+ SaberBase::DoBladeDetect (true );
432+ return true ;
433433
434- case EVENTID (BUTTON_BLADE_DETECT, EVENT_LATCH_OFF, MODE_ANY_BUTTON | MODE_ON):
435- case EVENTID (BUTTON_BLADE_DETECT, EVENT_LATCH_OFF, MODE_ANY_BUTTON | MODE_OFF):
436- // Might need to do something cleaner, but let's try this for now.
437- blade_detected_ = false ;
438- FindBladeAgain ();
439- SaberBase::DoBladeDetect (false );
440- return true ;
441- #endif
434+ case EVENTID (BUTTON_BLADE_DETECT, EVENT_LATCH_OFF, MODE_ANY_BUTTON | MODE_ON):
435+ case EVENTID (BUTTON_BLADE_DETECT, EVENT_LATCH_OFF, MODE_ANY_BUTTON | MODE_OFF):
436+ // Might need to do something cleaner, but let's try this for now.
437+ blade_detected_ = false ;
438+ FindBladeAgain ();
439+ SaberBase::DoBladeDetect (false );
440+ return true ;
441+ #endif
442442 }
443443 return false ;
444444 }
0 commit comments