Skip to content

Commit 4a4829b

Browse files
committed
Removed redundant attributes from TransferFunction class.
1 parent 8c1ae17 commit 4a4829b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

control/system.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,11 @@ def display(self):
403403
Displays the PID TF block
404404
405405
'''
406-
self.num_str = str(self.K_d) + "*S^2 + " + str(self.K_p) + "*S + " + str(self.K_i)
407-
self.den_str = round(len(self.num_str)/2)*" " + "S" + " "*round(len(self.num_str)/2)
408-
self.div_line_len = max(len(self.num_str), len(self.den_str))
409-
self.div_line = self.div_line_len*"-"
410-
pid_tf_disp = str(self.num_str + " \n" + self.div_line + " \n" + self.den_str)
406+
num_str = str(self.K_d) + "*S^2 + " + str(self.K_p) + "*S + " + str(self.K_i)
407+
den_str = round(len(num_str)/2)*" " + "S" + " "*round(len(num_str)/2)
408+
div_line_len = max(len(num_str), len(den_str))
409+
div_line = div_line_len*"-"
410+
pid_tf_disp = str(num_str + " \n" + div_line + " \n" + den_str)
411411
print(pid_tf_disp)
412412

413413
def response(self, input_type, time_period=10, sample_time=0.05, ret=False, show=True):

0 commit comments

Comments
 (0)