Skip to content

Commit

Permalink
Conditionally define M_PI.
Browse files Browse the repository at this point in the history
  • Loading branch information
dthain committed Feb 14, 2018
1 parent 9b05bce commit cd9d7c3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions QMC5883L.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
#define QMC5883L_CONFIG_STANDBY 0b00000000
#define QMC5883L_CONFIG_CONT 0b00000001

/* Apparently M_PI isn't available in all environments. */
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327950288
#endif

static void write_register( int addr, int reg, int value )
{
Wire.beginTransmission(addr);
Expand Down

0 comments on commit cd9d7c3

Please sign in to comment.