Library refactor is done. I think the interface is pretty clean and it's done under the hood using classes for each axis and virtual functions so I can get rid of the mapping struct my old version used.
This is what the old map looked like.
generic.addAnalogMap(
UNUSED,0,0, // MSB (Unused)
UNUSED,0,0, // CSB (Unused)
BYTE1,BIT0,BIT7, // LSB (7:0 bits of data in byte 1 of controller data)
0,127,255, // min, middle, max
0,255,127, // servo min, max, zero PWM values
D6); // Channel
Here is the new map.
myChuck.addMap(new Nunchuck::joyX(D5,200,125,50)); // chan smax szero smin
you can also statically declare the maps and pass em in that way.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.