Disable random number functionality for non-AVR boards #73
Labels
Feature Request
This issue is a request for a particular feature
Patch
This change is an unobtrusive change
Milestone
Originally I believed
random()
to originate from Arduino because Arduino defines several overloads ofrandom()
, but I have since learned that the zero-parameter version ofrandom()
originates from avr-libc.Despite learning this a long time ago, I haven't made an attept to rectify FixedPoints' behaviour in regard to this issue until now.
This issue proposes that rather than testing for specific non-AVR processors, a better approach for handling the random number issue (for now) is to define
FIXED_POINTS_NO_RANDOM
if the target processor is not an AVR target, or more specifically if__AVR__
is not defined. Hence:There is a slight chance that this may break the library for boards that provide
random()
but do not identify as AVR, but I expect this to be an exceptionally rare occurance. In comparison the number of boards that this library could compile for but won't because of the fixed point issue is becoming increasingly notable.Rather than end up with a long list of issues requesting that a board be supported, it makes more sense to simply assume a target doesn't support
random()
and provide support for all the other features of the library.The text was updated successfully, but these errors were encountered: