Subversion Repositories svn.mios32

Compare Revisions

Ignore whitespace Rev 1426 → Rev 1427

/trunk/apps/tutorials/029_keyboard_velocity/app.c
296,7 → 296,7
int delay = timestamp_final - timestamp_early;
 
int velocity = 127;
if( delay > delay-keyboard_delay_fastest ) {
if( delay > keyboard_delay_fastest ) {
// determine velocity depending on delay
// lineary scaling - here we could also apply a curve table
velocity = 127 - (((delay-keyboard_delay_fastest) * 127) / (keyboard_delay_slowest-keyboard_delay_fastest));