Skip to content

Commit

Permalink
Merge pull request #1205 from discip/HALL-only-on-Pinecil
Browse files Browse the repository at this point in the history
Show Hall effect readout in debug only on enabled devices
  • Loading branch information
Ralim authored Feb 5, 2022
2 parents 4f21792 + 31c424b commit 3a32e88
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions source/Core/Threads/GUIThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -782,19 +782,17 @@ void showDebugMenu(void) {
// Max deg C limit
OLED::printNumber(TipThermoModel::getTipMaxInC(), 3, FontStyle::SMALL);
break;
#ifdef HALL_SENSOR
case 13:
// Print raw hall effect value if availabe, none if hall effect disabled.
#ifdef HALL_SENSOR
{
int16_t hallEffectStrength = getRawHallEffect();
if (hallEffectStrength < 0)
hallEffectStrength = -hallEffectStrength;
OLED::printNumber(hallEffectStrength, 6, FontStyle::SMALL);
}
#else
OLED::print(translatedString(Tr->OffString), FontStyle::SMALL);
{
int16_t hallEffectStrength = getRawHallEffect();
if (hallEffectStrength < 0)
hallEffectStrength = -hallEffectStrength;
OLED::printNumber(hallEffectStrength, 6, FontStyle::SMALL);
}
break;
#endif
break;
default:
break;
}
Expand All @@ -805,7 +803,11 @@ void showDebugMenu(void) {
return;
else if (b == BUTTON_F_SHORT) {
screen++;
#ifdef HALL_SENSOR
screen = screen % 14;
#else
screen = screen % 13;
#endif
}
GUIDelay();
}
Expand Down

0 comments on commit 3a32e88

Please sign in to comment.