dstroy0 / InputHandler

Arduino input handler
https://dstroy0.github.io/InputHandler/
GNU General Public License v3.0
1 stars 0 forks source link

move constants to namespace #57

Closed dstroy0 closed 1 year ago

dstroy0 commented 1 year ago

ih_constants:: makes sense as a name to me, unless you have any ideas?

all the lib constants should go in here

2bndy5 commented 1 year ago

It may get a bit "wordy" if the namespace's name is repeated in the namespace's members' names.

namespace InputHandler {

const char* InputHandlerConst = "";

}

which would be referenced as InputHandler::InputHandlerConst.

Otherwise, namespaces are a great habit! In python, each module is a namespace 😉

dstroy0 commented 1 year ago

yes, I would shorten the names significantly, I just need to test that it works correctly. I did some preliminary testing to make sure that the members actually ended up in progmem.

dstroy0 commented 1 year ago

Just doing some regression testing and then I'll add the other members.

dstroy0 commented 1 year ago

Looks like there's a separate preprocessor issue for mbed platforms.

dstroy0 commented 1 year ago

constants are in their own namespace