ramapcsx2 / gbs-control

GNU General Public License v3.0
788 stars 110 forks source link

Why is there a "setFreq" which is always called even for the "special" frequencies? #273

Closed M-Reimer closed 2 years ago

M-Reimer commented 2 years ago

I just stumbled over this line: https://github.com/ramapcsx2/gbs-control/blob/b9265e4025730aff7e0a4dbb82ac862eb9ba1b6a/gbs-control.ino#L388

You have two "if" blocks above for "special handling" but then still set the frequency directly? Do the two "special handling blocks" above actually have any impact then? Shouldn't this final line be encapsulated in an "else" path?

ramapcsx2 commented 2 years ago

This is a workaround for a bug somewhere in the library, I assume. It works by setting a lower clock first, hence the double clock setting.

M-Reimer commented 2 years ago

Ah. OK. As it seems to do its job probably everything is OK then.