MCPcopy Index your code
hub / github.com/rawpython/remi / update

Method update

editor/widgets/toolbox_siemens.py:413–423  ·  view source on GitHub ↗
(self, *args)

Source from the content-addressed store, hash-verified

411 self.bit_index = bit_index
412
413 def update(self, *args):
414 if self.plc_instance==None:
415 return
416 if self.db_index<0 or self.byte_index<0 or self.bit_index<0:
417 return
418 value = self.plc_instance.get_bool(self.db_index, self.byte_index, self.bit_index)
419 self.label_value.set_text( '1' if value else '0' )
420 style={'border':'1px solid black', 'background-color':'gray'}
421 if value:
422 style={'border':'1px solid black', 'background-color':'yellow'}
423 self.label_value.style.update(style)
424
425
426class WordEditWidget(SpinBox, SiemensWidget, _Mixin_DB_property, _Mixin_Byte_property):

Callers

nothing calls this directly

Calls 3

get_boolMethod · 0.80
set_textMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected