Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config Menu Wrong Audio Being Played When Switching Menus After Modification #52

Open
772pilot opened this issue Mar 20, 2017 · 30 comments

Comments

@772pilot
Copy link

772pilot commented Mar 20, 2017

As the title says, I've encountered a config mode bug in which the min / max audio files are played when changing menus after a modification has been made to the previous menu.

EXAMPLE:
-I'm currently in the "VOL" menu and my current volume is 15.
-I increase the volume +5 to 20 by clicking the main button five times, but I have not hit the maximum volume yet (30). Ergo, the "max" audio does not trigger.
-I change menus by holding the main button.
-The LEDs change to indicate I am now in "blade color" menu, but the female announcer audio for "blade color" does not play. Instead I hear either the "min" or "max" sounds (tracks 10 and 11 in the CONFIG folder).

This only happens if I modify the settings within each menu and not when I skip directly from menu to menu. (i.e., it happens when I'm modifying volume or something and NOT when I switch from SNDFNT->VOL->BLADE COLOR). It happens fairly consistently in the volume menu, but also occasionally pops up when modifying the color menus too.

I've verified that all my files have been copied over to the SD card correctly (audio is fine everywhere else), and that Soundfont.h reflects the contents of my SD card.

Running on LSOS 1.3 in luxeon configuration, chinese nano clone, MPU6050, and DFPlayer. Using Arduino IDE v1.8.1 with board manager 1.6.11.

Any thoughts?

@Protonerd
Copy link
Contributor

Did you try v1.5 as well? It could be that the config files have changed since v1.3? I guess yes.

@772pilot
Copy link
Author

772pilot commented Mar 25, 2017

I haven't yet. I cannot compile v1.5. I'm getting these errors:

LightSaberOS:317: error: 'class MPU6050' has no member named 'dmpInitialize_light'
and

In function 'void SleepModeEntry()':

LightSaberOS:1452: error: 'class DFPlayer' has no member named 'sleep'

   dfplayer.sleep();

@Vulkan1
Copy link

Vulkan1 commented Mar 25, 2017

As for the dmpinitialise_light. Make sur ethe libary is up to date. I had that issue as well. I tried commenting it but I got no swing sounds (#41)
Give that a go

@Protonerd
Copy link
Contributor

:) RTFM . Most common mistake, you haven't updated your libraries. Starting from 1.4 (or even 1.3?) I made the MPU init code leaner, probably you still have thd old lib.

@Protonerd
Copy link
Contributor

Thanks Vulkan, you came first!

@772pilot
Copy link
Author

This is all happening after installing the new libraries.

@Vulkan1
Copy link

Vulkan1 commented Mar 25, 2017

Make sure you have got the right directory. Same issue as me, I was updating the wrong library's.

@Vulkan1
Copy link

Vulkan1 commented Mar 25, 2017

"If you go in preferences and turn on "verbose output" you may see something
like this:

Multiple libraries were found for "Wire.h"
Used: C:[...]\packages\arduino\hardware\avr\1.6.17\libraries\Wire
Not used: D:[...]\Documents\Arduino\libraries\Wire

Jason "Kuma" Brinkerhoff
*Mad Science Workshoppe, *proprietor
http://jbkuma.com/workshoppe"

@Vulkan1
Copy link

Vulkan1 commented Mar 25, 2017

I don't know how to quote, sorry Jason.

@772pilot
Copy link
Author

772pilot commented Mar 25, 2017

Yeah, I'm seeing that. For DFPlayer as well, actually.

EDIT: Removed the avr installation of the Wire library. That warning is now gone. Also removed "DFPlayer" folder from libraries so that only "DFPlayer_LSOS" is used. That warning is also gone.

Still receiving the following:

In function 'void setup()':

LightSaberOS:317: error: 'class MPU6050' has no member named 'dmpInitialize_light'

   devStatus = mpu.dmpInitialize_light();  // this is a ligter version of the above

and

In function 'void SleepModeEntry()':

LightSaberOS:1452: error: 'class DFPlayer' has no member named 'sleep'

   dfplayer.sleep();

Running Arduino IDE 1.8.1 w/ board manager 1.6.17

@Vulkan1
Copy link

Vulkan1 commented Mar 25, 2017

The avr and wire were examples, u need them. The mpu6050 libary is still out of date. What version are you getting your libary idea from? And what version are you running.

As for the DFPlayer this is the same. I believe in 1.5 the library's have been edited to accomodate new features. That said this would be a question for proto. But that's what I believe is going on.

@772pilot
Copy link
Author

I'm using the library that comes with the LSOS GravityBlend v1.5 master download. Same with DFPlayer.

@Vulkan1
Copy link

Vulkan1 commented Mar 25, 2017

Did you install all the new libraries from the folder without a capital L

@jbkuma
Copy link

jbkuma commented Mar 25, 2017 via email

@772pilot
Copy link
Author

Oh interesting. The "libraries" folder is not included in the ZIP download, only the "Libraries" folder.

@772pilot
Copy link
Author

Ok, I installed the new libraries, but I'm still getting this:

In function 'void SleepModeEntry()':

LightSaberOS:1452: error: 'class DFPlayer' has no member named 'sleep'

   dfplayer.sleep();

I'm definitely using the appropriate library so I'm confused now.

@Vulkan1
Copy link

Vulkan1 commented Mar 26, 2017

We have elmininated most of the errors which is good. This one is a question for one of the developers. that being proto or anyone else.

@772pilot
Copy link
Author

If it helps, DFPlayer.h in the "libraries" folder seems to be exactly the same as the regular "Libraries" folder. Perhaps the updated version is not reflected on github?

@jbkuma
Copy link

jbkuma commented Mar 26, 2017 via email

@Protonerd
Copy link
Contributor

I now made the 2 libraries (L and l) identical, both should have the right library versions. Sorry for the confusion. It was actually a copy/paste problem, when I made the 1.5 branch, it created the original files from the master. When I overwrote the files, I just selected all files needed for a full package. Unfortunately I did not recognize that in my local drive library was with lowercase, therefore it created out of sheer case sensitivty :) a new lib folder. You might ask yourself why I choose not to remove the bad folder: it is very difficult or time consuming (either one of them depending on how you wish to do it) to delete files from a Git,,,

