mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Make adc range scalable
This commit is contained in:
@@ -234,11 +234,12 @@ uint8_t getTipResitanceX10() {
|
||||
return lastTipResistance;
|
||||
}
|
||||
void startMeasureTipResistance() {
|
||||
|
||||
if (isTipDisconnected()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (lastTipReadinguV) {
|
||||
return;
|
||||
}
|
||||
// We want to calculate lastTipResistance
|
||||
// If tip is connected, and the tip is cold and the tip is not being heated
|
||||
// We can use the GPIO to inject a small current into the tip and measure this
|
||||
@@ -277,10 +278,5 @@ void FinishMeasureTipResistance() {
|
||||
} else {
|
||||
newRes = 80;
|
||||
}
|
||||
if (lastTipResistance != newRes) {
|
||||
#ifdef POW_PD
|
||||
USBPowerDelivery::triggerRenegotiation();
|
||||
#endif
|
||||
}
|
||||
lastTipResistance = newRes;
|
||||
}
|
||||
Reference in New Issue
Block a user