Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1. Milestones:
  2.  
  3. Here we have an overview of the milestones we've split the project into.
  4. This semester we settled on a design for the project's structure, figured out how to detect the corsair k95 keyboard, and learned how to pass information from a Lua script to a C program.
  5.  
  6. The milestones in yellow are things we are currently working on, which include reverse engineering corsair's packet messaging format, figuring out how to map ascii keys to their hex addresses, implementing the stubs in the Lua API, and continuing to work on the design and functionality of the graphic interface.
  7.  
  8. Eventually, we plan to have a few example scripts to show off the functionality of ckRGB, and to expand support for more keyboards, both in and outside of Corsair's line.
  9.  
  10. Project Structure:
  11.  
  12. This diagram illustrates each critical piece of the project and how each object interacts to make up the system. Beginning in the backend, we have the main application written in C. This application currently utilizes three libraries: libusb1.0, Lua5.2, and Jsmn. libusb1.0 is used to send and receive signals between the keyboard and the main application. Lua5.2 is a scripting language similar to python, which we are using to make it as easy as possible to create new RGB patterns and behaviours.
  13.  
  14. Moving onto the frontend, we wrote an API in Lua that abstracts away the integration of Lua into C and sends the keymapping data in a form that can be interpreted by the main program. Private functions in the main program receive the data from the API calls and send messages to the keyboard via libusb1.0.
  15.  
  16. Profiles will be written in Lua using the API, and can be run through the GUI. The GUI displays the user's scripts and allows the user to choose which script to load. The Jsmn library links to a minimalistic JSON parser for C. This allows a JSON file to be updated at runtime either manually or by the GUI to update variables such as the keyboard's name, product ID, and vendor ID. Eventually, when we start supporting more keyboards, this functionality will be put to use, but, at the moment we are testing primarily on the K95.
  17.  
  18. Contributions:
  19.  
  20. On the documentation side of things, I wrote the README and partitioned the project into milestones. As I went along designing the basis of the main application, I detailed instructions for new contributors to get their development environments setup, and I adapted the RCOS code of conduct for our project. I also wrote up a small tutorial on how to install and build Lua5.2 from source for cross compilation to Windows using minGW with the help of professor Turner.
  21.  
  22. Besides documentation, I worked on the main design for the C application using libusb1.0. This included figuring out how to cross compile for windows using minGW with statically linked libraries. Many challenges we faced had to do with learning how to set flags to find the header files and library .a files, and figuring our the correct order to place them in the compile line. I also wrote the makefile to simplify compilation and new contributor setup time, and designed the current outline of the front-facing Lua API.
  23.  
  24. Issues:
  25.  
  26. As Kaylan said, the libusb documentation is very poor. We are still having trouble figuring out how to map the ASCII keys to their hex addresses. This is necessary to complete before we decided on the best way to store the keymap data.
  27.  
  28. Another outstanding problem we're facing is that we don't know the correct format in which to send data to the keyboard. We know that we need to send 5 control messages in sequence, and that we need to send the data for every single key on the keyboard, but we don't know things like the proper hex address for the requestID, nor how the RGB values are stored. Coupled with figuring out which address belongs to which key,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement