fix: change weight parameter type to int16_t in oledShowWeight function
This commit is contained in:
1 parent
9311162463
commit
4d318bf4ec
3 files changed
+3
-3
No files matched your search
+1
-1
@@ -270,7 +270,7 @@ void oledShowProgressBar(const uint8_t step, const uint8_t numSteps, const char*
|
||||
display.display();
|
||||
}
|
||||
|
||||
void oledShowWeight(uint16_t weight) {
|
||||
void oledShowWeight(int16_t weight) {
|
||||
// Display Gewicht
|
||||
oledcleardata();
|
||||
display.setTextSize(3);
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ int oled_center_v(const String &text);
|
||||
|
||||
void oledShowProgressBar(const uint8_t step, const uint8_t numSteps, const char* largeText, const char* statusMessage);
|
||||
|
||||
void oledShowWeight(uint16_t weight);
|
||||
void oledShowWeight(int16_t weight);
|
||||
void oledShowRemainingWeight(uint16_t remainingWeight);
|
||||
void oledDisplayText(const String &message, uint8_t size = 2);
|
||||
void oledShowConnectionError(const char* error, const String& ip);
|
||||
|
||||
+1
-1
@@ -168,7 +168,7 @@ void loop() {
|
||||
int16_t displayWeight = getFilteredDisplayWeight();
|
||||
if (mainTaskWasPaused || (weight != lastWeight && (nfcReaderState == NFC_IDLE || tagProcessed)))
|
||||
{
|
||||
(displayWeight < 2) ? ((displayWeight < -2) ? oledDisplayText("!! -0") : oledShowWeight(0)) : oledShowWeight(displayWeight);
|
||||
oledShowWeight((abs(displayWeight) < 2) ? 0 : displayWeight);
|
||||
oledSetPriority(DISPLAY_PRIORITY_STATUS, 0); // Weight can always be overwritten
|
||||
}
|
||||
mainTaskWasPaused = false;
|
||||
|
||||
Reference in new issue
Block a user