You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you @user2684 for creating and maintaining this project, it is AWESOME
Nodemanager v1.8
MySensors v2.3.2
Arduino Pro Mini 3.3V
I've noticed that you have to #define MY_SIGNAL_REPORT_ENABLED at the top of the sketch, otherwise SensorSignal always reports zero.
MY_SIGNAL_REPORT_ENABLED is defined at the top of NodeManager/sensors/SensorSignal.h, but that's too late - it has to be defined before thetransportGetSignalReport function (MySensors/core/MyTransport.cpp:1092) is compiled, otherwise that function is compiled to always return zero.
Looking for your thoughts on solution before I submit a PR:
Put a comment in the template sketch:
//#include <sensors/SensorSignal.h>
//SensorSignal signal;
// NB uncomment #define MY_SIGNAL_REPORT_ENABLED above for this to work
Instead of defining MY_SIGNAL_REPORT_ENABLED in SensorSignal.h, throw a compiler error if it has not already been defined:
#ifndef MY_SIGNAL_REPORT_ENABLED
#error "MY_SIGNAL_REPORT_ENABLED must be defined in the sketch, before #include <MySensors_NodeManager.h>"
#endif
Any other more elegant ideas?
Thanks in advance
The text was updated successfully, but these errors were encountered:
Thanks for reporting it, never noticed this thing. Wonder why all my sensors are correctly reporting the signal without any change. Do you get a 0 signal reported instead? If confirmed, I'd go for option 2, seems to me the most clean approach. Thanks!
Hi, I was finally able to reproduce the issue, seems related to the latest version of MySensors library this is why was not showing up straight away. Fixed through #517 . Thanks!
Hi,
Thank you @user2684 for creating and maintaining this project, it is AWESOME
Nodemanager v1.8
MySensors v2.3.2
Arduino Pro Mini 3.3V
I've noticed that you have to
#define MY_SIGNAL_REPORT_ENABLED
at the top of the sketch, otherwiseSensorSignal
always reports zero.MY_SIGNAL_REPORT_ENABLED
is defined at the top ofNodeManager/sensors/SensorSignal.h
, but that's too late - it has to be defined before thetransportGetSignalReport
function (MySensors/core/MyTransport.cpp:1092
) is compiled, otherwise that function is compiled to always return zero.Looking for your thoughts on solution before I submit a PR:
MY_SIGNAL_REPORT_ENABLED
inSensorSignal.h
, throw a compiler error if it has not already been defined:Thanks in advance
The text was updated successfully, but these errors were encountered: