Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some compile errors. #524

Merged
merged 3 commits into from
Jun 28, 2020
Merged

Conversation

arcayi
Copy link

@arcayi arcayi commented Jun 22, 2020

fix some compile errors.

arcayi added 3 commits June 18, 2020 10:19
when NODEMANAGER_INTERRUPTS=OFF
rename timer_mode to timer_mode;
2, fix complie error on stm32,
change isnan to std::isnan.
@arcayi arcayi changed the title Development fix some compile errors. Jun 22, 2020
@user2684
Copy link
Contributor

Thanks for the contribution! Just a question on the renamed nm_timer_mode. Is it because is conflicting with a timer_mode defined by some specific board right?

@arcayi
Copy link
Author

arcayi commented Jun 22, 2020

Yes.
It happened when I setup stm32f103c8t6 bluepill borad using board definition as the link http://dan.drown.org/stm32duino/package_STM32duino_index.json. That board definition may be based on maple platform definition, where timer_mode had been defined.

@user2684 user2684 merged commit d692bc9 into mysensors:development Jun 28, 2020
@user2684
Copy link
Contributor

Thanks, just merged

@pdalak
Copy link

pdalak commented Oct 7, 2020

Hello,

I think this edit of SensorDHT.h is not correct.

You commented out line this line: //_dht->readSensor(true); in onLoop() routine.
Without this command sleeping node will not read values correctly, because millis() doesn't increase during sleeping, so the condition in DHT library (DHT.cpp)

unsigned long startTime = millis();
if ( !force && (unsigned long)(startTime - lastReadTime) < (model == DHT11 ? 999L : 1999L) ) {
    return;
  }
lastReadTime = startTime;

will not be met a lot of times! For example, if node is sleeping 5minutes, and execution of code is 500ms, only every 4th measuremenet will be valid (4x500ms > 2000L for DHT22)

I had to uncomment this line, to make my sensor work correctly.

Peter.

@user2684 user2684 mentioned this pull request Oct 10, 2020
@user2684
Copy link
Contributor

Thanks! Just opened #527 for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants