Skip to content

Commit d819ddf

Browse files
committed
Merge pull request #1 from emersion/patch-2
Update index.js
2 parents 7d82d6e + 2e7dea4 commit d819ddf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,12 @@ describe('pid-controller', function(){
3737
var correction = ctr.update(vt);
3838
correction.should.equal(8);
3939
});
40+
41+
it('should reset the controller', function(){
42+
ctr.reset();
43+
ctr.sumError.should.equal(0);
44+
ctr.lastError.should.equal(0);
45+
ctr.lastTime.should.equal(0);
46+
});
4047

4148
});

0 commit comments

Comments
 (0)