Skip to content

Commit

Permalink
Fixed PID controller widget not initializing properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold872 committed Dec 9, 2023
1 parent f49750e commit b0658eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/widgets/nt4_widgets/multi-topic/pid_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class PIDControllerWidget extends NT4Widget {

@override
void init() {
super.init();

kpTopicName = '$topic/p';
kiTopicName = '$topic/i';
kdTopicName = '$topic/d';
Expand Down
1 change: 1 addition & 0 deletions lib/widgets/nt4_widgets/nt4_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ abstract class NT4Widget extends StatelessWidget {
return [type];
}

@mustCallSuper
void init() async {
subscription = nt4Connection.subscribe(topic, period);
}
Expand Down

0 comments on commit b0658eb

Please sign in to comment.