Skip to content

Commit

Permalink
Fix config flags in set_stage script
Browse files Browse the repository at this point in the history
  • Loading branch information
fchorney committed Mar 23, 2024
1 parent 1467c37 commit 753a4f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ of functions currently enabled and which ones have yet to be added.

### Functions Left to Port

- Get Config <v5: Get the stage configuration (version 4 and lower)
- Write Config <v5: Write the stage configuration (version 4 and lower)
- Set Lights: Set panel lights (This seems fairly complicated at a quick glance)
- Upload GIF Data: Upload GIF Data to Panels
- Re-Enable Auto Lights: Assume this just turns auto GIFs on the pads back on to default?
Expand Down
4 changes: 2 additions & 2 deletions pysmx/sdk/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def from_unpacked_values(cls, data: list[int]) -> "PackedSensorSettings":

@dataclass
class SMXConfigFlags(object):
# If set, the panels will use the pressed animation when pressed, and step_color is ignored.
# If unset, panels will be lit solid using step_color.
# If True, the panels will use the pressed animation when pressed, and step_color is ignored.
# If False, panels will be lit solid using step_color.
# master_version >= 4. Previous versions always use step_color.
auto_lighting_use_pressed_animations: bool = True

Expand Down
3 changes: 1 addition & 2 deletions set_stage_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ def make_new_config(player: int, old_config: SMXStageConfig) -> SMXStageConfig:
config.platform_strip_color = [int(x * brightness) for x in platform_strip_color]
config.auto_light_panel_mask = auto_light_mask
if step_color:
# Enable flags to use step color
config.flags &= ~(1 << 0)
config.flags.auto_lighting_use_pressed_animations = False
config.step_color = step_color
config.panel_settings = panel_settings

Expand Down

0 comments on commit 753a4f5

Please sign in to comment.