|
Post by charlesgrenz on Jan 8, 2020 19:53:46 GMT
Hi. I would like to change the 1/100 degree continuous POV to say 15 or 30 degree angles. We need to direct stepper motors and the angle change will be pretty course. Any idea? Thank Charles
|
|
|
Post by Shaul (Admin) on Jan 9, 2020 17:30:30 GMT
It took me a couple of days to think about your question. This part of vJoy was developed perhaps 10 years ago. First off, I wander if scaling your code so that it rounds up to the nearest 30 degrees is not a better approach. But what do I know.
As for my code (vJoy) it seems to be feasible but I still have to go into the code and see. Let me try to explain how a vJoy device is configured: When a device is loaded, it loads a descriptor (a.k.a HID descriptor). As you've guessed, this descriptor describes the device in detail: How many buttons, which axes and POVs. For each such control (Button, Axis, POV), the descriptor may supply additional details such as minimum/maximum values and logical scale.
By default, a continuous POV is defined of the range -1 to 35999. I never gave it a thought but you may either change the range to 0-11 (That is, 12 sectors of 30 degrees) or scale the full range down. I never tried this so it might either work, or not.
You might ask where this descriptor lies. Luckily, it resides in the registry and created by a tool called vJoyConfig. This means that once we find the exact location in the descriptor where the POV is described, we will be able to tweak it manually. Later, if needed, it will be possible to change vJoyConfig. However, this is not a trivial task.
If you are technical person I will be happy to assist you. If you are not, you will have to ask for help. How would you like to continue from here?
|
|
|
Post by charlesgrenz on Jan 11, 2020 19:35:30 GMT
Hi Shaul,
Thanks for the information. I'm still looking at this and seeing if it will work for our project. I'll get back to you soon about my response and thank you for taking the time to respond.
|
|