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

I can not disable both small and big rumble if light colour is not black. #38

Open
Colon-D opened this issue Jun 22, 2021 · 0 comments
Open

Comments

@Colon-D
Copy link

Colon-D commented Jun 22, 2021

I would like to be able to disable rumble when the colour is not black.

I can set small rumble to one and big rumble to zero, and I can set the small rumble to zero and big rumble to one. Both of these are close to what I want, but neither is what I want.
If both small rumble and big rumble are set to their highest value of 255, then both to zero, they remain at 255. The same is true for trying to disable rumble from any other value.

The current workaround I have is to set the colour to black, disable rumble, and then reset the colour to what it was. This work around works pretty well if you do it only when wanting to disable rumble. You can only notice the workaround if you stare at the light, even then most times it is fine.
I wanted to post this issue in case others come across this problem.

Example program that sets rumble to full for two seconds, then tries to disable rumble for two seconds then ends the program:

#include <iostream>
#include <thread>
#include <JoyShockLibrary.h>

int main() {
	// connect devices
	JslConnectDevices();
	// add any amount of color (this could also be done after setting rumble to full)
	JslSetLightColour(0, 0x00000001);
	// set rumble to full
	std::cout << "Setting rumble to full.\n";
	JslSetRumble(0, 255, 255);
	// wait two seconds
	std::this_thread::sleep_for(std::chrono::seconds{ 2 });
	// set rumble to none
	std::cout << "Setting rumble to none. RUMBLE SHOULD BE DISABLED NOW.\n";
	JslSetRumble(0, 0, 0);
	// wait for two seconds second then stop
	std::this_thread::sleep_for(std::chrono::seconds{ 2 });
	std::cout << "End of program.\n";
	JslDisconnectAndDisposeAll();
	return EXIT_SUCCESS;
}

It sets rumble to full for two seconds, then tries to disable rumble for two seconds then ends the program.

I am on Windows 10, using a slightly modified version of the latest release of your library - Version 2.2.0 (I added vcpkg support for personal use)

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