-
Notifications
You must be signed in to change notification settings - Fork 77
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
Implemented get_digital_new_release #726
base: develop-pros-4
Are you sure you want to change the base?
Implemented get_digital_new_release #726
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@miles352 I see you mirrored the logic in |
@AndrewLuGit That's a good point, I didn't realize that before. I was going to use both in my project so that issue won't be okay. I don't fully understand how the internal button states are stored but it seems like it wouldn't make sense to create separate button press storages for the two functions, so I'm not sure the best way to do this. |
why not? |
How would that work? I guess you would modify the controller_data struct, do you think something like this would work? typedef struct controller_data {
bool button_pressed_for_pressed[NUM_BUTTONS];
bool button_pressed_for_released[NUM_BUTTONS];
} controller_data_s_t; |
…lease to fix bug.
I went ahead and did it that way, it's probably not the best solution but I think the controller_data struct is only used in those two functions so it's probably okay for now. |
I'm not inherently opposed to this, assuming it works? It's only like, 12 bytes of static memory used if thats what you're worried about. We could consider doing this as a bitfield to save memory I guess but whatever. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Summary:
I added the function Controller::get_digital_new_release
Motivation:
I would like to be able to use this method in my pros project and I think it makes sense because there is already get_digital_new_press.
References (optional):
PR made for issue #725