Array Selector

Hi @Fett263 :slight_smile:. I’ve been reading up on the SaberSense Array Selector, and was wondering if you might be into incorporating it into your prop.

I generally like to use your work as a base, and I think it’s a triple click which might not interfere with other commands?

Anyway, cool if it’s to late in OS8 but it sounds interesting.

It’s already in OS8 beta :wink:

See new defines (refer to top section of the prop in OS8 for controls).

FETT263_MANUAL_BLADE_ID
FETT263_MANUAL_BLADE_ARRAY

Sweet! Thanks.

You’re welcome, it needs testing along with other features in Beta so if you test it out report on the beta thread. There’s still a lot in OS8 waiting to be tested to move it forward.

1 Like

Ok, the FETT263_MANUAL_BLADE_ARRAY worked great. My goal is to now set up two arrays that act to shut off all accents when I switch. There will be a shoto mini blade with that goes with all of the bling, and then a full blade with the saber closed and the internal lights off.

Do I need FETT263_MANUAL_BLADE_ID now, or is the FETT263_MANUAL_BLADE_ARRAY define enough?

For basic set up, I see instructions in the POD for blade detect and am trying to use that as an example. I made changes below. Am I close for formatting?

// This is a simplified config file template set up for Manual Blade Array 

#ifdef CONFIG_TOP
#define FETT263_MANUAL_BLADE_ARRAY
// other defines go here
#endif

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

#endif


#ifdef CONFIG_PRESETS

Preset 0 [] = {

{ "font", "tracks/track",
  StylePtr<Blue>(),
 StylePtr<Blue>(), "preset name"},

};

//---------------------------------------------------------------

Preset 1[] = {

{ "font", "tracks/track",
  StylePtr<Blue>(),
  StylePtr<Black>(), "preset name"},

};



BladeConfig blades[] = {
 { 0, WS281XBladePtr<50, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
    WS281XBladePtr<14, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin6> >()
  , CONFIGARRAY(presets) },

 { 1, WS281XBladePtr<122, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
     WS281XBladePtr<14, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin6> >()
  , CONFIGARRAY(presets) },

};
#endif

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

Depends on how you set it up and what you want to do. The array selection is sequential so if you had 3 arrays, they would cycle, 1, 2, 3, 1, 2, 3… when pressed.

If you want to have IDs then the array would be based on what blade is connected when pressed.

A sequential array set is what I’m looking for.

There is a pull request on the ProffieOS documentation page which gives examples of how the Array Selector can be used and set up. It’s obviously written for my prop, but the main points I believe should be the same for other props’ versions of the Array Selector.

From what you’ve said, Array Selector alone should do the job. To use BladeID you would need to add different value resistors to each blade so the system could differentiate - all of which adds a little more setup complexity.

Thank you! I tried digging through git hub a bit but didn’t know where to look.

A fantastic feature!

Hey Chris,

On line 17, just before the link, I think you are missing a “be”: “… can be found here…” instead of “… can found here …”

Ok, I think I get it. Everything I try is compiling and I’ll test it on a saber asap. Impressive!

1 Like

Thanks Olivier.
It’s been a ittle while since I looked at it, and I dare say there are a few more such typos scattered through it in places. I’ll go through it again when I get a sec. :slight_smile:

1 Like