mirror of
https://github.com/sinseman44/PyCNC.git
synced 2026-07-16 08:37:09 +00:00
add pid basic test
This commit is contained in:
@@ -49,6 +49,11 @@ class TestPid(unittest.TestCase):
|
|||||||
msg="failed to heat in 10 minutes, final temperature "
|
msg="failed to heat in 10 minutes, final temperature "
|
||||||
"{}/{}".format(temperature, target_temp))
|
"{}/{}".format(temperature, target_temp))
|
||||||
|
|
||||||
|
def test_simple(self):
|
||||||
|
pid = Pid(50, 0)
|
||||||
|
self.assertEqual(0, pid.update(100, 1))
|
||||||
|
self.assertEqual(1, pid.update(0, 2))
|
||||||
|
|
||||||
def test_bed(self):
|
def test_bed(self):
|
||||||
# check if bed typical temperatures can be reached in simulation
|
# check if bed typical temperatures can be reached in simulation
|
||||||
for target in range(50, 101, 10):
|
for target in range(50, 101, 10):
|
||||||
|
|||||||
Reference in New Issue
Block a user