diff --git a/main/EMC2101.c b/main/EMC2101.c index 65a31804..8648fd29 100644 --- a/main/EMC2101.c +++ b/main/EMC2101.c @@ -57,6 +57,8 @@ float EMC2101_get_external_temp(void) ESP_ERROR_CHECK(i2c_master_register_read(EMC2101_I2CADDR_DEFAULT, EMC2101_EXTERNAL_TEMP_MSB, &temp_msb, 1)); ESP_ERROR_CHECK(i2c_master_register_read(EMC2101_I2CADDR_DEFAULT, EMC2101_EXTERNAL_TEMP_LSB, &temp_lsb, 1)); + + //ESP_LOGI(TAG, "Raw Temp = %02X %02X", temp_msb, temp_lsb); reading = temp_lsb | (temp_msb << 8); reading >>= 5; diff --git a/main/tasks/power_management_task.c b/main/tasks/power_management_task.c index 577f61b0..dfd301a3 100644 --- a/main/tasks/power_management_task.c +++ b/main/tasks/power_management_task.c @@ -212,8 +212,7 @@ void POWER_MANAGEMENT_task(void * pvParameters) break; case DEVICE_GAMMA: - power_management->chip_temp_avg = EMC2101_get_internal_temp() + 5; - // power_management->chip_temp_avg = EMC2101_get_external_temp(); + power_management->chip_temp_avg = EMC2101_get_external_temp(); power_management->vr_temp = (float)TPS546_get_temperature(); // EMC2101 will give bad readings if the ASIC is turned off