SHTC3: Wake up the sensor during setup (#993)

Since we put the sensor to sleep when not measuring, make sure to wake
it up during setup.  It does not respond to any other I2C commands
(including reset) while asleep, so if we've done a soft reboot while
it was sleeping then setup() would fail since it wouldn't respond to
anything.
This commit is contained in:
Derek Hageman authored and GitHub committed 2020-04-24 22:10:41 -03:00
1 parent 6123cb7c69
commit c9e224e999
1 file changed
+1
+1
View File
@@ -25,6 +25,7 @@ inline const char *to_string(SHTCXType type) {
void SHTCXComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up SHTCx...");
this->wake_up();
this->soft_reset();
if (!this->write_command_(SHTCX_COMMAND_READ_ID_REGISTER)) {