1
0
forked from me/IronOS

removing HALL from unsupported devices _2

This commit is contained in:
discip
2022-02-04 23:43:13 +01:00
committed by GitHub
parent c74bc36178
commit eba52bfd5b

View File

@@ -782,19 +782,17 @@ void showDebugMenu(void) {
// Max deg C limit // Max deg C limit
OLED::printNumber(TipThermoModel::getTipMaxInC(), 3, FontStyle::SMALL); OLED::printNumber(TipThermoModel::getTipMaxInC(), 3, FontStyle::SMALL);
break; break;
#ifdef HALL_SENSOR
case 13: case 13:
// Print raw hall effect value if availabe, none if hall effect disabled. // Print raw hall effect value if availabe, none if hall effect disabled.
#ifdef HALL_SENSOR {
{ int16_t hallEffectStrength = getRawHallEffect();
int16_t hallEffectStrength = getRawHallEffect(); if (hallEffectStrength < 0)
if (hallEffectStrength < 0) hallEffectStrength = -hallEffectStrength;
hallEffectStrength = -hallEffectStrength; OLED::printNumber(hallEffectStrength, 6, FontStyle::SMALL);
OLED::printNumber(hallEffectStrength, 6, FontStyle::SMALL); }
} break;
#else
OLED::print(translatedString(Tr->OffString), FontStyle::SMALL);
#endif #endif
break;
default: default:
break; break;
} }
@@ -805,7 +803,11 @@ void showDebugMenu(void) {
return; return;
else if (b == BUTTON_F_SHORT) { else if (b == BUTTON_F_SHORT) {
screen++; screen++;
#ifdef HALL_SENSOR
screen = screen % 14; screen = screen % 14;
#else
screen = screen % 13;
#endif
} }
GUIDelay(); GUIDelay();
} }