I have a hilt with a Shtok v4 NPXL connector that I use blade detect.
Is there a way to have a blade config with 3 arrays and set it where two arrays are used for manual blade array switching when a blade isn’t detected and then the third would be used only when a blade is detected by the NPXL connector? I currently can switch between all three arrays but it would be convenient if I could lock one of the arrays off to only when I have a blade inserted.
My prop is capable of doing the opposite, i.e. having a single no_blade array but multiple blade_in arrays, but I don’t think it will do it the way round you want it.
However I believe @NoSloppy’s BC prop file can do it either way, but I’m not sure on the details. Have a look through his notes at the top of the prop file itself.
ProffieOS supports the notion that if the id() function (which is responsible for both blade id and blade detect) returns NO_BLADE * 2, that means that it’s more NO_BLADE than NO_BLADE, which is generally taken to mean “no hilt”.
One way to get id() to return NO_BLADE * 2 is to use blade detect to detect the chassis, and then use continuous blade id, in combination with the NO_BLADE_ID_RANGE define. But it can also be done with a little custom code.
So I was able to modify fett263 prop and set two blade arrays for when there’s no blade and use the third array for when there is a blade. When I change presets in the first array, the second one doesn’t change along with it even with save preset defined; probably because the first array is treated as the no blade array? I’m not sure how to go about changing this behavior so if anybody wants to try I’d be very grateful.
#ifdef FETT263_MANUAL_BLADE_ARRAY
void NextBladeArray() {
if (!use_fake_id_) best_config_before_faking_ = current_config - blades;
size_t next_array = (current_config - blades + 1) % NELEM(blades) ;
if ( blade_detected_ = false) next_array=next_array;
else if (blade_detected_ = true && next_array >1) next_array = 0;
fake_id_ = blades[next_array].ohm;
use_fake_id_ = true;
FindBladeAgain();
PlayArraySound();
I think it would be better if you’d start a new tread for this ?
And post your config, or at least your blades arrays section.