From 5b5a2cf2309d1eb3082947a29512822d7a0a84f0 Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Thu, 28 Sep 2023 12:09:53 +0800 Subject: [PATCH] Add edge counter for the options to TTL Signed-off-by: Egor Savkin --- static/js/shop_data.js | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/static/js/shop_data.js b/static/js/shop_data.js index 03e3053..a4b9f5f 100644 --- a/static/js/shop_data.js +++ b/static/js/shop_data.js @@ -328,6 +328,12 @@ const shop_data = { ]}, null ] + }, + { + "if": [ + {"!": {"and": [{"var": "out_first_bank"}, {"var": "out_second_bank"}]}}, + {type: "Switch", args: {title: "Edge counter", outvar: "edge_counter", tip: "Enable edge counter for inputs"}} + ] } ], rules: { @@ -387,6 +393,12 @@ const shop_data = { ]}, null ] + }, + { + "if": [ + {"!": {"and": [{"var": "out_first_bank"}, {"var": "out_second_bank"}]}}, + {type: "Switch", args: {title: "Edge counter", outvar: "edge_counter", tip: "Enable edge counter for inputs"}} + ] } ], size: 'small', @@ -442,8 +454,7 @@ const shop_data = { {type: "Switch", args: {title: "Termination #1", outvar: "term_1", tip: "Enable termination on channel #1"}}, {type: "Switch", args: {title: "Termination #2", outvar: "term_2", tip: "Enable termination on channel #2"}}, {type: "Switch", args: {title: "Termination #3", outvar: "term_3", tip: "Enable termination on channel #3"}}, - ]}, - null + ]} ] }, {type: "Switch", args: {title: "Output second bank", outvar: "out_second_bank", fallback: true, tip: "Switch connectors 4-7 to output"}}, @@ -455,8 +466,7 @@ const shop_data = { {type: "Switch", args: {title: "Termination #5", outvar: "term_5", tip: "Enable termination on channel #5"}}, {type: "Switch", args: {title: "Termination #6", outvar: "term_6", tip: "Enable termination on channel #6"}}, {type: "Switch", args: {title: "Termination #7", outvar: "term_7", tip: "Enable termination on channel #7"}}, - ]}, - null + ]} ] }, {type: "Switch", args: {title: "Output third bank", outvar: "out_third_bank", fallback: true, tip: "Switch connectors 8-11 to output"}}, @@ -468,8 +478,7 @@ const shop_data = { {type: "Switch", args: {title: "Termination #9", outvar: "term_9", tip: "Enable termination on channel #9"}}, {type: "Switch", args: {title: "Termination #10", outvar: "term_10", tip: "Enable termination on channel #10"}}, {type: "Switch", args: {title: "Termination #11", outvar: "term_11", tip: "Enable termination on channel #11"}}, - ]}, - null + ]} ] }, {type: "Switch", args: {title: "Output fourth bank", outvar: "out_fourth_bank", fallback: true, tip: "Switch connectors 12-15 to output"}}, @@ -481,8 +490,13 @@ const shop_data = { {type: "Switch", args: {title: "Termination #13", outvar: "term_13", tip: "Enable termination on channel #13"}}, {type: "Switch", args: {title: "Termination #14", outvar: "term_14", tip: "Enable termination on channel #14"}}, {type: "Switch", args: {title: "Termination #15", outvar: "term_15", tip: "Enable termination on channel #15"}}, - ]}, - null + ]} + ] + }, + { + "if": [ + {"!": {"and": [{"var": "out_first_bank"}, {"var": "out_second_bank"}, {"var": "out_third_bank"}, {"var": "out_fourth_bank"}]}}, + {type: "Switch", args: {title: "Edge counter", outvar: "edge_counter", tip: "Enable edge counter for inputs"}} ] } ],