Some fixes

This commit is contained in:
Olek Bojda 2018-09-19 21:48:09 +02:00
parent 948c26ce25
commit ade1e31758
3 changed files with 15 additions and 4 deletions

View File

@ -136,6 +136,8 @@ class QtWrapper:
self.widget.linearLabel.setText("{:.2f}".format(linear_vel))
self.widget.angularLabel.setText("{:.2f}".format(robot_info.angular_velocity[2]))
# self.log_info(str(robot_info.clutch == CS.ENGAGED))
if robot_info.clutch == CS.ENGAGED:
self.widget.clutchLabel.setText('1')
else:
@ -180,9 +182,9 @@ class QtWrapper:
self.log_error('Nie mozna wystartowac robota. MasterSTOP wcisniety!')
def update_restrictions_gui(self,restrictions):
self.distanceRestrictionLabel.setText("{:.2f}".format(restrictions.distance))
self.linearRestrictionLabel.setText("{:.2f}".format(restrictions.linear_velocity))
self.angularRestrictionLabel.setText("{:.2f}".format(restrictions.angular_velocity))
self.widget.distanceRestrictionLabel.setText("{:.2f}".format(restrictions.distance))
self.widget.linearRestrictionLabel.setText("{:.2f}".format(restrictions.linear_velocity))
self.widget.angularRestrictionLabel.setText("{:.2f}".format(restrictions.angular_velocity))
def log_info(self,info_text):
self.logger_counter += 1

View File

@ -167,7 +167,7 @@ class ROSWrapper:
def handle_restrictions_update(self,msg):
restrictions = Restrictions(msg)
restrictions_update_callback(restrictions)
self.restrictions_update_callback(restrictions)
# UserPlugin Callbacks
def set_robots_list_update_callback(self,callback_function):

View File

@ -200,6 +200,9 @@
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;-&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
@ -232,6 +235,9 @@
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;-&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="1">
@ -245,6 +251,9 @@
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;-&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">