How do disable outside of edit mode copying of preset, changing of font/color/etc

So I have be annoyed with copying of presets and changing of fonts and color mode when I miss click the battery check. Its really irritating. I don’t want them. I want to do everything in the edit mode menu. Not outside of the edit mode menu… Here is my config. I am running os6.7. I been going through the code. I must be missing something dumb.

Mini_brick2.h (88.1 KB)

Here is the config with only one style to keep it short.

#ifdef CONFIG_TOP
#include "proffieboard_v2_config.h"
#define NUM_BLADES 1
#define NUM_BUTTONS 2
#define VOLUME 1600
const unsigned int maxLedsPerStrip = 144;
#define CLASH_THRESHOLD_G 3.0
#define ENABLE_AUDIO
#define ENABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
#define MOTION_TIMEOUT 60 * 15 * 1000
#define IDLE_OFF_TIME 60 * 15 * 1000
#define DISABLE_BASIC_PARSER_STYLES
#define DISABLE_DIAGNOSTIC_COMMANDS
#define ENABLE_ALL_EDIT_OPTIONS
#define FETT263_EDIT_MODE_MENU
#define FETT263_SAY_COLOR_LIST
#define FETT263_SAY_COLOR_LIST_CC
#define FETT263_SAY_BATTERY_PERCENT
#define FETT263_LOCKUP_DELAY 200
#define FETT263_BM_CLASH_DETECT 6
#define FETT263_SWING_ON
#define FETT263_SWING_ON_NO_BM
#define FETT263_SWING_ON_SPEED 350
#define FETT263_TWIST_ON
#define FETT263_TWIST_ON_NO_BM
#define FETT263_THRUST_ON
#define FETT263_THRUST_ON_NO_BM
#define FETT263_STAB_ON
#define FETT263_STAB_ON_NO_BM
#define FETT263_TWIST_OFF
#define FETT263_FORCE_PUSH_ALWAYS_ON
#define FETT263_FORCE_PUSH_LENGTH 5
#define NO_REPEAT_RANDOM
#define COLOR_CHANGE_DIRECT
#endif

#ifdef CONFIG_PROP
#include "../props/saber_fett263_buttons.h"
#endif


#ifdef CONFIG_PRESETS
Preset presets[] = {

{ "THE BEGGINER", "tracks/Luke.wav",
StylePtr<Layers<AudioFlicker<RotateColorsX<Variation,DeepSkyBlue>,RotateColorsX<Variation,Rgb<0,0,128>>>,AlphaL<AudioFlickerL<RotateColorsX<Variation,DeepSkyBlue>>,Scale<IsLessThan<SwingSpeed<600>,Int<13600>>,Scale<SwingSpeed<600>,Int<-19300>,Int<32768>>,Int<0>>>,LockupTrL<Layers<AlphaL<AudioFlickerL<White>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<10000>,Int<30000>>,Int<10000>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,AlphaL<White,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<10000>,Int<30000>>,Int<10000>>,Int<10000>>>>,TrConcat<TrInstant,White,TrFade<400>>,TrConcat<TrInstant,White,TrFade<400>>,SaberBase::LOCKUP_NORMAL>,ResponsiveLightningBlockL<Strobe<White,AudioFlicker<White,Blue>,50,1>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>>,ResponsiveStabL<Red,TrWipeIn<600>,TrWipe<600>>,ResponsiveBlastL<White,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>,Int<400>>,SimpleClashL<White>,LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Mix<TwistAngle<>,Red,Orange>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,InOutTrL<TrWipe<450>,TrWipeIn<900>,Black>>>()
},

};
BladeConfig blades[] = {
{ 0, WS281XBladePtr<116	, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), CONFIGARRAY(presets) },
};
#endif

#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
Button AuxButton(BUTTON_AUX, auxPin, "aux");
#endif

ProffieOS7 has defines to disable.

Thanks… thats helpful… there is just sooo much code I can look at before my adhd kicks in and I have no focus.

Also is there the events I dont quite get all of it. like if I want to double click aux while holding power

it would be AUX, EVENT_SECOND_PRESSED, Power

Is there any documentation what each event means? Some of it is clear but other stuff is like whats saved click

