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

Clear 0x00 doesn't work #1

Open
spuder opened this issue Aug 11, 2022 · 1 comment
Open

Clear 0x00 doesn't work #1

spuder opened this issue Aug 11, 2022 · 1 comment

Comments

@spuder
Copy link
Owner

spuder commented Aug 11, 2022

All of the following syntax will turn off a real MuteMe device

hidapitester --vidpid 20A0/42DB --open --length 2 --send-feature 0x00 0x00 --close
hidapitester --vidpid 20A0/42DB --open --length 2 --send-feature 0,0 --close
hidapitester --vidpid 20A0/42DB --open --length 2 --send-feature 0,0 --close
hidapitester --vidpid 20A0/42DB --open --length 2 --send-feature 0 --close

Add support for receiving multiple byte HID data streams 0x00 0x00 and translate that to led.off();

    while (bytesAvailable--) {
      auto hidData = RawHID.read();
      #ifdef DEBUG
        Serial.print(hidData, HEX); //TODO: Neither HEX nor DEC print properly
        Serial.println(" ");
      #endif
      muteMe2Color(hidData);
      // TODO: Support multiple bytes 0x00 0x00 (clear)
    }
@spuder
Copy link
Owner Author

spuder commented Aug 11, 2022

I tried this workaround but it is too aggressive

      if (sizeof(hidData) > 1) {
          rgbLed.off();
      }
    while (bytesAvailable--) {
      auto hidData = RawHID.read();
      #ifdef DEBUG
        Serial.print(hidData, HEX); //TODO: Neither HEX nor DEC print properly
        Serial.println(" ");
      #endif
      muteMe2Color(hidData);
      if (sizeof(hidData) > 1) {
          rgbLed.off();
      }
    }
  }

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

1 participant