diff options
| author | yum <yum.food.vr@gmail.com> | 2022-12-25 13:01:23 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2022-12-25 14:22:36 -0800 |
| commit | d7a38b79e1fbcd3b64490ae1b04692d0a2bcdd7d (patch) | |
| tree | 8776d40043ee00c0fc54fa0a36f10d02fbdfd75a /Scripts | |
| parent | 4177ff5acb6fb583339f90374f31892144f3354b (diff) | |
Bugfix: don't use last region if it's partial
Because we allow users to customize the # of sync params, the board is
no longer divided into regions of uniform size. When the last region is
a different size than the rest, we simply omit it from paging.
This is a hack but it's easy to reason about.
Of course the entire paging stack should be rewritten, but not today.
Diffstat (limited to 'Scripts')
| -rw-r--r-- | Scripts/osc_ctrl.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Scripts/osc_ctrl.py b/Scripts/osc_ctrl.py index 21c6348..d4c8bf3 100644 --- a/Scripts/osc_ctrl.py +++ b/Scripts/osc_ctrl.py @@ -12,10 +12,8 @@ from pythonosc import udp_client from math import ceil from math import floor -from generate_utils import getLayerParam from generate_utils import getSelectParam from generate_utils import getEnableParam -from generate_utils import getBoardIndex from generate_utils import config import emotes @@ -107,7 +105,7 @@ def sendMessageCellDiscrete(client, msg_cell, which_cell): client.send_message(addr, True) # Really long messages just wrap back around. - which_cell = (which_cell % generate_utils.config.numRegions(0)) + which_cell = (which_cell % generate_utils.config.numRegions(config.CHARS_PER_SYNC - 1)) enable(client) |
