Skip to content

Commit

Permalink
fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
amatilda committed Oct 10, 2024
1 parent ac6f208 commit 46282d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/arduino-code-gen/src/lib/devices/dht.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ export class DHT extends BaseDevice {

public override loop_post(channel: number): string {
return ` // DHT sensor (@pin${this.config.id}) read procedure
if (zunoChangeBy(pin${this.config.id}DHTTemperatureState, 2)) {
if (zunoChangedBy(pin${this.config.id}DHTTemperatureState, 2)) {
// the temperature has changed by at least 0.2*C
zunoChangeUpdate(pin${this.config.id}DHTTemperatureState);
zunoSendReport(${channel});
}
if (zunoChangeBy(pin${this.config.id}DHTHumidityState, 10)) {
if (zunoChangedBy(pin${this.config.id}DHTHumidityState, 10)) {
// the humidity has changed by at least 1%
zunoChangeUpdate(pin${this.config.id}DHTHumidityState);
zunoSendReport(${channel + 1});
Expand Down

0 comments on commit 46282d4

Please sign in to comment.