utility methods that fetch index numbers

This commit is contained in:
onyx-and-iris 2023-08-23 00:26:40 +01:00
parent 9621232a17
commit 990aea2b42

View File

@ -0,0 +1,13 @@
def get_asio_checkbox_index(channel, num):
if channel == 0:
return 2 * num - 2
return 2 * num - 1
def get_insert_checkbox_index(kind, channel, num):
if num <= kind.phys_in:
if channel == 0:
return 2 * num - 2
else:
return 2 * num - 1
return (2 * kind.phys_in) + (8 * (num - kind.phys_in - 1)) + channel