GithubHelp home page GithubHelp logo

Comments (18)

JHunz avatar JHunz commented on September 7, 2024 1

I think the problem is that the code that converts JSON back to lisp is treating the image data as a list rather than specifically as a bytearray, and the GameSense API is being too strict about what it accepts. for now the following should work better as a handler:

(handler "IMAGE" (lambda (data) (on-device 'screened show-image: (list-to-bytearray (image-data: (frame: data))))))

We'll update the API in a future release to allow lists as well, so that extra conversion doesn't need to be included

from gamesense-sdk.

JHunz avatar JHunz commented on September 7, 2024

Can I confirm a couple things about the way you have this set up?

  1. This is intended to be real-time rendering, rather than precalculated? So calculating all your frame data in advance is not an option?
  2. Are you trying to do this by rebinding the handler for the rendering event with new info in the image-data key each time?

from gamesense-sdk.

Faleij avatar Faleij commented on September 7, 2024
  1. Yes
  2. Yes

from gamesense-sdk.

JHunz avatar JHunz commented on September 7, 2024

Okay, so the problem is that rebinding the handler is causing GameSense to be reinitialized for that game (to force current versions of all handlers), which is what is causing the stock image to be momentarily displayed. What you need to be able to do is pull image data from what you send with the event without rebinding the handler. You can't do this purely with the JSON handler setup.

Luckily for you, we recently added an endpoint for binding GoLisp handlers for developers (including ourselves) who want to do fancier things than what is possible via the JSON API. Unfortunately, we haven't gotten around to updating the documentation yet for it.

Until we do (hopefully very soon, now that someone needs it), here's the general setup:

  1. When you send your event, in addition to sending a "value" key, also send a "frame" key with some subkey containing your image data.
  2. Write the code for a GoLisp handler that passes the image data from the context frame directly into the GameSense calls for sending image data. Assuming your event is named "IMAGE" and your data subkey is "image-data", it will look something like this:
    (handler "IMAGE" (lambda (data) (on-device 'screened show-image-on-zone: (image-data: (frame: data)) 'one)))
  1. Binding this handler once on program startup by posting to the /load_golisp_handlers endpoint with the data {"game": <gamename>, "golisp": <the code above, as a properly JSON-escaped string>}

Hopefully that's clear enough. We'll try to get the documentation updated shortly

from gamesense-sdk.

Faleij avatar Faleij commented on September 7, 2024

Thank you. However I can not get this to work. It seems that load_golisp_handlers is not loading the handlers - I can't see any event handler in the GUI and it is not updating the display. I have tried to load other golisp event handlers via /load_golisp_handlers but I can't get any reaction from the mouse. I am on version 3.9.0
Do I need to do anything besides registering the game, load the lisp handler and send events? Am I missing something?

// response from /load_golisp_handlers
{"load_golisp_handlers": {"game":"EXAMPLE_TEST","golisp":"(handler \"IMAGE\" (lambda (data) (on-device 'screened show-image-on-zone: (image-data: (frame: data)) 'one)))"}}

// response from /game_event
{"game_event": {"level":"","game":"EXAMPLE_TEST","event":"IMAGE","Data":"{\"frame\":{\"image-data\":[128,0,0,0, ...]},"value":0}}}

from gamesense-sdk.

JHunz avatar JHunz commented on September 7, 2024

in the game_event response, I notice the d in Data is capitalized. I'm pretty sure the JSON unmarshaling is case-sensitive.

from gamesense-sdk.

Faleij avatar Faleij commented on September 7, 2024

That's the response I get from the API, this is what I send:

{"game":"EXAMPLE_TEST","event":"IMAGE","data":{"value":0,"frame":{"image-data":[128,0,0,0, ...]}}}

I can't do anything regarding the response, it's SteelSeries Engines response. The response I get I don't process in any manner so it does not matter to me that D is capitalized. I have always been getting capitalized D in the response, it has not hindered any functionality as far as am I am aware.

from gamesense-sdk.

JHunz avatar JHunz commented on September 7, 2024

Are there any errors in your golisp log? Assuming you are on Windows, it should be located in %PROGRAMDATA%/SteelSeries/SteelSeries Engine 3/Logs

from gamesense-sdk.

Faleij avatar Faleij commented on September 7, 2024

There are tons of errors, 1,7mb of errors. Latest of them:

2016/10/18 00:51:47 Dispatch error - Game: EXAMPLE_TEST, Event: IMAGE, Error: In 'unnamed': 
Evaling (on-device 'screened show-image-on-zone: (image-data: (frame: data)) 'one). In 'on-device': 
Evaling (on-device-base device-specifier selector (unhandled-device-ids (get-event-from-selector selector)) args). In 'on-device-base': 
Evaling (cond ((list? device-specifier) (map (lambda (x) (on-device-base x selector potential-device-id-list args)) device-specifier)) ((integer? device-specifier) (when (memq device-specifier potential-device-id-list) (on-concrete-device device-specifier selector args))) ((symbol? device-specifier) (on-devices-of-type device-specifier potential-device-id-list selector args)) ((string? device-specifier) (on-devices-of-type (intern device-specifier) potential-device-id-list selector args))). 
Evaling (on-devices-of-type device-specifier potential-device-id-list selector args). In 'on-devices-of-type': 
Evaling (if (notnil? device-type-name) (map (lambda (device-id) (on-concrete-device device-id selector args)) (all-devices-of-type device-type-name potential-device-id-list))). 
Evaling (map (lambda (device-id) (on-concrete-device device-id selector args)) (all-devices-of-type device-type-name potential-device-id-list)). In 'unnamed': 
Evaling (on-concrete-device device-id selector args). In 'on-concrete-device': 
Evaling (unless (and (string? selector) (or (eq? selector "disabled") (eq? selector "screen-disabled") (eq? selector "vibrate-disabled"))) (let* ((interface (call-device-function device-id "interface"))) (when (and (not (nil? interface)) (has-slot? interface selector)) (eval (quasiquote (send (unquote interface) (unquote selector) (unquote-splicing (map (lambda (x) (list 'quote x)) args)))))))). 
Evaling (let* ((interface (call-device-function device-id "interface"))) (when (and (not (nil? interface)) (has-slot? interface selector)) (eval (quasiquote (send (unquote interface) (unquote selector) (unquote-splicing (map (lambda (x) (list 'quote x)) args))))))). 
Evaling (when (and (not (nil? interface)) (has-slot? interface selector)) (eval (quasiquote (send (unquote interface) (unquote selector) (unquote-splicing (map (lambda (x) (list 'quote x)) args)))))). 
Evaling (eval (quasiquote (send (unquote interface) (unquote selector) (unquote-splicing (map (lambda (x) (list 'quote x)) args))))). 
Evaling (send {background-screener-obj: {another-update-process-mutex: <opaque Go object of type Channel : 0xc0432061c0> auto-enable: #t cleanup-function: <function: unnamed> compute-screen-event-data: <function: unnamed> current-event-index: 0 current-max-repeats: 1 current-repeats: 0 device-ids: (272111360) mark-devices-handled: <function: unnamed> period: 0 process-mutex: <opaque Go object of type Channel : 0xc043206668> proto*: {abandon-next-update: <function: unnamed> another-update-process-mutex: () another-update-process: () auto-enable: #f compute-max-repeats: <function: unnamed> compute-screen-events: <function: unnamed> create-schedule-sync: <function: unnamed> current-event-index: 0 current-max-repeats: 0 current-repeats: 0 deinitialize: <function: unnamed> event-type: 4 force-recompute: <function: unnamed> post-update: <function: unnamed> proto*: {auto-enable: #f cleanup-function: <function: unnamed> compute-period: <function: unnamed> compute-repeat-limit: <function: unnamed> context-frame: {} create-sync: <function: unnamed> current-repeats: 0 deinitialize: <function: unnamed> device-ids: () enable: <function: unnamed> event-type: 15 force-recompute: <function: unnamed> is-on: #t mark-devices-handled: <function: unnamed> on-device: <function: unnamed> period: 250 process-mutex: () process: () remove-device: <function: unnamed> repeat-limit: 0 run-finish-side-effect: <function: unnamed> run-update-side-effect: <function: unnamed> run: <function: unnamed> set-value-with-frame: <function: unnamed> set-value: <function: unnamed> start: <function: unnamed> stop: <function: unnamed> update-function: <function: unnamed> value: ()} schedule-another-update: <function: unnamed> screen-events: () update-function: <function: unnamed> update-screen-to-background: <function: unnamed> value: ()} screen-events: ({format-command: () icon-id: 0 length-millis: 0 raw-image-data: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 255 128 252 1 255 0 0 0 60 15 199 255 195 192 252 127 255 129 255 1 255 224 0 0 60 15 7 255 195 192 240 127 255 131 255 1 255 240 0 0 60 31 7 255 195 193 240 127 255 135 255 129 255 240 0 0 60 62 7 255 195 195 224 1 224 15 135 193 225 240 0 0 60 124 7 128 3 199 192 1 224 15 135 193 224 248 0 0 60 120 7 128 3 199 128 1 224 15 3 193 224 248 0 0 60 248 7 128 3 207 128 1 224 15 3 193 224 248 0 0 61 240 7 128 3 223 0 1 224 15 3 225 224 248 0 0 63 224 7 255 131 254 0 1 224 31 3 225 225 240 0 0 63 224 7 255 131 254 0 1 224 31 3 225 255 240 0 0 63 240 7 255 131 255 0 1 224 31 3 225 255 240 0 0 63 240 7 255 131 255 0 1 224 31 3 225 255 224 0 0 63 248 7 128 3 255 128 1 224 15 3 225 255 0 0 0 62 120 7 128 3 231 128 1 224 15 3 193 224 0 0 0 60 124 7 128 3 199 192 1 224 15 3 193 224 0 0 0 60 60 7 128 3 195 192 1 224 15 135 193 224 0 0 0 60 62 7 128 3 195 224 1 224 15 135 193 224 0 0 0 60 30 7 128 3 193 224 1 224 7 255 129 224 0 0 0 60 31 7 255 195 193 240 1 224 3 255 1 224 0 0 0 60 15 135 255 195 192 248 1 224 1 255 1 224 0 0 0 60 15 135 255 195 192 248 1 224 0 252 1 224 0 0 0 60 7 199 255 195 192 124 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] repeats: #f}) update-screen-to-background: <function: unnamed> update-screen: <function: unnamed>} get-icon-image-data: <function: unnamed> get-screen-write-command-frame: <function: unnamed> get-tactile-write-command-frame: <function: unnamed> get-write-command-frame: <function: unnamed> initialized: #t internal-game-initialize: <function: unnamed> internal-initialize: <function: unnamed> internal-reset: <function: unnamed> merge-icon-text-image-data: <function: unnamed> number-of-screens: 1 number-of-tactile-zones: 1 number-of-zones: 2 proto*: {has-screens: #t proto*: {proto*: {proto*: {get-icon-image-data: <function: unnamed> get-screen-write-command-frame: <function: unnamed> get-tactile-write-command-frame: <function: unnamed> get-write-command-frame: <function: unnamed> has-screens: #f initialize: <function: unnamed> initialized: #f internal-game-initialize: <function: unnamed> internal-initialize: <function: unnamed> internal-post-deploy: <function: unnamed> internal-reset: <function: unnamed> merge-icon-text-image-data: <function: unnamed> num-zones-in-use: <function: unnamed> number-of-screens: 0 number-of-tactile-zones: 0 number-of-zones: 0 post-deploy: <function: unnamed> reset-zone-to-background-image: <function: unnamed> reset: <function: unnamed> rgb-per-key-zone-device: #f rgb: #f screen-zones: {} show-between-on-zone: <function: unnamed> show-between: <function: unnamed> show-image-on-zone: <function: unnamed> show-image: <function: unnamed> show-on-zone: <function: unnamed> show-text-on-zone: <function: unnamed> show-text-with-icon-on-zone: <function: unnamed> show-text: <function: unnamed> show: <function: unnamed> tactile-zones: {} tactile: #f text-to-image: <function: unnamed> vibrate-on-zone: <function: unnamed> vibrate: <function: unnamed> zones: {}}} tactile: #t}} reset-zone-to-background-image: <function: unnamed> rgb: #t screen-dimensions: {one: (128 36)} screen-zones: {one: 0} tactile-zones: {one: 0} text-to-image: <function: unnamed> zones: {logo: 0 one: 1 two: 0 wheel: 1}} show-image-on-zone: '(128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 56 112 17 195 128 14 60 0 248 224 0 143 128 8 70 0 24 200 16 198 64 6 2 0 128 96 1 128 128 28 102 0 24 136 32 197 64 6 2 0 128 96 1 129 128 20 110 0 24 200 32 197 64 6 2 16 240 96 130 129 0 20 106 0 24 112 64 197 64 6 4 16 24 96 132 129 0 22 82 0 24 136 64 197 64 6 12 0 8 96 4 130 0 34 82 0 24 136 128 196 64 6 24 0 8 96 7 226 0 62 66 0 24 136 128 198 64 6 48 16 24 96 128 130 0 35 66 0 60 113 1 227 128 15 62 16 240 240 128 132 0 97 66 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) 'one). In 'unnamed': 
Evaling (let* ((f (get-screen-write-command-frame (get-slot-or-nil screen-zones zone) image-data)) (is-non-generic-frame (neq? f #f)) (has-zone (has-slot? screen-zones zone)) (json (lisp->json f)) (pid (get-pid-for-device-write))) (when (and (eq? #t has-zone) (eq? #t is-non-generic-frame)) (devour-but-log-error (devour-but-log-panic (write-to-device pid json #t))))). 
Evaling (get-screen-write-command-frame (get-slot-or-nil screen-zones zone) image-data). 
Evaling (get-slot-or-nil screen-zones zone). get-slot-or-nil requires a naked symbol as it's second argument, but was given one.

from gamesense-sdk.

ToadKing avatar ToadKing commented on September 7, 2024

There is a small typo in the example posted. Try this instead:

(handler "IMAGE" (lambda (data) (on-device 'screened show-image-on-zone: (image-data: (frame: data)) one:)))

Alternatively, this should also work for the Rival 700.

(handler "IMAGE" (lambda (data) (on-device 'screened show-image: (image-data: (frame: data)))))

from gamesense-sdk.

Faleij avatar Faleij commented on September 7, 2024

sorry but both generate this error:

2016/10/18 01:20:27 Dispatch error - Game: EXAMPLE_TEST, Event: IMAGE, Error: In 'unnamed': 
Evaling (on-device 'screened show-image-on-zone: (image-data: (frame: data)) 'one). In 'on-device': 
Evaling (on-device-base device-specifier selector (unhandled-device-ids (get-event-from-selector selector)) args). In 'on-device-base': 
Evaling (cond ((list? device-specifier) (map (lambda (x) (on-device-base x selector potential-device-id-list args)) device-specifier)) ((integer? device-specifier) (when (memq device-specifier potential-device-id-list) (on-concrete-device device-specifier selector args))) ((symbol? device-specifier) (on-devices-of-type device-specifier potential-device-id-list selector args)) ((string? device-specifier) (on-devices-of-type (intern device-specifier) potential-device-id-list selector args))). 
Evaling (on-devices-of-type device-specifier potential-device-id-list selector args). In 'on-devices-of-type': 
Evaling (if (notnil? device-type-name) (map (lambda (device-id) (on-concrete-device device-id selector args)) (all-devices-of-type device-type-name potential-device-id-list))). 
Evaling (map (lambda (device-id) (on-concrete-device device-id selector args)) (all-devices-of-type device-type-name potential-device-id-list)). In 'unnamed': 
Evaling (on-concrete-device device-id selector args). In 'on-concrete-device': 
Evaling (unless (and (string? selector) (or (eq? selector "disabled") (eq? selector "screen-disabled") (eq? selector "vibrate-disabled"))) (let* ((interface (call-device-function device-id "interface"))) (when (and (not (nil? interface)) (has-slot? interface selector)) (eval (quasiquote (send (unquote interface) (unquote selector) (unquote-splicing (map (lambda (x) (list 'quote x)) args)))))))). 
Evaling (let* ((interface (call-device-function device-id "interface"))) (when (and (not (nil? interface)) (has-slot? interface selector)) (eval (quasiquote (send (unquote interface) (unquote selector) (unquote-splicing (map (lambda (x) (list 'quote x)) args))))))). 
Evaling (when (and (not (nil? interface)) (has-slot? interface selector)) (eval (quasiquote (send (unquote interface) (unquote selector) (unquote-splicing (map (lambda (x) (list 'quote x)) args)))))). 
Evaling (eval (quasiquote (send (unquote interface) (unquote selector) (unquote-splicing (map (lambda (x) (list 'quote x)) args))))). 
Evaling (send {background-screener-obj: {another-update-process-mutex: <opaque Go object of type Channel : 0xc04202a888> auto-enable: #t cleanup-function: <function: unnamed> compute-screen-event-data: <function: unnamed> current-event-index: 0 current-max-repeats: 1 current-repeats: 0 device-ids: (272111360) mark-devices-handled: <function: unnamed> period: 0 process-mutex: <opaque Go object of type Channel : 0xc04202ae08> proto*: {abandon-next-update: <function: unnamed> another-update-process-mutex: () another-update-process: () auto-enable: #f compute-max-repeats: <function: unnamed> compute-screen-events: <function: unnamed> create-schedule-sync: <function: unnamed> current-event-index: 0 current-max-repeats: 0 current-repeats: 0 deinitialize: <function: unnamed> event-type: 4 force-recompute: <function: unnamed> post-update: <function: unnamed> proto*: {auto-enable: #f cleanup-function: <function: unnamed> compute-period: <function: unnamed> compute-repeat-limit: <function: unnamed> context-frame: {} create-sync: <function: unnamed> current-repeats: 0 deinitialize: <function: unnamed> device-ids: () enable: <function: unnamed> event-type: 15 force-recompute: <function: unnamed> is-on: #t mark-devices-handled: <function: unnamed> on-device: <function: unnamed> period: 250 process-mutex: () process: () remove-device: <function: unnamed> repeat-limit: 0 run-finish-side-effect: <function: unnamed> run-update-side-effect: <function: unnamed> run: <function: unnamed> set-value-with-frame: <function: unnamed> set-value: <function: unnamed> start: <function: unnamed> stop: <function: unnamed> update-function: <function: unnamed> value: ()} schedule-another-update: <function: unnamed> screen-events: () update-function: <function: unnamed> update-screen-to-background: <function: unnamed> value: ()} screen-events: ({format-command: () icon-id: 0 length-millis: 0 raw-image-data: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 255 128 252 1 255 0 0 0 60 15 199 255 195 192 252 127 255 129 255 1 255 224 0 0 60 15 7 255 195 192 240 127 255 131 255 1 255 240 0 0 60 31 7 255 195 193 240 127 255 135 255 129 255 240 0 0 60 62 7 255 195 195 224 1 224 15 135 193 225 240 0 0 60 124 7 128 3 199 192 1 224 15 135 193 224 248 0 0 60 120 7 128 3 199 128 1 224 15 3 193 224 248 0 0 60 248 7 128 3 207 128 1 224 15 3 193 224 248 0 0 61 240 7 128 3 223 0 1 224 15 3 225 224 248 0 0 63 224 7 255 131 254 0 1 224 31 3 225 225 240 0 0 63 224 7 255 131 254 0 1 224 31 3 225 255 240 0 0 63 240 7 255 131 255 0 1 224 31 3 225 255 240 0 0 63 240 7 255 131 255 0 1 224 31 3 225 255 224 0 0 63 248 7 128 3 255 128 1 224 15 3 225 255 0 0 0 62 120 7 128 3 231 128 1 224 15 3 193 224 0 0 0 60 124 7 128 3 199 192 1 224 15 3 193 224 0 0 0 60 60 7 128 3 195 192 1 224 15 135 193 224 0 0 0 60 62 7 128 3 195 224 1 224 15 135 193 224 0 0 0 60 30 7 128 3 193 224 1 224 7 255 129 224 0 0 0 60 31 7 255 195 193 240 1 224 3 255 1 224 0 0 0 60 15 135 255 195 192 248 1 224 1 255 1 224 0 0 0 60 15 135 255 195 192 248 1 224 0 252 1 224 0 0 0 60 7 199 255 195 192 124 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] repeats: #f}) update-screen-to-background: <function: unnamed> update-screen: <function: unnamed>} get-icon-image-data: <function: unnamed> get-screen-write-command-frame: <function: unnamed> get-tactile-write-command-frame: <function: unnamed> get-write-command-frame: <function: unnamed> initialized: #t internal-game-initialize: <function: unnamed> internal-initialize: <function: unnamed> internal-reset: <function: unnamed> merge-icon-text-image-data: <function: unnamed> number-of-screens: 1 number-of-tactile-zones: 1 number-of-zones: 2 proto*: {has-screens: #t proto*: {proto*: {proto*: {get-icon-image-data: <function: unnamed> get-screen-write-command-frame: <function: unnamed> get-tactile-write-command-frame: <function: unnamed> get-write-command-frame: <function: unnamed> has-screens: #f initialize: <function: unnamed> initialized: #f internal-game-initialize: <function: unnamed> internal-initialize: <function: unnamed> internal-post-deploy: <function: unnamed> internal-reset: <function: unnamed> merge-icon-text-image-data: <function: unnamed> num-zones-in-use: <function: unnamed> number-of-screens: 0 number-of-tactile-zones: 0 number-of-zones: 0 post-deploy: <function: unnamed> reset-zone-to-background-image: <function: unnamed> reset: <function: unnamed> rgb-per-key-zone-device: #f rgb: #f screen-zones: {} show-between-on-zone: <function: unnamed> show-between: <function: unnamed> show-image-on-zone: <function: unnamed> show-image: <function: unnamed> show-on-zone: <function: unnamed> show-text-on-zone: <function: unnamed> show-text-with-icon-on-zone: <function: unnamed> show-text: <function: unnamed> show: <function: unnamed> tactile-zones: {} tactile: #f text-to-image: <function: unnamed> vibrate-on-zone: <function: unnamed> vibrate: <function: unnamed> zones: {}}} tactile: #t}} reset-zone-to-background-image: <function: unnamed> rgb: #t screen-dimensions: {one: (128 36)} screen-zones: {one: 0} tactile-zones: {one: 0} text-to-image: <function: unnamed> zones: {logo: 0 one: 1 two: 0 wheel: 1}} show-image-on-zone: '(128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 56 112 17 195 128 14 0 120 112 3 199 192 4 35 0 0 24 200 16 198 64 6 0 4 200 0 32 64 14 51 0 0 24 136 32 197 64 6 0 4 168 0 32 192 10 55 0 0 24 200 32 197 64 6 8 4 168 64 32 128 10 53 0 0 24 112 64 197 64 6 8 8 168 64 64 128 11 41 0 0 24 136 64 197 64 6 0 24 168 0 193 0 17 41 0 0 24 136 128 196 64 6 0 48 136 1 129 0 31 33 0 0 24 136 128 198 64 6 8 96 200 67 1 0 17 161 0 0 60 113 1 227 128 15 8 124 112 67 226 0 48 161 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) 'one). In 'unnamed': 
Evaling (let* ((f (get-screen-write-command-frame (get-slot-or-nil screen-zones zone) image-data)) (is-non-generic-frame (neq? f #f)) (has-zone (has-slot? screen-zones zone)) (json (lisp->json f)) (pid (get-pid-for-device-write))) (when (and (eq? #t has-zone) (eq? #t is-non-generic-frame)) (devour-but-log-error (devour-but-log-panic (write-to-device pid json #t))))). 
Evaling (get-screen-write-command-frame (get-slot-or-nil screen-zones zone) image-data). 
Evaling (get-slot-or-nil screen-zones zone). get-slot-or-nil requires a naked symbol as it's second argument, but was given one.

from gamesense-sdk.

ToadKing avatar ToadKing commented on September 7, 2024

It looks like it's still using the old handler code. This appears to be a bug in our Engine code.

My apologies for this. This has only been used internally so far and appears to still have some bugs. Deleting the example_test.lsp file from %PROGRAMDATA%/SteelSeries/SteelSeries Engine 3/games and restarting Engine should fix it. I'll file a bug for the issue you're having and see if it can get a fix in a future release.

from gamesense-sdk.

Faleij avatar Faleij commented on September 7, 2024

It seem to have loaded the new code as I am not getting any errors in the logs, there's no new entry in any of the log files, however I am still not seeing any image on the display.

from gamesense-sdk.

JHunz avatar JHunz commented on September 7, 2024

In the data you send with the event, can you try incrementing the value every time instead of continuously sending 0? I think the caching mechanism (to prevent constant writes) may be working against you in this case. Although I would have expected at least the first image to have been written

from gamesense-sdk.

Faleij avatar Faleij commented on September 7, 2024

Incrementing value does not make a difference. Still no image with neither show-image-on-zone nor show-image.

Side-note: I am able to display text using a lisp handler with show-text.

from gamesense-sdk.

ToadKing avatar ToadKing commented on September 7, 2024

Do you have an example of the exact event data you're sending (the full JSON payload)? It's possible the image is getting rejected for being the wrong format.

from gamesense-sdk.

Faleij avatar Faleij commented on September 7, 2024
{"game":"EXAMPLE_TEST","event":"IMAGE","data":{"value":5,"frame":{"image-data":[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,112,17,195,128,30,0,56,240,3,231,128,4,35,0,0,24,200,16,198,64,1,0,24,8,2,0,64,14,51,0,0,24,136,32,197,64,1,0,24,8,2,0,64,10,55,0,0,24,200,32,197,64,1,8,24,8,67,192,64,10,53,0,0,24,112,64,197,64,2,8,24,16,64,96,128,11,41,0,0,24,136,64,197,64,6,0,24,48,0,33,128,17,41,0,0,24,136,128,196,64,12,0,24,96,0,35,0,31,33,0,0,24,136,128,198,64,24,8,24,192,64,102,0,17,161,0,0,60,113,1,227,128,31,8,60,248,67,199,192,48,161,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}}}

from gamesense-sdk.

Faleij avatar Faleij commented on September 7, 2024

Now it works, Thanks!

from gamesense-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.