diff options
| author | yum <yum.food.vr@gmail.com> | 2022-11-01 19:26:53 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2022-11-01 19:26:53 -0700 |
| commit | eb3fecd09f18233ba9e145a9092a7eb38ff965b8 (patch) | |
| tree | 51d4bfb158e5fef63febc9d52ef9926de9366c37 /osc_ctrl.py | |
| parent | d0120a858c2fd76bf5b5271ba5275e50565f109d (diff) | |
Combine 4 boolean select parameters into one
Should further improve reliability, especially in laggy environments.
We'll see!
Diffstat (limited to 'osc_ctrl.py')
| -rw-r--r-- | osc_ctrl.py | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/osc_ctrl.py b/osc_ctrl.py index 4f888c3..8dfe124 100644 --- a/osc_ctrl.py +++ b/osc_ctrl.py @@ -101,23 +101,9 @@ def sendMessageCellDiscrete(client, msg_cell, which_cell): # Really long messages just wrap back around. which_cell = (which_cell % (2 ** generate_utils.INDEX_BITS)) - s0 = ((floor(which_cell / 8) % 2) == 1) - s1 = ((floor(which_cell / 4) % 2) == 1) - s2 = ((floor(which_cell / 2) % 2) == 1) - s3 = ((floor(which_cell / 1) % 2) == 1) - # Seek to the current cell. - addr="/avatar/parameters/" + getSelectParam(0) - client.send_message(addr, s0) - - addr="/avatar/parameters/" + getSelectParam(1) - client.send_message(addr, s1) - - addr="/avatar/parameters/" + getSelectParam(2) - client.send_message(addr, s2) - - addr="/avatar/parameters/" + getSelectParam(3) - client.send_message(addr, s3) + addr="/avatar/parameters/" + getSelectParam() + client.send_message(addr, which_cell) # Update each letter for i in range(0, len(msg_cell)): |
