def update(self):
self._controller.update(self._id, wake_if_asleep=False)<EOL>data = self._controller.get_state_params(self._id)<EOL>if data:<EOL><INDENT>self.__odometer = data['<STR_LIT>']<EOL><DEDENT>data = self._controller.get_gui_params(self._id)<EOL>if data:<EOL><INDENT>if data['<STR_LIT>'] == "<STR_LIT>":<EOL><INDENT>self.measurement = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>self.measurement = '<STR_LIT>'<EOL><DEDENT>self.__rated = (data['<STR_LIT>'] == "<STR_LIT>")<EOL><DEDENT>
Update the odometer and the unit of measurement based on GUI.