mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-24 01:16:55 +00:00
fix typos, use arduino gpio defines instead of magic numbers
This commit is contained in:
parent
cb07e05a7a
commit
79c49a94bb
@ -43,8 +43,9 @@ int32_t AirQualityTelemetryModule::runOnce()
|
|||||||
LOG_INFO("Air quality Telemetry: init");
|
LOG_INFO("Air quality Telemetry: init");
|
||||||
|
|
||||||
#ifdef PMSA003I_ENABLE_PIN
|
#ifdef PMSA003I_ENABLE_PIN
|
||||||
|
// put the sensor to sleep on startup
|
||||||
pinMode(PMSA003I_ENABLE_PIN, OUTPUT);
|
pinMode(PMSA003I_ENABLE_PIN, OUTPUT);
|
||||||
digitalWrite(PMSA003I_ENABLE_PIN, 0);
|
digitalWrite(PMSA003I_ENABLE_PIN, LOW);
|
||||||
#endif /* PMSA003I_ENABLE_PIN */
|
#endif /* PMSA003I_ENABLE_PIN */
|
||||||
|
|
||||||
if (!aqi.begin_I2C()) {
|
if (!aqi.begin_I2C()) {
|
||||||
@ -81,7 +82,7 @@ int32_t AirQualityTelemetryModule::runOnce()
|
|||||||
case State::IDLE:
|
case State::IDLE:
|
||||||
// sensor is in standby; fire it up and sleep
|
// sensor is in standby; fire it up and sleep
|
||||||
LOG_DEBUG("runOnce(): state = idle");
|
LOG_DEBUG("runOnce(): state = idle");
|
||||||
digitalWrite(PMSA003I_ENABLE_PIN, 1);
|
digitalWrite(PMSA003I_ENABLE_PIN, HIGH);
|
||||||
state = State::ACTIVE;
|
state = State::ACTIVE;
|
||||||
|
|
||||||
return PMSA003I_WARMUP_MS;
|
return PMSA003I_WARMUP_MS;
|
||||||
@ -104,9 +105,9 @@ int32_t AirQualityTelemetryModule::runOnce()
|
|||||||
sendTelemetry(NODENUM_BROADCAST, true);
|
sendTelemetry(NODENUM_BROADCAST, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PMSA003I_ENABLE_PIN
|
||||||
// put sensor back to sleep
|
// put sensor back to sleep
|
||||||
#if PMSA003I_ENABLE_PIN
|
digitalWrite(PMSA003I_ENABLE_PIN, LOW);
|
||||||
digitalWrite(PMSA003I_ENABLE_PIN, 0);
|
|
||||||
state = State::IDLE;
|
state = State::IDLE;
|
||||||
#endif /* PMSA003I_ENABLE_PIN */
|
#endif /* PMSA003I_ENABLE_PIN */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user