pkourany / PulseSensor_Spark

Pulse Sensor library v1.4 ported for Particle Core and Photon
Other
3 stars 18 forks source link

Particle framework now also features a `Signal` class #5

Closed ScruffR closed 4 years ago

ScruffR commented 6 years ago

When building the provided sample these errors occure (tested with 0.8.0-rc.1)

pulsesensoramped_arduino_1dot4.ino: In function 'void serialOutput()':
pulsesensoramped_arduino_1dot4.ino:96:35: error: reference to 'Signal' is ambiguous
pulsesensoramped_arduino_1dot4.ino:44:21: note: candidates are: volatile int Signal
In file included from ../wiring/inc/spark_wiring_cellular_printable.h:26:0,
                 from ../wiring/inc/spark_wiring.h:41,
                 from ./inc/application.h:40,
                 from src/pulsesensoramped_arduino_1dot4.cpp:1:
../wiring/inc/spark_wiring_signal.h:24:7: note:                 class particle::Signal
 class Signal {
       ^
pulsesensoramped_arduino_1dot4.ino:98:25: error: reference to 'Signal' is ambiguous
pulsesensoramped_arduino_1dot4.ino:44:21: note: candidates are: volatile int Signal
In file included from ../wiring/inc/spark_wiring_cellular_printable.h:26:0,
                 from ../wiring/inc/spark_wiring.h:41,
                 from ./inc/application.h:40,
                 from src/pulsesensoramped_arduino_1dot4.cpp:1:
../wiring/inc/spark_wiring_signal.h:24:7: note:                 class particle::Signal
 class Signal {
       ^
pkourany commented 6 years ago

Thanks @ScruffR! I renamed the variable to rawSignal throughout and republished the library with a minor version update. I also removed the SparkIntervalTimer library 1.3.7 dependency from the properties file so the latest version can be attached. I test compiled the example attaching SparkIntervalTimer v1.38 with a 0.8.0-rc.1 target and there were no errors.

ScruffR commented 6 years ago

As said in the thread - I'd rather stick with the dependency and keep the background use of the library transparent/invisible to the user. If they don't read the blurb they'll just come back and ask: "Why do I have to import a library I'm not using???" If the lib runs with an "old" version, just leave it at that. If it's to remove the warings, update the dependency.

pkourany commented 6 years ago

I will be updating this repo later today with the updated code.