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

GetCurrentTrack and GetTracksCount returned value in 8bit (0-255) high byte is always 0 #3

Open
drrokko opened this issue Mar 20, 2023 · 1 comment

Comments

@drrokko
Copy link

drrokko commented Mar 20, 2023

seems this is an hardware issue.

i coded this to cheat this issue:

  def getRealFilesCount(self):
    c = 0
    if self.getState() > 0:
      return None
    vol_bkup = self._vol
    self.volume(0)
    sleep_ms(100)
    a = self.getFilesCount()
    sleep_ms(100)
    while True:
      b = c * 256 + a + 1
      self.play(b)
      sleep_ms(900)
      d = self.getCurrentTrack()
      sleep_ms(100)
      #print('loop', a, b, c, d)
      if d == a:
        self.stop()
        sleep_ms(100)
        self.volume(vol_bkup)
        return c * 256 + a
      c += 1
    self.volume(vol_bkup)

greetings from germany

@jczic
Copy link
Owner

jczic commented Mar 20, 2023

Hi @drrokko and thanks for your feedback, your chip is KT403A-MP3 ?
I didn't see this bug, in fact it doesn't work anymore after 255 files is it right?
I'm not really into it at the moment but it must be possible to make a simple patch to correctly calculate the right number without all this code no?
Please tell me more.

Greetings from France :)

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

2 participants