thotro / arduino-dw1000

A library that offers functionality to use Decawave's DW1000 chips/modules with Arduino.
Apache License 2.0
516 stars 288 forks source link

Compile issue on UNO #105

Closed az-z closed 8 years ago

az-z commented 8 years ago

Gents, i'm trying to compile s simple example "examples/BasicConnectivityTest" and getting all strange errors.

first the structure on my drive is : /home/az/work/Arduino/Sketches/Examples/DW1000/BasicConnectivityTest/ |-src |-main.cpp -- renamed BasicConnectivtytest.ino |-lib | - DW1000 - git clone of arduino-dw1000 |- dw1000_api_rev2p01 - the unzipped from decawave

I compile in Atom with PlatformIO : build looks like this : ^ .pioenvs/uno/DW1000/DW1000Time.h:78:36: error: 'constexpr' needed for in-class initialization of static data member 'const float DW1000Time::MILLISECONDS' of non-integral type [-fpermissive] static const float MILLISECONDS = 1e3; ^ .pioenvs/uno/DW1000/DW1000Time.h:79:36: error: 'constexpr' needed for in-class initialization of static data member 'const float DW1000Time::MICROSECONDS' of non-integral type [-fpermissive]

static const float MICROSECONDS = 1; ^ .pioenvs/uno/DW1000/DW1000Time.h:80:35: error: 'constexpr' needed for in-class initialization of static data member 'const float DW1000Time::NANOSECONDS' of non-integral type [-fpermissive] static const float NANOSECONDS = 1e-3; ^ scons: *\ [.pioenvs/uno/src/main.o] Error 1 ========================= [ ERROR ] Took 0.96 seconds =========================

I'm certain i'm doing some basic mistake, but for life of me can't figure out what it is. I'm getting the same mistake if i use Arduino IDE and install the driver using their lib manager.

The only issue i found with the same type of error is the already closed https://github.com/thotro/arduino-dw1000/issues/31 Thank you

az-z commented 8 years ago

I think my issue has nothing to do with the library but more with the Atom. closing as non issue.