1
0
forked from me/IronOS

Merge pull request #1196 from ritkit/master

Add raw hall effect output to the debug menu.
This commit is contained in:
Ben V. Brown
2022-02-05 09:08:37 +11:00
committed by GitHub
2 changed files with 15 additions and 1 deletions

View File

@@ -127,6 +127,7 @@ def get_debug_menu() -> List[str]:
"ACC ", "ACC ",
"PWR ", "PWR ",
"Max ", "Max ",
"Hall ",
] ]

View File

@@ -782,6 +782,19 @@ 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;
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);
#endif
break;
default: default:
break; break;
} }
@@ -792,7 +805,7 @@ void showDebugMenu(void) {
return; return;
else if (b == BUTTON_F_SHORT) { else if (b == BUTTON_F_SHORT) {
screen++; screen++;
screen = screen % 13; screen = screen % 14;
} }
GUIDelay(); GUIDelay();
} }