Hello there,
I recently purchased a SaberTrio Senza and love it. It came with OS 6.7. I have since updated to 7.8 and added a couple fonts/styles. All is working well, with the exception of the no blade detection (it did work prior to update and will work if I reflash original config). I have the correct pin, 17, in my config file. Here’s the behavior: the blade in and blade out sounds do play when plug or blade is inserted/removed, but, with no blade/plug inserted, it will still turn on when the button is pressed (at least the current font sounds play, instead of the no blade sound). I must have missed something, because original config behaves as expected. Apologies for wordiness. Thanks for any help!
Post the config used.
Confirm the only difference is the OS version?
Thanks for taking the time to read/help, NoSloppy. Yes, the only thing I did was update OS and add (replace) a font. Fonts/bladestyles all working as they should. Used Fett263 config tool to make sure my config looked ok. Config below:
// ProffieOS7 Config File
#ifdef CONFIG_TOP
#include "proffieboard_v2_config.h"
#define NUM_BLADES 2
#define NUM_BUTTONS 2
const unsigned int maxLedsPerStrip = 144;
#define VOLUME 1000
#define CLASH_THRESHOLD_G 3
#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 SHARED_POWER_PINS
#define ENABLE_ALL_EDIT_OPTIONS
#define SAVE_PRESET
#define NO_REPEAT_RANDOM
#define BLADE_DETECT_PIN 17
#define ENABLE_SSD1306
#define OLED_FLIP_180
#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_TWIST_ON
#define FETT263_TWIST_OFF
#endif
#ifdef CONFIG_PROP
#include "../props/saber_fett263_buttons.h"
#endif
#ifdef CONFIG_PRESETS
Preset blade[] = {
// Bunch of presets
};
BladeConfig blades[] = {
{ 0, WS281XBladePtr<133, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
SimpleBladePtr<CreeXPE2WhiteTemplate<550>, NoLED, NoLED, NoLED, bladePowerPin1, -1, -1, -1>(),
CONFIGARRAY(blade)
},
};
#endif
#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
Button AuxButton(BUTTON_AUX, auxPin, "aux");
#endif
/* Generated with Fett263 Config Helper v3.0 */
THis is what’s confusing.
Are you saying there’s different behavior when using 6.7?
Because there shouldn’t be any difference.
What is it doing exactly when “it did work prior to update and will work if I reflash original config”?
How is the original config different?
What are you expecting as " the no blade sound" ?
In your post above, you only have one Preset array and it’s named blade[].
Since that’s the only one, the presets in that array are going to be used whether there’s a blade in or not.
If you want different fonts and blade styles to be used when there is no blade inserted, then you would need a second preset array (named something like blade_out[]
) that contains the presets to be used when no blade is inserted.
Then in the BladeConfig, you’d add a second blade where CONFIGARRAY calls those presets based on the NO_BLADE condition.
SImplified, it would be like this:
Preset blade [] = {
{ "bladeInFont1", "trackPathAndFile",
StylePtr<....BladeInStyle1...>(),
StylePtr<....BladeInStyle1...>(), "preset name"},
// more presets here
};
Preset blade_out[] = {
{ "bladeOutFont1", "trackPathAndFile",
StylePtr<....BladeOutStyle1...>(),
StylePtr<....BladeOutStyle1...>(), "preset name"},
// more presets here
};
BladeConfig blades[] = {
{ 0,
WS281XBladePtr<133, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
SimpleBladePtr<CreeXPE2WhiteTemplate<550>, NoLED, NoLED, NoLED, bladePowerPin1, -1, -1, -1>(),
CONFIGARRAY(blade) },
{ NO_BLADE,
WS281XBladePtr<133, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
SimpleBladePtr<CreeXPE2WhiteTemplate<550>, NoLED, NoLED, NoLED, bladePowerPin1, -1, -1, -1>(),
CONFIGARRAY(blade_out) }
};
Thanks again! That makes sense. I was ready to compare the old config to new, and find I missed 2nd array, but there isn’t a second array in the 6.7 config either. Not that I’m and avid coder, but this is making me feel dumb LOL. Let me try to be more clear.
The original config (6.7) is SaberTrios config. When there is no blade present, it will play ‘no_blade.wav’ from the common folder, when you press the activation switch (basically a ‘beep’ FWIW). Doesn’t actually activate, from what I can tell. Also, bladein.wav and bladeout.wav play with blade insert / removal.
The OS 7.8 config will play bladein.wav and bladeout.wav with blade insert / removal. However, with no blade inserted the saber does fully activate (same as with blade inserted). Hum/swing/clash/etc. all behave as they do with blade inserted.
Here’s the SaberTrio config (skipping over presets):
#ifdef CONFIG_TOP
#include "proffieboard_v2_config.h"
#define NUM_BLADES 2
#define NUM_BUTTONS 2
#define VOLUME 1750
const unsigned int maxLedsPerStrip = 144;
#define CLASH_THRESHOLD_G 4.0
#define ENABLE_AUDIO
#define ENABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
#define ENABLE_SSD1306
#define OLED_FLIP_180
#define NO_REPEAT_RANDOM
#define IDLE_OFF_TIME 60*2*1000
#define MOTION_TIMEOUT 60*10*1000
#define SHARED_POWER_PINS
#define DISABLE_DIAGNOSTIC_COMMANDS
#define DISABLE_BASIC_PARSER_STYLES
#define BLADE_DETECT_PIN 17
#define SAVE_PRESET
#define FETT263_TWIST_ON
#define FETT263_TWIST_OFF
#define KEEP_SAVEFILES_WHEN_PROGRAMMING
#define ENABLE_ALL_EDIT_OPTIONS
#define FETT263_EDIT_MODE_MENU
#define FETT263_HOLD_BUTTON_OFF
#define FETT263_SAY_COLOR_LIST
#define FETT263_SAY_COLOR_LIST_CC
#endif
#ifdef CONFIG_PROP
#include"../props/saber_sabertrio_buttons.h"
#endif
#ifdef CONFIG_PRESETS
Preset blade[] = {
// presets
};
BladeConfig blades[] = {
{ 0, WS281XBladePtr<133, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
SimpleBladePtr<CreeXPE2WhiteTemplate<550>, NoLED, NoLED, NoLED, bladePowerPin1, -1, -1, -1>(),
CONFIGARRAY(blade)
},
};
#endif
#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
Button AuxButton(BUTTON_AUX, auxPin, "aux");
#endif
All that being said, I just found the no blade behavior under the Props dir in the SaberTrio buttons.h (included in their config, whereas I included the Fett263 buttons prop instead) Duh!!!:
//Checks if blade is not detected and plays no blade sound
if(!blade_detected_) {
Off();
hybrid_font.PlayCommon(&SFX_no_blade);
return true;
}
My prop can technically do this in OS7, but it is handled via Style Code for a NO_BLADE array. For OS7 this type of custom interaction is handled in style code rather than the prop (when used with my prop) but I haven’t had a chance to write the new style code to implement. It will be coming in a future Phase for the OS7 library along with a ton of other new options and capabilities.
Thanks for the response, Fett. I like the feature, but I’ll stick with your prop for all the other benefits it provides. Look forward to your implementation! I plan to become a Patreon of yours also; thanks for all you do.
You’re welcome, no problem.
Ah. Yeah, not only their config file, but also their prop file and modified ProffieOS as well. THat is why the behavior is different. It’s not stock ProffieOS 6.7.
Yup, it’s b/c you’re using the standard OS and prop not their custom one. Converting to the standard prop is easily doable. https://www.instagram.com/p/Ct5pdgmrbEL/
To save you some time here’s both an EditMode Config as well as a NonEditMode Config all setup w the second array keyed in plus with some bonus bladestyles using the extra unused factory fonts.
You’ll need to follow the // notes with specifics on making a NoBlade font folder, etc. for that. Then finally pull over some copies of the OLED files to any other font packs you have so you keep any OLED function you wish if the hilt has one.
Thanks Revo! Thannks NoSloppy!
I do have the OLED - look forward to checking out your link and configs, Revo.
I didn’t realize, until now, ST had modified the OS as well; I’m only 1 week into this stuff.
You guys have all been a huge help!!
Love this stuff.
Glad to pay it forward. Let me know if you have any more questions since for all intents I’ve done the conversion with all three of my S3 hilts. It all comes down to not just the config but also how and where you place the OLED and sound files. I could probably cross integrate mine deeper but wanted to still have the EditMode menu sounds correct.
Thanks Revo. I’m excited to mess with it over the weekend! Stuck at work for a couple more hours LOL. I also want to look into configing the OLED to display the current function (volume, kyber dial, etc.), which I know S3 removed from their last build, they said for ‘compatibility’. The bmp’s are still on the SD. EditMode is nice - I have that working well.