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

v2 Firmware: add force-factory-reset sysex message. #41

Closed
infovore opened this issue Jul 27, 2020 · 5 comments
Closed

v2 Firmware: add force-factory-reset sysex message. #41

infovore opened this issue Jul 27, 2020 · 5 comments
Assignees

Comments

@infovore
Copy link
Collaborator

@infovore infovore commented Jul 27, 2020

A 16n with v2.0.x firmware starting up for the first time checks its EEPROM to see if it needs to do a factory initialisation. It does this by looking at the first byte of sort-of-EEPROM; if it's not 0xff, it assumes it's already been programmed; otherwise, it fills the EEPROM with default settings.

This is a problem if your Teensy has been used in a previous project, and has a non-0xFF first byte, but the rest of the EEPROM is not really 16n data; that data gets sent as garbage Sysex.

So:

  • Add a new sysex receive message that will force a factory reset.
  • Add some kind of way of triggering this from the editor tool, or a new endpoint that can handle it.
@infovore infovore self-assigned this Jul 27, 2020
infovore added a commit that referenced this issue Jul 27, 2020
As per #41, it should be possible to remotely reset the EEPROM to
factory defaults. This adds a sysex message that should do that.
@modularev
Copy link

@modularev modularev commented Jul 27, 2020

I just ran
for (int i = 0 ; i < EEPROM.length() ; i++) {
EEPROM.write(i, 0xff);
}

which made it get recognized by the editor and work as expected!
Thanks and all the best!

@infovore
Copy link
Collaborator Author

@infovore infovore commented Jul 28, 2020

@modularev Amazing! That's really good to know because it confirms that this is the issue. I've got the sysex end of things written, just need to work out how to add it to the editor in a sensible way - and then people who aren't editing code can have the same fix.

@modularev
Copy link

@modularev modularev commented Aug 19, 2020

A weird thing I noticed with my solution is that the editor won't show any value of the fader when cc is set to sth else than "standard"
e.g. fader 16 with init cc 47 doesn't show it's value in the editor when changed to cc 88
the 16n regardless sends the correct value on the correct midi channel...

@modularev
Copy link

@modularev modularev commented Aug 19, 2020

nevermind, initializeFactorySettings(); solved it.

@infovore
Copy link
Collaborator Author

@infovore infovore commented Aug 19, 2020

good to know: the change I'm making basically runs initializeFactorySettings() when sent a sysex message. should be done in the next few weeks.

infovore added a commit that referenced this issue Dec 27, 2020
As per #41, it should be possible to remotely reset the EEPROM to
factory defaults. This adds a sysex message that should do that.
infovore added a commit that referenced this issue Dec 29, 2020
As per #41, it should be possible to remotely reset the EEPROM to
factory defaults. This adds a sysex message that should do that.
@infovore infovore closed this in #42 Dec 29, 2020
infovore added a commit that referenced this issue Dec 29, 2020
* Implemetation of MIDI Pass Thru

Successsfully tested on Teensy3.2 and Teensy LC builds

* Soft MIDI Thru now set by byte 8 of config RAM.

* Add Sysex message to force factory reset.

As per #41, it should be possible to remotely reset the EEPROM to
factory defaults. This adds a sysex message that should do that.

* Blank all config slots on factory reset.

Co-authored-by: AtoVproject <atovproject@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants