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

Gradient color based on range does not work. #80

Open
gemboj opened this issue Apr 26, 2020 · 1 comment
Open

Gradient color based on range does not work. #80

gemboj opened this issue Apr 26, 2020 · 1 comment

Comments

@gemboj
Copy link

gemboj commented Apr 26, 2020

SSE3 Version: 3.17.3
OS: Windows 10
Device: QCK Prism Cloth

What have I done:
First I bind a JSON event with following body (color definition taken from official SDK documentation https://github.com/SteelSeries/gamesense-sdk/blob/master/doc/api/json-handlers-color.md#color-based-on-ranges):

{
	"game": "MY_TEST_GAME_5",
	"event": "MY_TEST_EVENT",
	"min_value": 0,
	"max_value": 100,
	"icon_id": 0,
	"handlers": 
	[
		{
			"device-type": "rgb-2-zone",
			"zone": "one",
			"color": [
				{
					"low": 0,
					"high": 10,
					"color": {
						"red": 255,
						"green": 0,
						"blue": 0
					}
				},
				{
					"low": 11,
					"high": 100,
					"color": {
						"gradient": {
							"zero": {
								"red": 255,
								"green": 0,
								"blue": 0
							},
							"hundred": {
								"red": 0,
								"green": 255,
								"blue": 0
							}
						}
					}
				}
			],
			"mode": "color"
		}
	]
}

Then I send a series of events with body:

{
	"game": "MY_TEST_GAME_5",
	"event": "MY_TEST_EVENT",
	"data": {
		"value": XXX
	}
}

Where XXX is a value from range <0, 100>.

What did I expect:
To see first zone of my pad to glow a static red color for values <1, 10> and then to glow a gradient for values <11, 100>.

What did happpen:
First zone of my pad glow a static red color for values <1, 10> and then it goes dark for values <11, 100>.

What else did I try:
I tried different combinations of color illumination settings and I concluded that only gradient in a range based color definition is broken. All other color definitions work as expected. For example:

Code that drops ranges altogether and just sets simple gradient definition does indeed work:

"color": {
	"gradient": {
		"zero": {
			"red": 255,
			"green": 0,
			"blue": 0
		},
		"hundred": {
			"red": 0,
			"green": 255,
			"blue": 0
		}
	}
},

But a single range of a gradient does not work (even though it should have same effect as the code above):

"color": [
	{
		"low": 0,
		"high": 100,
		"color": {
			"gradient": {
				"zero": {
					"red": 255,
					"green": 0,
					"blue": 0
				},
				"hundred": {
					"red": 0,
					"green": 255,
					"blue": 0
				}
			}
		}
	}
]
@Guiguim255
Copy link

Same issue, didn't get any request error.
SSE3 Version: 3.17.3
OS: Windows 10
Device: Rival 3 mouse

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