Oh, quick question btw, your calibration script actually creates an idc file in /data/misc/idc/, is this location for idc files a custom CM feature or is it generic? Couldn't find any references in the code, but I might have been looking in all the wrong places ;-)
idc is generic. please see services/java/com/android/server/InputManager.java and libs/ui/InputReader.cpp in aosp frameworks/base.
but I think no need to follow my way. I just wanted to make pointercal compatible with stock rom. my way was useful with pointercal from stock rom when calib app didn't work well.
btw there is limitation in my code, as you know, it can't get values out of range
it should be better to use raw values directly from /dev/input on lower layer. calibration in kernel may be better.
On my github page I'm working on a TSCalibration app that directly writes out the idc file, the writing part works, just need to fix the BOOT_COMPLETED handling, as that checks for existance of the pointercal file, which is now no longer generated, and so TSCalibration starts up on every boot (I don't know the name of the idc file at that point, so can't simply check for that )
I also don't know how to get device name from android code yet
all of my codes are dirty hack. but for my project, dirty hack is enough and I don't have enough time to refine these codes