ProffieOS V6 pre-alpha discussion

Seems like this would be better to do generically, similar to how we did wavlen.
Basically, we would need to propagate the number of the wav file in addition to the length, and then make something that chooses which effect to play based on the wav number.

That way you could also have clash effects matching the clash sound etc.

The new Select functions for Edit Mode could use file number as a “selector”, just need a function that turns the wav file number into a Int<> and then the styles could use.

And also then preon would need additional EFFECTS for the blade styles, yes? Like I mentioned EFFECT_PREON1, EFFECT_PREON2.
Like adding USER or custom ones is doable, but the preon being coded to have ignition follow is key.

Could use “Dual Mode” it would do odd/even for preon/out sounds then set Dual Mode style up for both.

I’m going down the wrong path over here.
I can’t wrap my head around how to pass the selected file to an effect.
I have scrap notes so far but this is not the way for sure.

#ifdef PREONS_MATCH_BLADE_EFFECTS 

  void MatchPreonToBlade() {
      int preon_num;
      preon_num = rand() % SFX_preon.files_found();
      SFX_preon.Select(preon_num);
    }

  switch (// is this preon_num? )
  	case 1:
  		hybrid_font.DoEffect(EFFECT_PREON1, 0);
  	return true;
//etc...

FWIW I have expanded Dual Mode Sounds to handle preon, out, in, pstoff sounds so that odd files are selected when the saber is pointed up and even files are selected when the saber is pointed down. This would let you pair even sounds and odd sounds together regardless of if there are the same number or not AND let you have completely unique effects for each by building the style to use IsLessThan<BladeAngle<>,Int<16384>>.

More info here: Sneak Peek - Dual Mode Ignition Sounds for ProffieOS6 - #2 by Fett263

2 Likes

retracted.

I think something about the updates to writing files to SD might be an issue.
2 things lead me to this.

  1. In testing WebUSB, I noticed some files were not being written to, but figured that was just the process being ironed out still.
  2. Today, I’m noticing my SAVE_STATE is not working. Every boot is back to the first preset.

EDIT
Strange. I just checked curstate.ini and it has some preset entries in it intended for presets.ini?

installed=Sep  8 2021 00:15:26
new_preset
font=a_DARKSABER/DarkV3;common
track=
style=builtin 0 1
style=builtin

Meanwhile presets.ini should have 2 presets (working on saber) but shows one…with a weird tilde

installed=Sep  8 2021 00:15:26
new_preset
font=a_DARKSABER/DarkV3;common
track=
style=builtin 0 1
style=builtin 0 2
style=builtin 0 3 ~
style=builtin 0 4
style=builtin 0 5
name=dark\n    v3
variation=0
end

I am not using #define KEEP_SAVEFILES_WHEN_PROGRAMMING
I am going to delete the files and see what turns up next time.
—Deleting the files changed nothing. Same versions as what posted above showed up when written.

There might be something wrong with the SD card. Might need a format-and-replace-all-the files.

It could also be something wrong with ProffieOS, or maybe something in your prop or configuration. I did change a bunch of stuff about how config files are written recently, so it’s possible I messed something up.

I’ll redo the SD but this only happened after yesterday when i updated the recent changes.

Confirmed no better after SD reformat. Not respecting SAVE_STATE. Weird file writing.

Works fine again after reverting the following merges:
392097b simplify config file writing and save memory
0c9e397 better config file handling (saves memory and lets us do more stuff…)

I did not try a different prop file such as default or fett263.

Well that’s obviously not good.
Can you send me your config file and anything non-standard you have in your code so I can try to replicate the problem?
Also, what optimization level are you using? (And what version of the arduino-porffieboard plugin?)

I just an hour of development on the WebUSB stuff, but I did not see any file corruption.

Plug-in ver 3.4.0
Optimize: Smallest Code

I applied tonight’s updates and it seems the changes to prop_base fixed it.
Working now, yay! Thanks.

Does SAVE_STATE needs an update from
#define SAVE_DYNAMIC_DIMMING
to
#define DYNAMIC_BLADE_DIMMING ?
And is it OK to have things defined twice if both SAVE_STATE and ENABLE_ALL_EDIT_OPTIONS are active?

#ifdef SAVE_STATE
#define SAVE_VOLUME
#define SAVE_PRESET
#define SAVE_COLOR_CHANGE
#define SAVE_DYNAMIC_DIMMING
#endif

#ifdef ENABLE_ALL_EDIT_OPTIONS
#define DYNAMIC_BLADE_LENGTH
#define DYNAMIC_BLADE_DIMMING
#define DYNAMIC_CLASH_THRESHOLD
#define SAVE_VOLUME
#define SAVE_BLADE_DIMMING
#define SAVE_CLASH_THRESHOLD
#define SAVE_COLOR_CHANGE
#endif

Hello! Can I try out OS6 by downloading the code from GitHub as a .zip? Also, does the Arduino Proffieboard plugin v2.2 work with OS6, or do I need the latest code zip for that too?

It’s still pre-Alpha, you can download but it’s not in final form for testing, there are parts still being added and/or worked on and there’s no documentation.

Is it safe to try, and then revert to a stable version when I’m done, or could I potentially fry my board if something goes wrong?

Software can’t fry your board.

Ok, thanks for the info! I’m not very experienced in flashing the Proffieboard, so I just wanted to be safe before I tried something that’s very untested. By the way, OS6 is looking amazing so far! This truly is the cutting-edge future of lightsabers

If you’re not experienced definitely back up everything, your SD, your config, etc. Personally I wouldn’t really recommend someone unfamiliar trying to use the OS while it’s still being developed but there’s nothing stopping anyone from downloading it.