#🤖│community_dev

1 messages · Page 24 of 1

hybrid lake
#

Github has a new feature, thoughts? Is this something we can / should use?

glass radish
placid ledge
#

Hmmm, not sure if it would replace it, as there's always a place for more casual discussion like in Discord, but can imagine it'd be helpful for things that require a more connected thread of discussion that don't fit well into the mold of a github issue

hybrid lake
#

But then when you look at GitHub issues, it's too technical and complicated

tough forum
quiet root
#

not really what discord Was designed for an theres a 500 channel limit. while sounding much i think theres way too many issues someone could come accross. a dedicated forum would be the better solution

quiet root
#

forums offer better search, better management of threads and would also show up on google after some time.

stray fractal
#

Hi folks, would someone here be interested in working on some pure web (Web HID) demos/projects? - it seems to work pretty well and has less friction than requiring people to install native tools to try it out

jagged beacon
#

what is it supposed to do? the demo dose not seem to work.

glass radish
#

works for me

#

love the idea

#

could probably make a nice OBS overlay with this

jagged beacon
#

oh

#

its set for a one hid id

woven trail
#

hello everyone can someone tell me how to switch between all its profiles because I can switch between two profiles?

glass radish
summer fox
#

they didn't even ask in the right channel at all

sage sierra
#

i cant move when i have the double movement enabled, i have removed the wasd bindings and i have lock input method as mouse
but it works if im in another tab
need help

lapis pulsar
sage sierra
#

yes

glass radish
flint cedar
#

It's a different color space for the keyboard

limber timber
#

Is anyone here who could help me to find a suitable design for the new features of the wooting double movement app? Not so happy with my current design... looks to "blocky" imo if this is a word in eglish 😅

#

But I had to make the window a bit wider since there wasnt just not enaugh space on a 1080p monitor to display all fields 🙂

dawn totem
#

@limber timber very cool. I have some ideas to make the ui better. I’m a bit busy, maybe I’ll have something this Thursday for you

dawn totem
#

Any other features or functionality you want to add?

#

Why is there a second column for bindings?

limber timber
# dawn totem Why is there a second column for bindings?

In Fortnite you can bind a direction of movement to two different keys. Until now you couldn't do that with the double movement tool enabled.
This is useful if you have bindings like me, where u can't press some key combinations while strafing / moving if u have only one key assigned.

dawn totem
#

Cool good to know

limber timber
#

prob. found a better design. btw. ignore the labels from the sliders... couldn't find a good name for them until now^^

sonic totem
#

what to do?

#

help me pls

quiet root
hexed sparrow
#

Hey! Does the RGB SDK not support the Lekker yet? wooting_rgb_kbd_connected() is always returning false for me.

quiet root
#

prob cause of the not implemented device ids

#

idk if anything changed to the w2 rgb handling on the keyboard firmware part

#

you could theoretically modify the sdk and recompile it and see if it works

placid ledge
#

No, not yet, there were many changes to the firmware so I'm going to have to do big changes

hexed sparrow
#

Alright! Thanks for the info. I'll keep an eye out for the eventual SDK update.

floral crane
#

Wish I read this before trying and finding out for myself

grizzled wolf
#

right, scrolled up a bit, indeed not yet, will keep an eye out ^^

quiet root
#

theres no sdk for the lekker yet iirc

grizzled wolf
#

was going to look into making my AHK script work using the sdk, but it'll have to wait

quiet root
#

i think simon said he had a branch of analog working with lekker tho

#

maybe well have to wait for the god to descend into our plane of existence

floral crane
#

one day wooting will get more developers

placid ledge
#

I'll make sure I release the analog SDK update with lekker support when we release v4.1 this week (aka prob tomorrow)

#

RGB SDK will be later

grizzled wolf
floral crane
#

Which sdk lets you change profile

#

also I'm guesing wootility doesn't use these sdks since it works and these don't

quiet root
#

it doesnt cause the effects are stored on kbd and execute there

#

the sdk is for sending manual rgb stuff like color arrays etc so programs like project aurora can run custom effects from the pc side

floral crane
#

hmm, I guess I'll do that myself then

placid ledge
#

Was aiming to release new analog SDK update today but ran into some CD problems so gonna have to push it til tomorrow

#

All the stuff is merged so you can compile it yourself if you want (either develop or release/v0.6)

quiet root
#

smh

placid ledge
#

I got got by windows

placid ledge
quiet root
#

are the functions the same or was there big changes

placid ledge
#

no changes on the interface

#

only backend

quiet root
#

so its comp with the existing wrappers by default nice

#

thanks kami-sama

placid ledge
#

yup

quiet root
#

i shall build a shrine for u simon

grizzled wolf
#

should anything happen visually after clicking on the "start analog sdk update" button in wootility?

placid ledge
#

It should indicate that it's loading

#

the installer is on that download link so you can manually update

grizzled wolf
#

aye will go for that

#

the button was doing nothing for me

placid ledge
#

about to push lekker wootility v4.1 out, the analog sdk updating is working on that. Seems like it's a little buggy with v4.0.2

#

ah

grizzled wolf
#

works great

placid ledge
#

Awesome 👍

#

👀

grizzled wolf
#

well, time to make my ahk script in c# then

quiet root
#

?

#

should be able to use ahk

grizzled wolf
#

nah ahk wasn't precise enough

#

and besides it'd bug in some games like 6siege

#

i'd want to make it work with the sdk, then maybe propose it as a feature for wootility

#

as a way to use analog input in games that don't support it

quiet root
#

by basically rapidly pressing/releasing the key?

grizzled wolf
#

yes pretty much

quiet root
#

wouldnt that require software running again

#

which means it prob wont be in the wootility itself

grizzled wolf
#

well, if it runs "in the keyboard" it'd be more efficient

#

instead of having a very precise loop on your machine

#

given one is already needed to scan the keys

quiet root
#

also requires some processing time then

grizzled wolf
#

definitely, if it's turned on, although the loop itself is very chill on the processing side of things

quiet root
#

i was also psure someone already made such a thing

grizzled wolf
#

it's why i need precise sleeps in AHK, otherwise it nukes my cpu with a bajillion loops per second lol

quiet root
#

for w1 and w2

grizzled wolf
#

i did make a script that worked a while back

#

but i want to make it in c#

#

since ahk's performance sucks

#

the script should work on the lekker/w1/w2 too out of the box, if you're curious to try it out

quiet root
#

cant even click the link

grizzled wolf
#

odd

#

does this work

quiet root
#

yes

placid ledge
#

I've got some initial RGB sdk support in the works

#

I think I have enough for a beta version, just not sure how to let yous take it for a spin

#

not sure it's safe enough to just push out the firmware update including the tweaks I had to do

#

Hmmm, well, the changes are pretty small, so only thing they can break is the rgb sdk usage itself, shouldn't have any impact on anything else

placid ledge
#

Got a surprise for ye bois

#

