mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Take absolute value of hall sensor for debug menu
This commit is contained in:
@@ -785,11 +785,16 @@ void showDebugMenu(void) {
|
|||||||
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
|
#ifdef HALL_SENSOR
|
||||||
OLED::printNumber(getRawHallEffect(), 6, FontStyle::SMALL);
|
{
|
||||||
|
int16_t hallEffectStrength = getRawHallEffect();
|
||||||
|
if (hallEffectStrength < 0)
|
||||||
|
hallEffectStrength = -hallEffectStrength;
|
||||||
|
OLED::printNumber(hallEffectStrength, 6, FontStyle::SMALL);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
OLED::print(translatedString(Tr->OffString), FontStyle::SMALL);
|
OLED::print(translatedString(Tr->OffString), FontStyle::SMALL);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user