comparison Source/Mappings/Control/TouchkeyControlMapping.cpp @ 41:85577160a0d4

Many changes: implement global application preferences on devices etc.; extended editor window support with Control mapping features for now
author Andrew McPherson <andrewm@eecs.qmul.ac.uk>
date Sat, 21 Jun 2014 23:32:33 +0100
parents c6f30c1e2bda
children
comparison
equal deleted inserted replaced
40:50e4859d9769 41:85577160a0d4
364 else if(latestValue < 0) { 364 else if(latestValue < 0) {
365 latestValue += threshold_; 365 latestValue += threshold_;
366 if(latestValue > 0) 366 if(latestValue > 0)
367 latestValue = 0; 367 latestValue = 0;
368 } 368 }
369 } 369
370 370 if(direction_ == kDirectionNegative)
371 if(direction_ == kDirectionNegative) 371 latestValue = -latestValue;
372 latestValue = -latestValue; 372 else if((direction_ == kDirectionBoth) && latestValue < 0)
373 else if((direction_ == kDirectionBoth) && latestValue < 0) 373 latestValue = -latestValue;
374 latestValue = -latestValue; 374 }
375 375
376 sendControlMessage(latestValue); 376 sendControlMessage(latestValue);
377 lastControlValue_ = latestValue; 377 lastControlValue_ = latestValue;
378 } 378 }
379 } 379 }