Регрессия. Возврат кнопки управления питанием УФ в контроле Щ3
This commit is contained in:
@@ -64,6 +64,7 @@ func on_toggled_switch(val: bool, meta: Array, unit_sch3):
|
||||
regs_holding[on_addr] = tools.set_bit(regs_holding[on_addr], on_bit, val)
|
||||
regs_holding[off_addr] = tools.set_bit(regs_holding[off_addr], off_bit, not val)
|
||||
unit_sch3.push_write_holding(regs_holding)
|
||||
print_debug(regs_holding)
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
@@ -137,7 +138,7 @@ func on_input(base_addr: int, data: Array, unit_sch3):
|
||||
var byte1: int = bits[2] # Адрес регистра
|
||||
var bit1: int = bits[3] # Индекс бита
|
||||
var val0: bool = regs_holding[byte0] & (1 << bit0) > 0
|
||||
item.button_pressed = val0
|
||||
item.set_pressed_no_signal(val0)
|
||||
item.disabled = false
|
||||
regs_holding[byte1] = tools.set_bit(regs_holding[byte1], bit1, not val0)
|
||||
unit_sch3.push_write_holding(regs_holding)
|
||||
|
||||
@@ -136,6 +136,17 @@ theme_override_font_sizes/font_size = 17
|
||||
text = "УФ"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="switch0" type="CheckButton" parent="margin/vbox/table" groups=["bits_items_switch", "c111"]]
|
||||
editor_description = "Питание УФ"
|
||||
material = SubResource("ShaderMaterial_c1mqk")
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 2
|
||||
tooltip_text = "Выключатель питания УФ"
|
||||
button_pressed = true
|
||||
action_mode = 0
|
||||
script = ExtResource("7_l6esm")
|
||||
metadata/bits = [0, 0, 2, 0]
|
||||
|
||||
[node name="state1" type="TextureRect" parent="margin/vbox/table" groups=["bits_items_good"]]
|
||||
custom_minimum_size = Vector2(24, 24)
|
||||
layout_mode = 2
|
||||
|
||||
Reference in New Issue
Block a user