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

Koch sequence not memorized ! #34

Open
philgerm opened this issue Oct 7, 2020 · 3 comments
Open

Koch sequence not memorized ! #34

philgerm opened this issue Oct 7, 2020 · 3 comments

Comments

@philgerm
Copy link

philgerm commented Oct 7, 2020

On version 3.02 the Koch sequence LCWO can't memorized on snapshoot, after recall a snapshot the Koch sequence go to M32/ JLMC. the code looks correct in Write and readPreferences !

@rainerrudigier
Copy link

looks like that in the writePreferences function something got mixed up ..

the lcwoKochSeq is only saved to the morserino savestate - but never to a snapshot

if (morserino) {
    if (MorsePreferences::kochFilter != pref.getUChar("kochFilter")) {
        pref.putUChar("kochFilter", MorsePreferences::kochFilter);
        if (!MorsePreferences::useCustomCharSet)                          // we update these only if we do not use a custom character set!
          koch.setup();
    }

    if (MorsePreferences::lcwoKochSeq != pref.getBool("lcwoKochSeq")) {
        pref.putBool("lcwoKochSeq", MorsePreferences::lcwoKochSeq);
        koch.setKochChars(MorsePreferences::lcwoKochSeq);
        if (!MorsePreferences::useCustomCharSet)
            koch.setup();
    }
}

it should be changed to this (like in v2.4) i think:

if (morserino) {
    if (MorsePreferences::kochFilter != pref.getUChar("kochFilter")) {
        pref.putUChar("kochFilter", MorsePreferences::kochFilter);
        if (!MorsePreferences::useCustomCharSet)                          // we update these only if we do not use a custom character set!
          koch.setup();
    }
}
if (MorsePreferences::lcwoKochSeq != pref.getBool("lcwoKochSeq")) {
    pref.putBool("lcwoKochSeq", MorsePreferences::lcwoKochSeq);
    **if (morserino) {
        koch.setKochChars(MorsePreferences::lcwoKochSeq);
        if (!MorsePreferences::useCustomCharSet)
            koch.setup();
    }**
}

tried it out yesterday evening and it seems to work ..

@oe1wkl
Copy link
Owner

oe1wkl commented Dec 11, 2020 via email

@rainerrudigier
Copy link

thanks

73 de OE9RIR

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

3 participants