You'll need to update to latest firmware v2.2.3 that I just pushed

#

Nothing has changed with the interface, only thing I changed was adding back the deprecated wooting_rgb_reset which allows the SDK to be a drop-in replacement in Aurora

#

This is just a basic initial implementation, so take it for a spin and let me know what you run into

#

NOTE: If you've making use of wooting_usb_send_feature to send commands outside of what the RGB SDK wraps, then be prepared for it to not work with Lekker. Nearly all of the commands/reports were rewritten for Lekker

quiet root
#

simon

#

if i ever meet u

#

ill kiss u

#

i can finally replace my w2

placid ledge
quiet root
#

works dank fine with aurora

#

thank you simon my love

#

if u ever need smth tell me 😗

placid ledge
#

😏

grizzled wolf
#

oho, i made the script work, legit lost hours on sending input with c# x)

placid ledge
#

oof, rip

grizzled wolf
#

i'll upload a clip real soon

quiet root
#

so ahk or c# now

grizzled wolf
#

c#

#

fuq ahk

quiet root
#

👍

placid ledge
#

noice noice

grizzled wolf
#

atm it's smooth enough that i actually can't tell it's not normal analog

#

my lekker is setup to have no keys bound at all in the profile i've been using, so it's all from the program

quiet root
#

oh @placid ledge do you know if aurora still requires color corretction values with lekker?

#

ik that for the w1/w2 u had to tweak them a bit in the settings for better accuracy

placid ledge
placid ledge
#

so it should match colours set through wootility *

quiet root
#

so i can just remove the scalar settings to the default

placid ledge
#

aye, I think so

quiet root
#

ok ya a quick test would have told me

#

looks way better without the adjustments for w1/w2

placid ledge
#

Awesome

grizzled wolf
#

video processing rn

#

that's with 5ms as the pulse cycle

#

i'm not sure how i'd share the program itself

quiet root
#

not mp4 PepeHands

grizzled wolf
#

i rarely use visual studio x)

#

or, i do but only for unity

#

let's see if this works

#

on the wootility i've made a layout with nothing bound (edited the first default layout)

#

the program asks for a cycle duration in ms, by default it's 20, but 5 or so works quite well too

#

then while it's running it'll mash the WASD keys to get analog-like input

#

not the cleanest code but hopefully close enough, let me know if there are doubts

grizzled wolf
#

