Firngrod/refactor key actions#1512
Conversation
|
Oops, didn't go from master. Will rebase and all that. |
06d59ff to
08f6190
Compare
|
Still builds, now running this version. |
|
Ever since I rebased this onto master, my VSCode has had this thing where any time I switch to a file, I cannot input anything for a few seconds. @kareltucek, have you added anything to the project lately which may explain that? |
|
There were some refactors regarding VSCode stuff, but I think on the c2usb branch only. Brief diffing doesn't turn up any |
|
I feel a bit apprehensive about the additional visual clutter caused by adding another nesting level to things, but memory-wise and abstraction-wise, I can't deny that this is justified. Should we merge it now? |
|
I get the concern. Can you think of a way to do this without that issue? One does kind of miss inheritance once in a while. I can think of hacky ways to do it, by mirroring the member layouts across two structs, one being an expanded version of the other, then casting pointers, but it just gets, well, hacky! |
|
I don't think this can be done better. This is the correct way to abstract it.
I am not sure that is an improvement. Let's use this as is. Should I merge it now? |
|
(I mean, is it ready for merge from your side @firngrod ?) |
|
Well. it works on my 60v1, so I am happy. I will leave it up to you to verify it on an 60v2 and 80. |
Refactored
key_action_tto akey_definition_tand akey_action_tbecause it seemed like a reasonable thing to do before allocating a whole bunch of instances of a class with members which I had no intention of using. Also, what really put me over the edge was my intention to add anisChordedmember to the class I would otherwise have been using to represent chord actions, and that just seemed silly to me.I have made a number of judgement calls on whether to go with the larger or smaller class across the code, feel free to disagree with me on those. Also on naming.
I can build a release package, and I am running
rightv1on my board right now.