fix(t1000e): reclassify P0.04 as sensor power enable GPIO (#9826)

P0.04 is a digital power-enable pin for the NTC/LUX sensors, not an ADC
input. The old code was calling analogRead() on a floating GPIO that
happened to read ~mid-rail, coincidentally producing reasonable
temperature values.

- Rename T1000X_VCC_PIN to T1000X_SENSOR_EN_PIN and drive it HIGH in
initVariant() for both T1000-E and T1000-S variants
- Read BATTERY_PIN (with ADC_MULTIPLIER) instead, clamped to the 3.0V
LDO output (NTC_REF_VCC) for the NTC resistance calculation
This commit is contained in:
Wessel
2026-03-06 05:41:37 -06:00
committed by GitHub
co-authored by GitHub
parent 969aefa551
commit cb28c38828
5 changed files with 19 additions and 9 deletions
@@ -38,6 +38,9 @@ void initVariant()
pinMode(PIN_3V3_ACC_EN, OUTPUT);
digitalWrite(PIN_3V3_ACC_EN, HIGH);
pinMode(T1000X_SENSOR_EN_PIN, OUTPUT);
digitalWrite(T1000X_SENSOR_EN_PIN, HIGH);
pinMode(BUZZER_EN_PIN, OUTPUT);
digitalWrite(BUZZER_EN_PIN, HIGH);