as far as the program logic goes:
i set a cycle duration
a key is pressed, i press it
i keep doing so until the analog 0-1 value is higher than the percentage of time i spent pressing the key during the cycle (eg: if a cycle is 20ms and i've been pressing it down for 10ms, then the analog value is 0.5 or greater)
afterwards i release the key until the cycle ends

#

to improve reaction speed and whatnot, if the current analog value is greater than the total time since the cycle started, then i reset the cycle
so i don't need to wait for the cycle to be done to reset it if i press the key further

#

that however is a bit iffy with very short cycles since in theory slightly pressing down the key continuously will be the same as holding it down, but in practice i like how it feels

hexed sparrow
#

Thanks for the RGB SDK update! ❤️

#

When I call wooting_rgb_direct_set_key, it turns on the backlight for the entire keyboard - is that supposed to happen? I was hoping I could control the backlight for just one key, and have the RGB fx I configured in Wootility continue for all the other keys, but maybe that isn't possible.

quiet root
#

AFAIK not possible but i shall see what the master himself has to say about it

floral crane
#

oh pog rgb sdk update
thanks

#

did I do something wrong, I'm using the lekker support branch

balmy iron
#

Did you try running your binary as root?

floral crane
#

oh that works, what do I have to do to fix that, I have udev rules and I'm in the input group (wootility works w/o root)

quiet root
#

wootility doesnt work the same way the sdks do afaik

balmy iron
#

I don't know, @placid ledge pls explain ¯_(ツ)_/¯

floral crane
#

the sdk doesn't go through libusb?

quiet root
#

oh that yes

#

but the sdks prob do more

placid ledge
#

The RGB SDK goes through hidraw now

#

And selects the interface based on usage page

balmy iron
#

Nice, is that getting backported to legacy keebs as well?

placid ledge
#

With this RGB SDK build it does it for all of them

#

So should help with the udev rules you were trying to set up with only giving permissions to the relevant nodes?

floral crane
#

I guess plugdev is the group usually used to give users access to hidraw, though I don't have that group so I'm not sure how many distros still use that or have any rules installed for it

placid ledge
#

IIRC both Wootility and analog SDK use hidraw as well

#

IIRC plugdev is generally on Debian based and stuff like arch uses input

floral crane
#

ah ok

#
# Wooting Two Lekker Edition
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1210", MODE:="0660", GROUP="input", TAG+="systemd", ENV{SYSTEMD_WANTS}="wooting-lekker-xinput@1210"
# Wooting Two Lekker Edition update mode
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="121f", MODE:="0660", GROUP="input"

then my rule needs updated

balmy iron
#

Well see that should just grant access to all hidraws and thus work 🤔

floral crane
#

i dont think arch does that, things like the steam controller need rules to function too

#

KERNEL=="hidraw*", ATTRS{idVendor}=="20d6", ATTRS{idProduct}=="a711", MODE="0660", TAG+="uaccess" steam controller rule

balmy iron
#

And if woooooootility works then it's all good

floral crane
#

yeah on arch /dev/hidrawX devices belong to root user/group, so the input group does not give access to them, you have to make a rule to do that, but for some reason the rule that works for wootility doesn't work for this

#

I figured it out, the subsystem has to be usb not hidraw

balmy iron
#

Interesting

floral crane
#

ofc wootility wont work with usb, so both are needed

balmy iron
#

So it's just like how it works for legacy woots 🤔

placid ledge
#

Interesting, I'll have to take a deeper look

floral crane
#
# Wooting One
# Wootility/Xinput
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", MODE:="0660", GROUP="input", TAG+="systemd", ENV{SYSTEMD_WANTS}="wooting-xinput@ff01"
# Analog/RGB SDK
SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", MODE:="0660", GROUP="input"
# Update Mode
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", MODE:="0660", GROUP="input"

# Wooting Two
# Wootility/Xinput
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", MODE:="0660", GROUP="input", TAG+="systemd", ENV{SYSTEMD_WANTS}="wooting-xinput@ff02"
# Analog/RGB SDK
SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", MODE:="0660", GROUP="input"
# Update Mode
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2403", MODE:="0660", GROUP="input"

# Wooting Two Lekker Edition
# Wootility/Xinput
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1210", MODE:="0660", GROUP="input", TAG+="systemd", ENV{SYSTEMD_WANTS}="wooting-lekker-xinput@1210"
# Analog/RGB SDK
SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="1210", MODE:="0660", GROUP="input"
# Update Mode
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", ATTRS{idProduct}=="121f", MODE:="0660", GROUP="input"

This is what I have now and it works for wootility and the sdks

floral crane
#

What do you do on exit to restore the rgb, my effects just freeze and wootility stops connecting until I replug it

balmy iron
#

wooting_rgb_close() is what I've done

floral crane
#

oh pog openrgb already has wooting support

#

well wooting one

grizzled wolf
#

is there a way to see if the keyboard is currently using an analog profile or the digital one?

#

that way i can check for it to turn my program on/off

floral crane
#

dang I was hoping I could use the sdk without the effects disabling so I could port my g910 code but i'd have to make the ripple effect in my code

quiet root
#

we can change profiles aswell within software and the wootility also retrieves the current profile iirc

quiet root
floral crane
#

then i cant use sdk without breaking that

quiet root
#

breaking what

#

project aurora for example supports the w2(which is basically the lekker with the new wrapper) and u can make custom effect plugins or just layer existing effects

grizzled wolf
#

oo i see

floral crane
#

i cant use aurora, openrgb doesnt have lekker yet, but when either of those are connected I cant use my own wooting rgb program, it breaks those

#

why is the lekkers vid not the same as previously anyway, that has caused many issues

#

it used to be 03EB now its 31E3

balmy iron
#

Yeah, Wooting is all grown up now with their own ID

floral crane
#

they had an id though, they just changed it

#

so are old ones getting updated via firmware or staying the same

quiet root
#

and then only use aurora

#

general rule is only 1 thing has rgb control. either the wooting itself or any 1 program using the sdk

floral crane
#

still windows only

#

and openrgb doesnt support w2 or le/he yet

#

unless you want to fix it

quiet root
#

no im very happy with aurrora myself

#

been using it since i got my w2

#

also forgot ure linux user

#

sowwy

#

id just joink code from the rgb sdk like they did for the w1 controller (openrgb)

#

i mean they didnt even clean up the copy&paste nicely

floral crane
quiet root
#

also unsure if thez thought this would work for the one and two without even including the two matrix for either keymaps or leds

empty cobalt
#

I can't link the dynamic library to my main.cpp. It shows error like this. I put the dylib in the same directory as main.cpp. Is there anything else I should do to link the library? I am kind new to C++.

#

also my test code is here

quiet root
#

im unsure... while i have a macos vm i never really used it and its not setup for dev so i cant even test/help you

empty cobalt
quiet root
#

i mean the easiest way would be open @rpath if thats even a valid thing in macos

empty cobalt
#

It's not a valid path. It appears in the dylib and I am not sure if I should change it.

quiet root
#

imma quickly boot my vm and see how fast i can setup a dev env

#

i assume u use vs2019 for macos?

empty cobalt
#

just a normal text editor

quiet root
#

sorry will take a bit cause macos somehow isnt v11.0 and wont let me install xcode despite being 11.1

#

so imma quickly run the outstanding update to see if itll let me install xcode

empty cobalt
#

I think I solved the problem. I have use an additional "-rpath ./" flag to solve the problem.

#

Never heard of this flag. Another cool thing to learn.

quiet root
#

its a rust thing

#

but if that solves the problem 👍

#

had to soemtime setup macos for compiling anyway

grizzled wolf
#

strangely, today if i have nothing mapped to a key, WootingAnalogSDK.ReadAnalog will always return 0

grizzled wolf
#

the script in r6siege

#

the weapon animation derps a little, possibly cause i used the digital layout

#

interestingly it's not due to the input cycle, regardless the movement is as smooth as expected, movement is quieter as expected

#

and aiming/shooting/etc work as expected, unlike true analog that disables them

#

would be curious to know how this looks like in third person, maybe the derpy animation turns out to be an advantage

empty cobalt
#

I can't get any info about my keyboard 🤔. It is not detected during SDK initialization. I wonder what was wrong this time. It's a lekker keyboard.

floral crane
#

btw @placid ledge the pc file for rgb sdk linux needs to be updated from -libusb to -hidraw so pkg-config can generate the correct flags

quiet root
#

so thats the problem huh

#

just submit a pr

floral crane
#

I didn't think of that, also tony does wooting game detection work on lekker, I can't test it

quiet root
#

uh

#

unsure if it used the sdk or just the usb function

floral crane
#

I wanted to know cause I'm making my own for linux in cpp but I can't get send feature with the values used in game detections code to work, idk if its a me problem or lekker changed those

quiet root
#

prob new lekker codes

balmy iron
#

Lekker changed those, or that's what we've been told

floral crane
#

do we know the new ones yet

#

7 and 23

quiet root
#

no idk if we will ever know

floral crane
quiet root
#

@placid ledge pretty please gib the new stuff

quiet root
#

thats whats inside the lekker wootility

#

and the codes seem to still be the same

#

unless theres support for w1/w2 left in the wootility

floral crane
#

Hmm maybe it's just my code then, ill have to test the game detection on windows

quiet root
#

currently repacking the asar with some debug code that doesnt exist to see if those codes are what were looking for

floral crane
#

Your ideas a lot better than my Wireshark idea, I don't know how to use Wireshark

quiet root
#

ya so

#

command 23 loads a profile

#

params are 0 based

#

for the 4 profiles gives u a range of 0-3

#

magic word is 56016

floral crane
#

magic word?

quiet root
#

and command 39 with parameter 0 hands u the loaded profile

#

psure the usb lib has the magic word

#

ya checked the rgb sdk and it builds the magic word itself

#

so a regular wooting_usb_send_feature(23, PROFILEID, null, null, null) should work

floral crane
#

Oh I got it to work... I have to feature reset first, and load rgb isnt loading the rgb, but the profile is switching

quiet root
#

and wooting_usb_send_feature(39, 0, null, null, null) should return the active profile

#

0 based again

#

hope that info helps you

floral crane
#

it does

#

thanks

quiet root
#

👍

#

watch me get banned for tinkering with wootility code

balmy iron
#

naughty tony

floral crane
quiet root
#

why no gh repo

#

oh wait

#

thats not as advanced as the one cop made

floral crane
#

Its 7am and I'm tired, when I add a config, a pkgbuild, and build binaries I'll make a repo

quiet root
#

👍

#

multiplatform pls

floral crane
#

well, I dont think windows or mac use x11

quiet root
#

thats why ud make seperate files for the different platforms which export common function names to use in the main file

floral crane
#

yeah I could, and maybe I will, though process names also change between platforms

quiet root
#

onlz need to include a singular example line in the config and explain how it works

#

a redo of the profile switcher has been long overdue

#

especially in a lang that can compile a bit better than the cs app cop has

floral crane
#

I believe windows and x11 have triggers for this stuff too, instead of polling

quiet root
#

windows def does

floral crane
#

I'm not great at C, my friend helped me figure out how to get the length of an array

quiet root
#

ya i even made it use the event handler in my fork

#

unsure why cops tool still loops

#

one small thing tho

#

on app exit u should also maybe load the first profile it started with

floral crane
#

the app never exits

quiet root
#

wot

floral crane
#

its always polling forever

quiet root
#

and staying in the last game profile forever

#

and if a sigterm is issued it will exit

placid ledge
floral crane
#

stuff needs to be done like the win32 code, macos code, reading a config file instead of the config in code

quiet root
#

looking good

#

altho i thought more smth like include <windows_funcs.h>

#

and then call them to retrieve the active process etc

#

so that main c is mostly the same code and u dont have too many ifdef

floral crane
#

if the code gets too long I will be moving each platform to its own file

quiet root
#

i think moving them is a good decision now already

#

cause instead of looping id recommend using event hooks in x11 and windows

#

which would just require a single function call and no loop

floral crane
#

you can do that if you want I moved it, I have no idea about any of the win32 stuff yet, I'm done working on this for today

quiet root
#

imma go sleep in a few

empty cobalt
floral crane
#

Hmm actually the code updates the rgb profile, but it doesn't load an effect, it keeps it static

#

Seems you now need an additional RefreshRgbColors (29) at the end

empty cobalt
#

v0.6 Plugin is not getting compiled by CI. The latest release on Github is v0.5. @placid ledge I guess that's why the plugin can't detect the keyboard.

quiet root
#

it is on releases

#

just as prerelease so it wont show without opening alk releases

#

latest release in repo overview only shows latest release marked as release not prerelease or beta

empty cobalt
#

No binary for downloading.

quiet root
empty cobalt
#

Nah, I was talking about the analog plugin

placid ledge
#

@empty cobalt The plugin has it's on CI but it's also built as a submodule of the analog SDK CD. wrapper/sdk/libwooting_analog_plugin.dylib inside the mac release tar of the analog sdk

placid ledge
#

(I'll update the instructions) The state of the analog plugin repo is a bit of a mess, I think I'm going to merge it into the main repo to cleanup the structure

empty cobalt
#

Thanks. That info is really helpful. I now run into a problem where "wooting_analog_uninitialise()" will throw out "EXC_BAD_ACCESS" error. something is already released when I call the uninitialization. Could it be a rust feature that I don't need to actually uninitialize the SDK?

placid ledge
#

Hmmmm, that's weird, I'll have to take a closer look, but at least with the Analog SDK it's not the end of the world if you don't uninitialise. So you can omit it for now to prevent the error hitting you

quiet root
#

so simon does using the rgb sdk, while the kbd is in tachyon mode, impact performance?

placid ledge
#

Without a doubt it will impact performance, the question is by how much, which I'm not really sure of the answer.

quiet root
#

like thats how i used my old w2 since i never used built in rgb

#

and ya how much is the question i wanted to ask

placid ledge
#

Given that it's sending RGB information for the keyboard to update based on, it will result in it doing more work than it would otherwise with just tachyon & no rgb

quiet root
#

ya but it doesnt need to do any processing for actual effects

#

its basically setting everything as sent from the host

placid ledge
#

Yeah, that's true, so it should be fairly minimal, but ultimately it has to do more work than with nothing. I'll put it on my list to investigate alongside with tachyon and see if I can get an idea for you what kinda impact it gives

quiet root
#

that would be dope to know

#

another dumb question is

#

if i only set the colors once

#

and then not send any rgb commands

#

it should be static right

#

and not impact the event loop

placid ledge
#

yeah should be, the rgb will only update when the frame buffers are changed, so if you aren't sending anything then it shouldn't be doing any additional work

quiet root
#

noice

placid ledge
#

(and while RGB SDK is "initialised" it disables any processing from the built in RGB fx)

quiet root
#

that i know

#

if u dont uninitilize it still wont do built in rgbfx

placid ledge
#

yea

quiet root
#

had aurora crash a few times when i first got the w2

#

wait but why is wootility static rgb disabled in tachyon then

placid ledge
#

would maybe be helpful to have some on-board way to reset rgb sdk initialisation in the case of an SDK usage not properly cleaning up and it getting stuck on

#

Although, that's somewhat solved by replugging or restarting the app

quiet root
#

wouldnt that require some form of heartbeating

#

to see if the host sdk died

placid ledge
#

nah, I was thinking more of something like some key combo to uninit sdk incase it gets stuck on

quiet root
#

imo thats too much code bloat for a simple replug/reboot of the app

placid ledge
#

yea true

placid ledge
quiet root
#

as in if tachyon is enabled

#

u cant select static rgb in wootility and have it show

#

unless im dumb and it does that

placid ledge
#

when tachyon enabled it disables rgb fx, giving you the static rgb

quiet root
#

oh so i just misremembered

#

my bad

placid ledge
#

no worries

empty cobalt
#

Just realize "len" in wooting_analog_get_connected_devices_info() is the amount of devices. I always thought it was the memory length. I give it 48 when I have only one device. blobfacepalm

hybrid lake
#

Thank you @drifting wadi

floral crane
#

@quiet root should I base the windows off your fork or is there something else better

quiet root
#

???

#

i dont have any c forks

floral crane
#

its basically the same code

#

game detection was using C apis through dll import

quiet root
#

then yes its the focus change eventr i used

torpid ibex
#

forks are for eating

floral crane
#

I just realized wooting has scroll lock and pause backwards to every single keyboard ever

floral crane
#

I'm not adding windows to ProfileSwitcher, it's just pissed me off for the last 5 hours, I can't get cmake, gcc, or msvc to work, developing on windows is a shitshow, someone else can add it if they want, i'll leave the boilerplate in for it

#

and whoever decided to name the sdks differently on each platform, thanks

empty cobalt
#

I made a stuff that scroll the page based on how hard you press the key.

#

The only problem is that I can't have the system ignore the original input lol

#

It's about the same speed as me scrolling the mouse wheel

#

Is it possible to set the keyboard to send nothing? Like a remap feature? As you can see in the gif, the program worked before the actuation. It will be perfect if the key does not actuate or send nothing to the system. 🤔

quiet root
#

since ahk and other macro programs suppress the key handling further down the line your code can too. just make sure to have a keycombo to disable/enable it otherwise itll scroll when u wanna type smth

#

unless

#

u use pgUp pgDown for this

#

then enabling/disabling can even be done with ctrl+pgDown/ctrl+pgUp

#

since i dont know any widely used software using that combo

empty cobalt
#

I don’t think there is any software that can suppress the keyboard event in macOS. Lack of api for this type of thing. I know there is an api in windows tho. It would be cool if it is a hardware feature.

quiet root
#

then ull be pmuch reimplementing a lot of wootility code except the gui drag and drop

#

cause ud load the keymap from kbd

#

modify the data

#

and set a new keymap

#

obviously this would go horrible as soon as u remap urself in wootility while its running

empty cobalt
#

I just played with wootility and found a switch to disable to the whole digital keyboard in analog profile(never checked them out before). It does what I want but for the entire keyboard.

#

I guess wootility already has had the feature I want but just not for individual keys.

#

wow, even better now. I just found out the gamepad mapping override. My problem is fixed now.

quiet root
#

gamepad mapping override?

#

u mean disabling digital keys?

empty cobalt
#

It disables digital key when there is a gamepad bind.

#

My entire numpad is filled with useless gamepad uparrow now lol

quiet root
#

so u can only scroll up

#

or do u use the analog keymap

#

instead of reading the pressed key

empty cobalt
#

I read the pressed key?

#

I read analog data from the sdk

quiet root
#

ya so u purely go on analog mapping

#

instead of figuring out what key was pressed and where that is on the kbd

empty cobalt
#

Yep.

quiet root
#

unsure how well this works with remapping

#

since u can technically have the same key somewhere else

empty cobalt
#

It is not like remapping but disabling the key.

quiet root
#

no i mean

empty cobalt
#

Remapping to a doing nothing key is like disabling the key

quiet root
#

if u remap lets say num9 (which u could use for scroll up) to num7, num8 and num9

#

so that the entire top row of numpad is num9

#

and u do the bottom row (num1, num2, num3) to be num3

#

will it work with any

#

or does it break

#

cause idk how exactly this impact with the analog sdk

empty cobalt
#

The analog sdk only reports scancode and a float. The scancode will always be the same(?) no matter how I remap the key.

quiet root
#

so its fixed to physical keys

empty cobalt
#

Yep

quiet root
#

sad

empty cobalt
#

The OS will find out what that scancode means. Thats why there is keycode.

quiet root
#

problem is

#

maybe i wanna remap my keys

#

since u can map em per profile

#

meaning that scrolling up and down would be physically bound not bound by the real mapping

#

its a flexibility issue i guess not a real performance problem

empty cobalt
#

Yep. Maybe there should be a callback for analog sdk to notice events such as switching profile. So the scroll action will only work on some profiles.

quiet root
#

such event is never send to the pc tho

#

so ud basically poll the kbd profile

#

personally would prefer a keymap to scancode reversal aswell

#

so that for example

#

when i put my pgUp and pgDown to ctrl, shift for some games

#

i could still use the software

empty cobalt
#

There is no such api to poll the profile either.

quiet root
#

and use it when normally browing aswell

quiet root
#

u can send raw keyboard feature thingies

#

we have all the codes

empty cobalt
#

Not in the analog sdk header 🤔

#

maybe its in the rgb sdk

quiet root
#

the rgb sdk has wooting usb ya

empty cobalt
#

rgb users may want to know when the keyboard switches profile

quiet root
#

so far this is smth ur software should implement

#

poll current profile

#

and wait for changes

empty cobalt
quiet root
#

i play some games with a flight stick

#

i use this on left hand cause i subjectively feel like i have more control and am more precise

#

so i remap pgUp and pgDown for ingame scrolling to ctrl and shift

#

so my right hand doesnt need to move ever

#

but normally my keyboard is not remapped

#

i do entertain the idea of scrolling faster the more its pressed down

#

but i couldnt use the software since it means id be fixed to 2 physical keys

#

and not the mapping

#

ideally a software would read the mapping, fetch the relevant scancodes and check all of them

#

at least imo

empty cobalt
#

I see. The scrolling is not caused by pressing pageUp and pageDown. It is caused by sending a system event of mousewheel up and down.

#

It is faking the system I am sending such events. When you bind the scrolling on ctrl and shift, if you don't disable the original function of ctrl and shift, it will cause two events the same time.

quiet root
#

no

#

i mean

#

i know how u do the scrolling

#

but the software reads scancodes

#

so u have to push smth on ur kbd

#

i usually use pgup and pgdown

#

cause they also work besides scrollwheel

#

but its a fixed speed

#

obviously being able to use the same keys in 2 different keymaps is better imo

#

actually nvm ANYTHING i said

#

if u remap it

#

it should reassign the scancodes

#

im just mega dumb today

empty cobalt
#

Hmmmm. I am so confused now lol

quiet root
#

i mean scancodes are what the os gets

#

if u remap all ur keys to be a

#

then the entire keyboard is filled with the scancode for it

#

theoretically that is

empty cobalt
#

Scancode is the physical position of key on the keyboard if I remember correctly(?)

#

Let me quickly test it

#

Nope. Remapping in wootility also changes scancode.

quiet root
#

normally scancodes are fixed yes

#

but the remapping means it would be able to change the "physical position"

empty cobalt
#

I admit that my method is a little bit hacky. Xinput is not a thing in macos, so who knows what the os gets and how the os thinks it is. But that's why we may need a feature to disable the individual key. Setting it to not actuate.

#

But still report the analog data

quiet root
#

u could

#

map analog buttons

#

and disable the gamepad

empty cobalt
#

Yep. But it could cause potential problems in windows in some applications tho.

quiet root
#

if gamepad is disabled no

#

but another idea is

#

check remap

#

if theres empty keys for remapping

empty cobalt
#

I don't think there is a lot other than F13-F24(?)

#

I remember these is a video from linus tech tip showing off how one of its editor uses the entire keyboard to send macro. I should rewatch it.

#

Also, the reason why I use numpad 9 and numpad 3 to be my scrolling up and down function is that 9 is pageUp and 3 is pageDown if I disable the numpad. But for macos, the numpad cant be disabled.

quiet root
#

he uses a seperate usb device

#

macos also still uses f13-f24

#

due to old mac keyboards having it

floral crane
#

I compiled and installed wooting-rgb-sdk on mac, but how do I get pkg-config to recognize it

#

nvm the mac folder and makefile is missing a pc file

quiet root
#

@floral crane did u forget to include main.h in the source?

floral crane
#

nah you dont have to include the header file of the same filename

quiet root
#

why did u specify it then

#

msvc no like

floral crane
#

its compiled with gcc...

#

literally not tested on mac or windows

quiet root
#

ya this is why i asked

#

msvc will def need a header

#

plus

#

making a header for this simple thing isnt even hard

floral crane
#

there should be a header for every file, win/mac/linux.c all import main.h

quiet root
#

main.h doesnt exist in the repo

floral crane
#

oh hmm

quiet root
#

lol

floral crane
#

how did it compile

quiet root
#

i made a main.h for me

floral crane
#

do what you gotta do

quiet root
#

almost got msvc working

#

such a drag

floral crane
#

oh wait i dont have any headers in my code... i must have deleted them for somereason

#

i installed hackintosh on my laptop so whenever I figure out how to detect window name on mac i'll add mac support

#

what config format should I use, just simple key=value, yaml, json, or something else

#

idk if process names can have spaces on any of the platforms

quiet root
#

for win ill prob make it so it checks the list for title and proc match

balmy iron
#

Anything so long as it's not yaml

quiet root
#

json if anything

floral crane
#

having it recognise process name and window title as valid matches is probably best, there's cases where one process name is shared between multiple things, and window titles are too generic

#
{
    "titles": {
        "Binding of Isaac: Repentance": 1
    },
    "processes": {
        "isaac-ng.exe": 1
    }
}

hows this

quiet root
#

why not make them both be in the same list

floral crane
#
{
    "Binding of Isaac: Repentance": 1,
    "isaac-ng.exe": 1
}

I can do this

quiet root
#

would prob be easier

#

and is virtually the same

floral crane
#

btw if you want to switch the code over to cpp to make it easier to code or read feel free to

#

I just hadn't needed anything in cpp yet to switch

balmy iron
#

Rewrite It In Rust

floral crane
#

no thanks, i'm not maintaining wooting bindings too

quiet root
#

well the only real issue actually

#

seems to be c not liking the fact that the wooting_usb_send_feature func isnt exported

#

at least msvc and the dll dont like to talk to each other because of this

floral crane
#

did you import the header

#

i get no complains for that

#

oh linker issue, cant find the dll

quiet root
#

i checked exports

#

its not in there

#

i think this might be why cop used a custom compile

floral crane
#

wait its not _wooting its just wooting

quiet root
#

thats just msvc

#

ignore the first _

floral crane
#

interesting

quiet root
#

it adds that to all funcs

floral crane
#

oh ur right its not there

quiet root
#

sad times

floral crane
#

its in wooting-usb.h

#

import that

quiet root
#

ya but it doesnt get exported to the PE header

floral crane
quiet root
#

the linker uses the .lib file which also doesnt contain it

#

its a pretty win specific thing

floral crane
#

nice

quiet root
#

i mean i could try implementing disassembling the exported funcs that use it and try finding the function offset dynamically

#

but at that point i can also submit a pr to correctly export the funcs

#

@placid ledge pls fix wooting_usb_* funcs not being exported to dll and lib

#

be my hero

quiet root
#

at least it does compile in like 4kb

floral crane
#

pog

quiet root
#

idk if that increases much with the usb feature stuff

#

but should all too much

#

the most increase would come from actual logic and json reading

#

only took 114lines of makefile

floral crane
#

only

quiet root
#

could prob shorten it by using macros more efficiently

#

but eh

#

it works

floral crane
#

I assumed you were gonna make a vcxproj like wooting not a makefile woah

quiet root
#

also noticed this tho

quiet root
#

plus still works with nmake

floral crane
#

whatever im good with it

quiet root
#

so /shrug

floral crane
#

easier for me

quiet root
#

i mean

#

with vcxproj we can prob get like 1mb or so

#

idk how to cut out all the standard shit with that

#

im better with make files

floral crane
#

same but not that good monkaRUN

quiet root
#

i mean in msvc u just hand /NODEFAULTLIB to the linker

#

and then specify the libs u actually need manually

#

tomorrow ill already make the windows part working

#

and then hope we can also get the send usb thing working on win

#

which isnt necessary for testing luckily

floral crane
quiet root
#

oh shay if u got the time could u try compiling my windows-build branch on linux?

#

to see if i broke linux support or not

floral crane
#

still good

quiet root
#

noice

floral crane
#

Hmmm is is possible to use the sdk to send key inputs Thonk

indigo hound
#

Why do you have a main.h?

floral crane
#

For all the other platforms to import for the main wooting function

floral crane
#

Well it should be!, that'd be useful for making cross platform macros with full key support

#

Make every key on my function layer say a line to the bee movie

quiet root
#

but we will get native wooting macro support

#

its just a matter of when

#

not if

floral crane
#

I guess that works, still kinda be cool

#

So many features to come, when's the next update, I don't remember

#

og I found it, its on the website, end of May, so maybe soon

quiet root
#

i wouldnt think so for macros

#

but maybe

#

also shay

#

pls reinvite to repo

#

i saw it yesterday

#

which was a bit late i think

solemn token
#

Can we get a way to be notified when the keyboard has consumed rgb commands? Or do the rgb set commands already block until the data has been written?

quiet root
#

they are blocking yes

#

u just wait for the command to complete should u thread it

quiet root
#

finally is working

#

while keeping the filesize damn small

#

so far it went from 4kb to 5kb

floral crane
#

Pog

#

I haven't even checked Linux binary size

quiet root
#

pog

#

file so small the second disk sector isnt even really touched

floral crane
#

Now I just gotta add mac

#

And a config file, that's next

quiet root
#

ya

#

what we gonna use?

#

json?

#

actually

#

scratch that

#

well use xml

floral crane
#

Json, om is gonna write a tiny simple parser instead of a lib, we're only using a tiny part of json

quiet root
floral crane
#

I think I'm gonna have a function for each platform that returns the path for the config file of that platform

quiet root
floral crane
#

We're using such a small part of json it would be smaller to just write a parser function into a struct array

quiet root
#

im unsure how much it actually takes up to use these embedded system parsers

balmy iron
#

Don't show this to r* Krappa

quiet root
#

exactly 8kb with jsmn

#

from 5120bytes

#

pretty slim id say

#

cJSON even slimmer

floral crane
#

a single function with no extra code needed even slimmer, possibly, depending on what om makes

quiet root
#

ya but what if it fucks up parsing

#

i just used cJSON array parser

#

and it increased the size by a hand full of bytes

#

not even kb

#

so its not a huge risk

#

since its known to work

#

and slim af

floral crane
#

how can you mess up parsing

quiet root
#

i mean go on

#

we can make a size comp at the end

floral crane
#

ye

quiet root
#

and not just put data into array like caveman

#

especially since json doesnt need newlines and also doesnt have strict indent rules

floral crane
#

true

quiet root
#

but ya like i said we can try both

#

and still decide later

floral crane
#

is your working code pushed, i don't see much code, I thought it would take more than this to get the title

quiet root
#

na windows has nice apis for this

#

ill need to check getting process name tho

#

not too sure what the most effective way is

#

but yes the windows-build branch is working code to print at least

#

its not yet switching profiles due to missing exports in the rgb sdk

floral crane
#

syte monkaCry

quiet root
#

dw hes a hero he'll save us

floral crane
#

well when you're done make a pr or commit it directly, there's been a few commits since your fork so you'll have to merge a few changes

quiet root
#

👍

floral crane
#

why does github consider .h files c++ Thonk

#

we have .hpp or .hxx for a reason

quiet root
#

the includes are a mess lol

floral crane
#

not too bad

quiet root
#

uh... when i rebased just now onto ur repo/master

floral crane
#

oh

#

yeah

quiet root
#

there was multiple includes of some shit

#

i fixed it again

floral crane
#

you might be using a mix of tabs and spaces here btw

#

there's an extra #include windows.h in your win_native.h

quiet root
#

its not extra

#

thats the standard windows header for win api shit

#

i have an even weirder problem tho

#

trying to use strrchr

#

but apparently its an unresolved external symbol

quiet root
#

it does fetch the proc name now

#

altho i basically implemented ghetto strrchr

#

good enough now

#

now to wait for simon

floral crane
#

oh windows has a windows.h, I see why you renamed that then

quiet root
#

ya just to avoid confusion

quiet root
quiet root
#

PR submitted

#

the exe turned out to be 6KB so far without any json

#

if this gets merged imma start work on implementing cJSON to main.c

#

since we only really need it in there as its not platform specific

floral crane
#

Yeah no point in making a new file for such a small program

#

I'll look at it when I get home

quiet root
#

@floral cranethe way u do profile updating for proc and win titles breaks as soon as the order u match in is match, no match since that causes the profile to default to 0

#

its why i implemented concurrent matching of both process and window title

floral crane
#

Each platform has different sizes of things to match, and the they're all different,
Windows has executable name/path and window title
Linux has window name, window class, window title, and will have executable name/path
Mac will have executable name/path, window title, and possibly window class and window name if they provide those attributes
If the user doesn't provide a match in the config that matches update_profiles match variable it doesn't do anything, it just updates the last_match and skips updating the keyboard

quiet root
#

nope does exactly what i predicted

#

rn for windows it matches win title then proc name

#

but since they are seperate calls it means if u dont use process names it just defaults to profile 0

#

the only solution i can think about thats flexible and cheap to implement is making update_profile return a 1 if the update was successful and 0 otherwise

#

actually no

#

also wouldnt fully work this simple

#

implemented a smarter approach so other functions can check if a match was already found and abort if necessary

floral crane
#

Hmm that's probably a better way, I was gonna make the input an array and have it just pick the first successful match

#

Which way should we go for

quiet root
#

both ways work

#

and both do the same

#

like they both pmuch would abort on the first match so its more of a programming comfort thing i guess

#

havent even thought about array arg tbh

floral crane
#

lmk when your pr is ready to be merged, or merge it when you're done, also how would we get the active profile from the keyboard

quiet root
#

check the feature codes

#

theres one to retrieve it

#

31 or 32 iirc

#

11

floral crane
#

oms parser isnt gonna work, you can add the cjson if you want

quiet root
#

👍 thats a job for tomorrow me tho

floral crane
quiet root
#

tomorrow me might also find out why atexit wont compile on windows

#

btw how smol is the linux binary

floral crane
#

16k

#

with -Os -s

quiet root
#

noice

#

i always cry when i look at how small the linux makefile is

#

pains me to see what msvc needs to do the same

floral crane
#

lol

#

theres a lot more you can do, i just dont know any of it

quiet root
#

ya but thanks to msvc pmuch only offering nodefaultlib option

#

it then needs 20more options to add back the shit u want

floral crane
#

ok how do I get the value from send_feature...

quiet root
#

custom sdk build that exposes a read_result function so we dont have to redo finding the hid handle for the correct keyboard

floral crane
#

I wanna learn how hidapi works and make my own lib but thats too much work

quiet root
#

already added the necessary functions to my fork testing rn after i fixed the improper include of unist.h u added to main

floral crane
#

whats improper about importing unistd.h

#

i forget what I import it for

quiet root
#

its a posix only thing

#

for sleep

floral crane
#

oh yeah

quiet root
#

which is non standard

#

and windows uses synchapi and Sleep

#

with uppercase S

floral crane
#

wish there was a better solution, even the sleep didn't completely fix it

quiet root
#

so i had to split the imports to their OS headers (which get included first anyway) and then use ifdef to differentiate between win32 and the rest

floral crane
#

I still keep closing every program cause my close shortcut gets spammed thousands of times when closing isaac

quiet root
#

ud have to sleep between all commands

floral crane
#

the sleep is just to give time for all keys to be released before messing with the keyboard if the switch was caused by a key press like alt f4, win, or alt tab

quiet root
#

ya but the keyboard freezes very briefly after every command

#

so should it actually not have the keys buffered as released yet u basically spam it with 4 hid requests

#

which take priority

quiet root
#

safe to say im super confused rn

#

sending feature report 11 and doing an hid read right after should give us the profile since thats what the wootility does

#

but for some reason is always just comes back empty

floral crane
#

@quiet root sleeping between each call also doesn't fix it

quiet root
#

shay would u be ok with static linking of the rgb sdk?

indigo hound
#

Ey, what you boys up to

quiet root
empty cobalt
#

I read the source and I have an amateur question. How do you exit from start_listening()? The while loop is always true and there is no break(?)

quiet root
#

close the program

#

ctrl+c or the x on the terminal window

empty cobalt
#

So the rgb_reset() is not needed?

quiet root
#

technically is but it wont make the kbd die

#

imma implement exit handlers later today anyway

empty cobalt
#

Cool

indigo hound
#

You can also use the kill command to send a posix signal to end the process

quiet root
#

also only linux uses a while loop

#

thats always true

indigo hound
#

Its very common to see infinite loops in these kinds of situations

#

Do keep in mind to put some delay in the loop :)

quiet root
#

should be conditonally finite

#

not unconditionally infinite

balmy iron
#

And use some kind of poll() instead of check_event();sleep(1);repeat();

quiet root
#

tell that the linux man

#

i only do windows

#

and use the recommended getmessage event loop

empty cobalt
#

My program eats a lot of resource when doing while loop like this. Trying to figure out why and learn from others.

balmy iron
#

Well according to docs XNextEvent blocks until an event is received so it's gucci

quiet root
#

didnt even see that ngl

indigo hound
#

Unless your operating system intervenes or interrupt handler is triggered. Your process will be able to run infinite loops as fast as it can. As you most often don't need it running millions/billions of times per second, you can signal the operating system to put your process in the blocked state. Either to be activated after some time has passed(sleep) or some event being registered. This allows the operating system to use that thread/core to execute some other code (or just let it idle) in the mean time.

quiet root
#

sleep is not even standard c

#

lets not talk about it

indigo hound
#

Nope its a syscall

quiet root
#

also need to fix sleep calls in the code

empty cobalt
#

I see. So that’s why there is a call for XNextEvent()

indigo hound
#

const char *last_match = "";
Keep in mind with strings in C, you need to reserve one more spot for the null '\0' character.

Have not looked if handled correctly, but from experience I know to be very diligent with that.

quiet root
#

sleep fixed

quiet root
#

i dont freakin get it

#

im so lost with hidapi reads

#

even when i compile in the rgb sdk as static lib

#

the reads come back all 0

#

but wootility still reads the current profile fine

placid ledge
#

what are you doing to read?

quiet root
#
void wooting_usb_read_response(uint8_t *buff, size_t len)
{
    int result = hid_read(keyboard_handle, buff, len);
#ifdef DEBUG_LOGs
    printf("Read_timeout result \n");
    for(int i = 0; i < len; i++ )
    {
        printf("%c", buff[i]);
    }
    printf("\n");
#endif
}
#

the first 3 or 4 bytes

#

are like the ones the wootility reads

#

but after that its all 0

#

where the wootility has a 1 and then the profile index

#

thats wootility

#

i get the first 4 bytes the same

#
    wooting_usb_send_feature(GetCurrentKeyboardProfileIndex, 0, 0, 0, 0);

    uint8_t buff[256] = {0};

    printf("%d\n", buff[0]);
    wooting_usb_read_response_timeout(buff, 256, 2000);
#

thats the code to read it

#

and GetCurrentKeyboardProfileIndex is 11

#

im so confused

placid ledge
#

are you certain the 4th byte is the same with what you're getting?

#

Cus 5th byte is the length of the data following

quiet root
#

yes

#

5th byte is 0

placid ledge
#

If the command is being called correctly it should always be 5: 1 6: profileIndex

#

are you reading this with wootility closed?

quiet root
#

yes

placid ledge
#

The 4th byte is response code following this struct:

typedef enum {
  UnknownResponseResult = 0x66,
  SuccessResponseResult = 0x88,
  OverflowResponseResult = 0x99,
  ErrorResponseResult = 0xFF,
} ResponseResult;
#

Hopefully something I'm saying can help 😄

quiet root
#
208, 218, 255, 136, 0, 0, 0, 0, 0, 0, 0,
#

and it does return 0x88 on byte 4

placid ledge
#

Hmmmm

#

The only thing I can think of is that this response somehow isn't coming from the intended command i.e. the getCurrentProfileIndex

quiet root
#

so id need to implement a read into the send_feature to basically make sure the read is from that command

placid ledge
#

Maybe, but with the code you gave I can't imagine how it would end up with the wrong command unless you doing multithreading (which is also sending commands)

quiet root
#

already tried both MT and MD

#

to rule out multi/single thread

#

both do the same tho

#

oh wait

#

it might be the fact im using the debug flag

#

ok no even after removing the MDd flag completely it still does it

placid ledge
#

hmmm, very strange, have you tried to see if any other commands work?

#

Can't really think of anything else that could be going wrong, the fact that you're getting the SuccessResponseResult indicates that it's definitely getting responded to by a command handler, but what makes it weirder is that the GetCurrentProfileIndex doesn't do any logic, just assign the len to 1 & profile index after that

#

same with the nearby command handlers, they should all at least give some sort of response

#

what result do you get from the hid_read?

quiet root
#

i now reduced the app to purely main

#

and it now only send the feature

#

and reads

#

not even checking connection

#

still 0

placid ledge
#

very strange

quiet root
#

256

#

so it did read 256bytes as instructed

placid ledge
#

Hmmmm, is very weird

#

nothing looks out of place to me

quiet root
#

literally cut out everything from the entrypoint function that could interfere

#

only the 2 sdk calls

placid ledge
#

Hmmmm, looks like it should defo work to me

#

if you weren't getting a valid response that'd be one thing that'd indicate some clear problems

#

but getting a success response that's just empty is really strange

quiet root
#

ya i even checked if wootility does the read different due to the node-hid wrapper

#

but its pmuch the same

#

i even thought it might a problem with the read not being able to write to the entire buffer but init with all 1 shows it fills it with 0

placid ledge
#

if you set it up to keeping reading responses til it can't get anymore what do you find?

quiet root
#

it only reads once

#

after that it dies

placid ledge
#

dies in what way?

quiet root
#

no more to follow

floral crane
#

I don't mind it being a static Liv, but you gotta figure out how to do that on Linux, I've never done static libs

quiet root
#

so as soon as i try to read again it just doesnt do anything

placid ledge
#

hmmmm

#

what's up with that 208 at the end?

quiet root
#

first byte of buff

#

i never emptied it

#

basically would fill the same buff again

placid ledge
#

ah

#

Hmmmm, really struggling to think of more avenues for debugging

#

what if you try some other commands, do you some response body in those?

quiet root
#

i tried with command 7 now

#

also no response

#

altho not sure if that returns data

placid ledge
#

getAnalogProfileMainPartCommandHandler = 13 you should get an UnknownResponseResult. So 4th byte = 0x66

#

ye 7 won't return anything

quiet root
#

13 also returns 136

#

so 0x88

placid ledge
#

Hmmmm, very weird

#

GetRgbProfileCore = 50 should defo give you data

#

it kinda seems like every command being run is pointing to the same thing, are you able to observe that ReloadProfile is actually doing the reload?

quiet root
#

would i see some flashing?

#

btw 50 also no dice

placid ledge
#

no, is a tricky one to test as wootility will clear any unsaved changes on exit.

#

hmmm, something very fishy is going on then

quiet root
#

i found out what caused it

placid ledge
#

🤔

quiet root
#

at least for 50 it seems

#

so 50 does return data now

#

had to call a reset first

placid ledge
#

"call a reset"?

quiet root
#

wooting_rgb_reset();

#

literally before anything

#

and i magically get data sometimes

placid ledge
#

huh, that's weird

quiet root
#

not always

#

like if i start and kill it a few times

#

i only get 1 or 2 responses

#

waiting a bit inbetween always returns data

placid ledge
#

some of the commands the sdk uses will have responses, so maybe if you implement the response reading in the wooting_usb_send_feature then there should be no hanging responses

#

I think I left a basic read commented in there

quiet root
#

tbf i think my testing problems were a result from aurora

#

not properly exiting via the rgb sdk

placid ledge
#

oh, could be

quiet root
#

ya

#

so if i spam run the program

#

sometimes it doesnt return data

#

but just even a second waiting inbetween

#

fixes it all

placid ledge
#

hmmm, sounds like the issue is coming from the read response not being from the command you sent

#

if you always read response after sending command then that shouldn't be a problem

#

Have got some changes planned for the communication as well which should hopefully make that situation a bit better as well. Mainly around multiple apps communicating with the keyboard causing undefined behaviour sometimes

quiet root
#

also pls export the send feature next time

#

i dont wanna rely on custom forks

floral crane
#

pr it back to base

quiet root
#

wooting-usb.h is completely useless on win

placid ledge
quiet root
#

ik

placid ledge
#

is that what you did? if so you can PR it in

quiet root
#

forged it and already fixed it

#

also pushed the read functions

#

might add a separate function for sending a feature command and reading the response

placid ledge
#

sounds good

quiet root
#

so

#

uh

#

i did the thing

#

and uh

#

hm ya

#

it just doesnt

#

were back to all 0

#

how can this be all 0

#

i dont understand

quiet root
#

ya so i now tried another wooting board and clean boot without aurora doing rgb stuff first to eliminate that possibility

#

no dice still

#

all 0

floral crane
#

syte silently bricked your code

quiet root
#

ya prob

#

we went too deep

#

but tbf im at the same point as simon

#

idk why it shouldnt work

floral crane
#

im just waiting for wootility 4.2 HappyBOYE

quiet root
#

@placid ledge wouldnt it be more appropriate if the get functions wouldnt be feature bytes but hid reports

placid ledge
#

In what way? You mean using the hid report id system?

quiet root
#

yes

#

since then wed be able to grab just what we want

placid ledge
#

Pretty much all of them make use of parameters, even tho they be a bit subtle