Skip to content

Commit

Permalink
fix more PWM edgecases (rapid TOGGLE)
Browse files Browse the repository at this point in the history
  • Loading branch information
luto committed Jan 16, 2015
1 parent e2c3a13 commit a307974
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app/js/emulator/emulator.js
Expand Up @@ -25,10 +25,10 @@ if (typeof yasp == 'undefined') yasp = { };

/** number of milliseconds between two tickWrapper-calls
* @member {Number} */
this.tickDelay = 100;
this.tickDelay = 50;
/** number of ticks inside one tickWrapper call
* @member {Number} */
this.ticksPerTick = 300;
this.ticksPerTick = 150;
/** timeout id of the last tickWrapper-setTimeout
* @member {Number} */
this.tickTimeout = 0;
Expand Down
3 changes: 1 addition & 2 deletions src/app/js/iobank/pin.js
Expand Up @@ -48,7 +48,7 @@ if (typeof yasp == 'undefined') yasp = { };

this.pwmTimeoutFunc = function () {
// called by setTimeout, which resets `this`
pin.setState(pin.state, true);
pin.setState(pin.pwmStatus.state, true);
};

this.resetPwm();
Expand Down Expand Up @@ -84,7 +84,6 @@ if (typeof yasp == 'undefined') yasp = { };
*/
yasp.Pin.prototype.clearPwmTimeout = function () {
clearTimeout(this.pwmTimeout);
this.pwmTimeout = null;
};

/**
Expand Down

0 comments on commit a307974

Please sign in to comment.