Depend on Arduino.h only if platform is AVR

When the platform is not Arduino, we can't use
random(), but that appears to be the only Arduino
dep in the entire library. Avoiding a dependency
on Arduino allows using the FixedPoint library
on native, which is useful for unit tests.
pull/103/head
James Aguilar 3 months ago
parent 149c81247a
commit 5c2b12acd1
  1. 3
      src/FixedPoints/Details.h

@ -14,7 +14,6 @@
#pragma once
#include <Arduino.h>
#include <limits.h>
#include <stdint.h>
@ -33,6 +32,8 @@
#if !defined(__AVR__)
#define FIXED_POINTS_NO_RANDOM
#else
#include "Arduino.h"
#endif
// Pay no attention to the man behind the curtains

Loading…
Cancel
Save