Hey.
So the instructions for 2/3 button Color Change say
Click PWR to save
Click AUX to revert
Should this say Click AUX to cancel without saving instead maybe?
I tried to go back into colorchange mode and “revert” back to the config uploaded color, but that’s not how it works apparently.
Clarification might be good, because especially in 1 button controls, there is no “revert” a.k.a. “Cancel without saving” AUX option.
So if “color list” type of color change is being used, and you started with a custom color not in the list, merely entering the mode is going to lose the original color, with save being the only option and no way to bail and keep the original.
Revert only works while in the current mode, this is the same for all Edit Mode changes. For any edits once you’ve saved the change that becomes the new revert value.
You can revert in 1 button with a long click on PWR but it looks like that’s not at top of prop, it is listed on my site so that’s probably needed.
I’ve realized this when color changing away from a custom color set, and would like to upvote a post-save revert. It’s a smoke blade that I change to look “outer spacey”, so to get back I needed to reupload (although I suppose I could delete the save file as an alternative).
I thought this
Restore Factory Defaults Fast four-clicks while OFF, hold on last click.
Release once announcement starts.
was another great idea from Sabersense.
I’ve had to reset a few sabers I’ve given out to people as well and this would make it easy.
He provided the code:
#ifdef SABERSENSE_ENABLE_RESET
// To restore system to 'factory defaults' by deleting save files.
// Deletes files in root and all first level directories.
// Requires reboot after deletions.
case EVENTID(BUTTON_POWER, EVENT_FOURTH_HELD, MODE_OFF): {
// Lock the SD card to prevent other operations during deletion.
if (LSFS::Begin()) {
const char* filesToDelete[] = {
"curstate.ini",
"curstate.tmp",
"preset.ini",
"preset.tmp",
"global.ini",
"global.tmp"
};
// Delete files from the root directory
for (const char* targetFile : filesToDelete) {
if (LSFS::Exists(targetFile)) {
LSFS::Remove(targetFile);
Serial.print("Deleted from root: ");
Serial.println(targetFile);
}
}
// Find all immediate subdirectories of the root and delete files
LSFS::Iterator dirIterator("/"); // Iterator for the root directory
while (dirIterator) {
const char* subdirName = dirIterator.name();
if (dirIterator.isdir()) {
// Construct the full path to the subdirectory
PathHelper subdirPath("/");
subdirPath.Append(subdirName);
// Iterate over the files to delete in this subdirectory
for (const char* targetFile : filesToDelete) {
PathHelper filePath(subdirPath);
filePath.Append(targetFile);
// If the file exists in this subdirectory, delete it
if (LSFS::Exists(filePath)) {
LSFS::Remove(filePath);
Serial.print("Deleted from ");
Serial.print(subdirPath);
Serial.print(": ");
Serial.println(targetFile);
}
}
}
++dirIterator; // Move to the next entry in the root directory
}
// Unlock the SD card after deletion is complete
LSFS::End();
// Sound file to instruct user to reboot hilt after deletions.
if (SFX_reset) {
hybrid_font.PlayCommon(&SFX_reset);
} else {
// Plays font ident if RESET file not available.
SaberBase::DoNewFont();
}
} else {
Serial.println("Failed to lock SD card for deletion.");
}
break;
}
#endif
Can I add it to the Fett263 prop as is? Maybe you’d like to bring it over, or you already have for OS8? I don’t see in the OS8 prop instructions.
What NoSloppy is asking for is not a global revert though, so that might be something else to tackle
I have not looked at it. To me this takes up a lot of memory for something that would come into play very rarely. I feel it’s easier to just have the user delete preset.ini and presets.tmp for a full revert or go back and edit the changes they made back to what they want. With Color Zoom it’s pretty straightforward to dial to a color you want by eye (it may not be the exact same RGB values but if you had a look you were going for you can easily get back there).
Not sure I’ll get time to consider for OS8 anytime soon.