RFC Addons: How to activate them?

  • rbe2012
  • rbe2012's Avatar Topic Author
  • Offline
  • So much to do, so little time...
More
02 Feb 2013 16:03 #5912 by rbe2012
RFC Addons: How to activate them? was created by rbe2012
With the addons I coded I did not have trouble as long as I used conditional compiling with a "#define ADDON_TOGGLEICONS" and some "#ifdef...#else...#endif" in the code.
Now I took them out and have a few issues with the other resolution (yet fixed, but maybe unnecessary) an smaller devices (new code takes too much rom to be built for Devo7e).

Please tell me if my first idea of adding new functionalities with a switch in the target_defs.h will be the best way to make them be used only by specific tx models.
Or is there another way to distinguish?

Please Log in or Create an account to join the conversation.

More
03 Feb 2013 00:34 #5933 by PhracturedBlue
Replied by PhracturedBlue on topic RFC Addons: How to activate them?
This is not a good example of a case that needs such a condition since your code easily fits on a devo7e if you tweak one line in one file.

When you do have one, you can do something like was done for Language support:
#define NO_LANGUAGE_SUPPORT 1
or
#define HAS_TOUCH 0

Depending on whether it is inclusive or exclusive.

Please Log in or Create an account to join the conversation.

  • rbe2012
  • rbe2012's Avatar Topic Author
  • Offline
  • So much to do, so little time...
More
03 Feb 2013 19:25 #5972 by rbe2012
Replied by rbe2012 on topic RFC Addons: How to activate them?
My first idea was to use target_defs.h because there are some general definitions which belong to the target hardware.
PhracturedBlue, you are right: I switched to capabilities.h and it is much more elegant. I have defined new capabilities which depend on the hardware and do not have to diversify in the gui code any longer.
snprintf is gone, it fits anywhere now.

Please Log in or Create an account to join the conversation.

Time to create page: 0.026 seconds
Powered by Kunena Forum