Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM.flatten_channels() should return separate commands #248

Open
ehpor opened this issue Oct 1, 2024 · 0 comments
Open

DM.flatten_channels() should return separate commands #248

ehpor opened this issue Oct 1, 2024 · 0 comments
Labels
enhancement New feature or request refactor Refactor existing code.

Comments

@ehpor
Copy link
Collaborator

ehpor commented Oct 1, 2024

Preferably a dictionary.

See

def flatten_channels(self, channel_names):
summed_command = 0
if isinstance(channel_names, str):
channel_names = [channel_names]
# Get commands from channels, zero each channel, and sum commands
for channel_name in channel_names:
summed_command += getattr(self, channel_name).get_latest_frame().data
self.apply_shape(channel_name, np.zeros(2 * self.num_actuators))
# Return summed command (note that this is not a DM shape)
return summed_command
and also in the DM base class #156.

@ehpor ehpor added enhancement New feature or request refactor Refactor existing code. labels Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor Refactor existing code.
Projects
None yet
Development

No branches or pull requests

1 participant