Add macro to enable tip types for supported hardware only
This commit is contained in:
@@ -379,6 +379,8 @@ uint8_t preStartChecksDone() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef TIP_TYPE_SUPPORT
|
||||
// new version for models supporting tips of different length/resistance
|
||||
uint8_t getTipResistanceX10() {
|
||||
#ifdef TIP_RESISTANCE_SENSE_Pin
|
||||
// Return tip resistance in x10 ohms
|
||||
@@ -388,7 +390,6 @@ uint8_t getTipResistanceX10() {
|
||||
return lastTipResistance; // Auto mode
|
||||
}
|
||||
return user_selected_tip;
|
||||
|
||||
#else
|
||||
uint8_t user_selected_tip = getUserSelectedTipResistance();
|
||||
if (user_selected_tip == 0) {
|
||||
@@ -397,6 +398,18 @@ uint8_t getTipResistanceX10() {
|
||||
return user_selected_tip;
|
||||
#endif
|
||||
}
|
||||
#else /* no tip type support: legacy version */
|
||||
uint8_t getTipResistanceX10() {
|
||||
#ifdef TIP_RESISTANCE_SENSE_Pin
|
||||
// Return tip resistance in x10 ohms
|
||||
// We can measure this using the op-amp
|
||||
return lastTipResistance;
|
||||
#else
|
||||
return TIP_RESISTANCE;
|
||||
#endif
|
||||
}
|
||||
#endif /* TIP_TYPE_SUPPORT */
|
||||
|
||||
#ifdef TIP_RESISTANCE_SENSE_Pin
|
||||
bool isTipShorted() { return tipShorted; }
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user