@772pilot
Copy link
Author

772pilot commented Mar 27, 2017

Got the new library installed and switched to Eclipse Arduino. Getting the following compilation errors now:

Arduino\libraries\DFPlayer_LSOS/DFPlayer.h:647:2: error: 'DFPlayerSerial' does not name a type
  DFPlayerSerial * mp3Serial;
Arduino\libraries\DFPlayer_LSOS/DFPlayer.h:128:15: error: 'mp3Serial' was not declared in this scope
   if (NULL != mp3Serial) {
Arduino\libraries\DFPlayer_LSOS/DFPlayer.h:129:17: error: 'class DFPlayer' has no member named 'mp3Serial'
    delete this->mp3Serial;

There are more errors, but they're essentially just repeating these three ad nauseum. The only file affected is DFPlayer.h

@Protonerd
Copy link
Contributor

We are not supporting Eclipse. Please use Arduino IDE. Report if something is not working there.

@772pilot
Copy link
Author

Ah, I understand. I compiled it in Arduino IDE and it worked just fine. However, the menu on LSOS 1.5 seems to be buggier than 1.3. When in the volume menu, holding the main button does not skip to the next menu option, but rather increases the volume another two ticks. This is far removed from my initial problem.

@Vulkan1
Copy link

Vulkan1 commented Mar 28, 2017

U need to disable single button in config if you havent

@772pilot
Copy link
Author

I have.

@Vulkan1
Copy link

Vulkan1 commented Mar 28, 2017

Have you ruled out that it's not your switch. Get two jumper cables (one to ground and one to the main button port) hold the open wire against each other simulating a button hold.
I had a bad button and it did similar things, triggered twice when you press rather then hold. This could be the issue.

@772pilot
Copy link
Author

Yup, I've verified the button works fine. My LSOS v1.3 still works as it should (except for the original bug).

@Protonerd
Copy link
Contributor

No :) that 2 beeps are a signal that the board is ready to go into sleep mode! THat is a new feature in fact. If you do not want to have it, try commenting out 'define DEEP_SLEEP'

@Vulkan1
Copy link

Vulkan1 commented Mar 28, 2017

This is interesting, I'll have to play with 1.5 just been swamped with uni work.

@772pilot
Copy link
Author

Ah, gotcha Proto. I got 1.5 running on my nano and the original bug does not seem to be present. Guess I'll just port my modifications to 1.5!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants