Public Member Functions | |
def | __init__ (self, name='Battery', icons=None, charge_icons=None, icon_paths=None, suppress_overlays=False, stale_icon=None) |
def | set_charging (self, value) |
def | set_stale (self) |
def | state (self) |
def | unset_stale (self) |
def | update_perc (self, val) |
def | update_state (self, state) |
def | update_time (self, value) |
Static Public Attributes | |
state_changed = Signal(int) | |
Private Member Functions | |
def | _update_state (self, state) |
Private Attributes | |
__state | |
_charge_icons | |
_charging | |
_icon_helper | |
_icons | |
_name | |
_stale | |
A Widget which displays incremental battery state, including a status tip. To use this widget simply call :func:`update_perc` and :func:`update_time` to change the displayed charge percentage and time remaining, respectively. :param name: The name of this widget :type name: str
Definition at line 40 of file battery_dash_widget.py.
def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.__init__ | ( | self, | |
name = 'Battery' , |
|||
icons = None , |
|||
charge_icons = None , |
|||
icon_paths = None , |
|||
suppress_overlays = False , |
|||
stale_icon = None |
|||
) |
Definition at line 51 of file battery_dash_widget.py.
|
private |
Definition at line 83 of file battery_dash_widget.py.
def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.set_charging | ( | self, | |
value | |||
) |
Definition at line 98 of file battery_dash_widget.py.
def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.set_stale | ( | self | ) |
Set button to stale. Not used by base dashboard implementation.
Definition at line 134 of file battery_dash_widget.py.
def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.state | ( | self | ) |
Read-only accessor for the widgets current state.
Definition at line 92 of file battery_dash_widget.py.
def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.unset_stale | ( | self | ) |
Definition at line 145 of file battery_dash_widget.py.
def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.update_perc | ( | self, | |
val | |||
) |
Update the displayed battery percentage. The default implementation of this method displays in 20% increments :param val: The new value to be displayed. :type val: int
Definition at line 101 of file battery_dash_widget.py.
def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.update_state | ( | self, | |
state | |||
) |
Set the state of this button. This will also update the icon for the button based on the ``self._icons`` list :raises IndexError: If state is not a proper index to ``self._icons`` :param state: The state to set. :type state: int
Definition at line 111 of file battery_dash_widget.py.
def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.update_time | ( | self, | |
value | |||
) |
Definition at line 127 of file battery_dash_widget.py.
|
private |
Definition at line 76 of file battery_dash_widget.py.
|
private |
Definition at line 72 of file battery_dash_widget.py.
|
private |
Definition at line 74 of file battery_dash_widget.py.
|
private |
Definition at line 66 of file battery_dash_widget.py.
|
private |
Definition at line 71 of file battery_dash_widget.py.
|
private |
Definition at line 73 of file battery_dash_widget.py.
|
private |
Definition at line 75 of file battery_dash_widget.py.
|
static |
Definition at line 49 of file battery_dash_widget.py.