Closed DavidN-Work closed 3 months ago
Switched to Bitmap using PIL for text rendering.
For posterity, to do it without bitmap rendering you would want your setup to look something like this:
handler = {
"game": "HELLO_APP",
"event": "HELLO_WORLD",
"min_value": 0,
"max_value": 1,
"icon_id": 1,
"value_optional": true,
"handlers": [
{
"device-type": "screened-128x40",
"zone": "one",
"mode": "screen",
"datas": [{"has-text": True, "lines": [{"context-frame-key": "line1"}]}],
}
],
}
return send_request("bind_game_event", handler)
The "text" key you were using before isn't actually a part of the API, you need to tell it where in the frame to access the data (or use "prefix" or "suffix" for static text segments). Also note the value_optional key, you'll want this if sending the same event value (but different associated data) in subsequent payloads.
return {
"game": "HELLO_APP",
"event": "HELLO_WORLD",
"data": {
"value": 1,
"frame": {"line1": "Hello, World!"},
},
}
And this is a payload associated with how I set it up above.
Thanks for quick response. I misinterpreted the docs and thought that the context-frame-key
was a generic placeholder to which you could assign a custom key to.
Hey Guys,
I'm developing an app using the GameSense SDK to display music data from Sonos on the SteelSeries OLED screen. However, I'm encountering an issue where the OLED only shows "1" under "EVENT VALUE" regardless of the actual music data.
Details:
Event Binding:
Payload:
System Information:
Additional Notes:
Full Code
I know the app says Sonos App. The above code is a Hello World Project, as the Sonos App has the same issue.