Not sure what you mean, just use the new defines and it handles for you, you don’t need to touch anything. There’s a DISABLE_ define for each of those features if you’re not wanting.

Sorry I’m working on a new Blaster prop file and I’m trying to figure out these events

Ok, you can try here then or maybe start a separate thread :wink:

. Yes… I am just confused about what some do and how the frist second third And I don’t have my test rig built up yet. I am waiting for the boards… I guess I will just have to reflash a saber. With a test program.

This thread might help a little:
https://crucible.hubbe.net/t/followup-question-about-event-triggers/2579/1

and this:
https://therebelarmory.com/thread/13015/button-press-events

Thanks… I just wasn’t sure what some of them do vers frist/second /etc or the saved

“second” means that it was preceded by a short click, basically a double-click.
Third means triple-click, fourth means quadruple click.
“saved” means that we waited a little bit to make sure that there wasn’t another click following it. If you want to have different actions for double and triple clicks, you need to use the “saved” clicks in your prop, otherwise the prop will react immediately after the second click.

It’s actually really smart.

Ahh!!!. that makes sense. but what about these???

EVENT_PRESSED,
EVENT_RELEASED,
EVENT_HELD,
EVENT_HELD_MEDIUM,
EVENT_HELD_LONG,
EVENT_CLICK_SHORT,
EVENT_SAVED_CLICK_SHORT,

Verses these?

EVENT_FIRST_PRESSED,
EVENT_FIRST_RELEASED,
EVENT_FIRST_HELD,
EVENT_FIRST_HELD_MEDIUM,
EVENT_FIRST_HELD_LONG,
EVENT_FIRST_CLICK_SHORT,
EVENT_FIRST_SAVED_CLICK_SHORT,
EVENT_FIRST_CLICK_LONG,

The first set of events are generated every time a button is pressed/released/etc. The second set is generated on the first click, but if that first click is followed by a second click, then EVENT_SECOND_* will be generated instead.

Something like a fire button wouldn’t work differently on the first and second event, so it would definitely use the first events. Other types of buttons wouldn’t be expected to respond to multiple fast clicks, so they should probably use the second type of event, as that makes it possible to use double and triple clicks for something else.

If I understand that right…So if I have say power button and I only use it to trigger one event I should use EVENT_FIRST_PRESSED, but if that power does a second event like power on/off.

next event on a double click I should do EVENT_FIRST_SAVED_CLICK_SHORT for the frist event and EVENT_SECOND_CLICK_SHORT or EVENT_SECOND_HELD but if I have a 3 click event I should use the EVENT_SECOND_SAVED_CLICK_SHORT.

so If you dont have a 3 event you can used any 2nd event options

That I should probably never use the first set like EVENT_PRESSED…

and say I want to do a combo button like this

case EVENTID(BUTTON_FIRE, EVENT_FIRST_SAVED_CLICK_SHORT, BUTTON_MODE_SELECT):

Which means the mode/aux buttons is pressed then I press the fire

That is correct.

You probably want to use EVENT_PRESSED instead of EVENT_FIRST_PRESSED, otherwise a quick second press won’t register.

The simpler method might be to always use saved short/long clicks for any button that should have multiple uses, that way you don’t have to change anything if you add more functions.

Let me write up my blaster prop file. and then you can correct it. I really need to learn how to use the git besides just saving a copy of a program. But I think I got what does what with the event now. I think.

If I want a held and not held button would I dont like say one fire and a fire while holding aux

EVENTID(BUTTON_FIRE, EVENT_frist _PRESSED, MODE_ON | !BUTTON_MODE_SELECT): for the not holding event?

You can have multiple cases cause the same thing to happen, like

      case EVENTID(BUTTON_FIRE, EVENT_FIRST_PRESSED, MODE_ON):
      case EVENTID(BUTTON_FIRE, EVENT_FIRST_PRESSED, MODE_ON | BUTTON_MODE_SELECT):
      *-do stuff here-*
     return true;

ok so then the !Button press is baked in. I wasnt sure… I hate this covid brain fog… I feel like I having trouble with stuff that I normally get.

Is there a situation that would cause this not to work? I am using
#define FETT263_DISABLE_COPY_PRESET
and yet it’s still replacing presets when I mis-click battery

Here’s my config