travisolbrich / Arduino-Emulated-Raildriver

MIT License
3 stars 4 forks source link

error: 'rawhidData' was not declared in this scope #1

Open jackfruh opened 9 months ago

jackfruh commented 9 months ago

Hi Travis, this repo looks great! I tried messing around with it on an Arduino Leonardo, I'm using Arduino IDE 2.2.1

When I run the code, I get an error message: error: 'rawhidData' was not declared in this scope

I see that in the setup function RawHID.begin(rawhidData, sizeof(rawhidData));

Any idea where rawhidData gets declared/populated?

Thanks!

travisolbrich commented 9 months ago

Hi! Thanks for being interested in this project! I've not looked at it in a while but I'll try to make some time over the next couple days to dive back in and clean up the project. I'll get back to you as soon as I can!

travisolbrich commented 9 months ago

It looks like I did a code cleanup at some point and removed the declaration. I've added that back in now. The project builds, but I've not had a chance to test it on hardware yet.

jackfruh commented 9 months ago

Hey Travis, I messed with it a bit, though I have way more to do so I don't have anything to submit as a pull request.

but what seemed to work was replacing this: RawHID.begin(rawhidData, sizeof(rawhidData)); with this: RawHID.begin(writeBuffer, sizeof(writeBuffer));

I got far enough to see that Run8 recognizes it as a Raildriver, so that's awesome, now I just need to get some pots and wire up a few more controls.. Never thought I'd say it but I miss radioshack for that kind of stuff!