Comment 12 for bug 1136890

Revision history for this message
rob (another-rob) wrote :

No worries. Was a frustrating error right as I was finishing up a new mapping, so wound up just hammering at it until I figured out what was going on. While debugging I tried setting a timer in the loop to connect after a delay, and I got the same errors. I didn't test that too extensively, since it's obviously not a workable solution.

The sethook loops were just debugging stuff - was driving myself crazy trying to figure out what was fucking up, so put all the setHook code in a separate function so I could add debug stuff around it. Wouldn't have put loops in otherwise - the things weren't connecting, so I figured I'd hammer at them until they did. That's where I figured out that the return value of connectControl is messed up. Depending on how I set the while condition, they sometimes repeated - if it was while (done===false) they wouldn't repeat, because after one iteration the return value was "ControllerEngineConnectionScriptValue(name = "")" (and not true or false), so it didn't evaluate as false even if the connection didn't happen. If I set the while as while (done!==true) it repeats forever, because "controller..." isn't === true.

Having done a bit of looking at the mixxx source code in the course of this, I am getting tempted to try getting my feet wet with c++ and trying to contribute to the actual program itself instead of just doing mappings... It doesn't seem like it'd be too much of a jump, but I'm already using writing controller scripts as a big procrastination excuse for the actual work I have to take care of, so maybe that's not a great idea right now... haha.

Hey, I wanted to ask you a few questions about your scs.3d script at some point - great mapping, btw... I was wondering how much work it would be to make it address Channel1 through 4 instead of just 1 and 2... I've looked at it a bit, but haven't really dug in that much. I've got 2 scs.3ds and two other modular scratch controllers - I've mapped the others to handle four channels, but ideally I'd like to hack your script to do four as well... I'll drop you a note sometime with some questions once I have a chance to look at your script in a bit more detail.