You have to set it every time. In practice this is not an issue for most people as they only have one type of matrix.
Allowing different matrices in the chain would add a level of complexity that has little practical benefit, so this is not supported.
What would be even better would be if the Arduino environment allowed the #define to be in your code and just picked up in the libraries…
The problem is that you can have to use different HW types just because you have the same type of modules wired in a different way.
I had a 4x1 matrix of USE_FC16_HW modules, it worked ok with the input wires to the right.
I have now a 2x2 matrix, the modules looks to be the same but they are wired like this (the / means there is a link between the bottom left module and top right module.
In order for this to work I have the 4x1 matrix as USE_FC16_HW and the 2x2 as USE_ICSTATION_HW.
I don’t know enough about C++ to know if it would be very difficult to accept a parameter when creating the ‘P’ object, but I totally accept your answer that it would not be trivial.
But I think it would not be very difficult if we had to do a
#define USE_HW 1 (or 2 or 3 or 4)
and set the correct values inside MD_MAX72XX.h with #ifdef.
I don’t think it is a good idea to have the user to change the library .h, bad things can easily happen. I can see for the documentation that you are sick and tired of replying “edit MD_MAX72XX.h and set your matrix type” to complains of md_parola is not working. With this, if you had a
#error "You must define your matrix type before including MD_MAX72XX.h, use 1 for ....."
That would stop compilation on the spot and end the “it’s not working with my matrix” complains.