diff --git a/src/dialogs/enternumber.cpp b/src/dialogs/enternumber.cpp index c0c79b3..4f0722a 100644 --- a/src/dialogs/enternumber.cpp +++ b/src/dialogs/enternumber.cpp @@ -3,15 +3,17 @@ static String entertext; static uint8_t maxDigits; // pocet zadavanych cislic +static uint8_t decplaces; // pocet desetinnych mist static uint8_t digits[8]; // hodnota v cislicich (nastavovana polozka) static uint8_t digitIdx; // index menene cifry static bool done; // priznak, ze bylo zadani dokoncene -void dialog_prepareEnterNumber(String message, int oldNumber, uint8_t numbers) +void dialog_prepareEnterNumber(String message, int oldNumber, uint8_t numbers, uint8_t decimals) { entertext = message; maxDigits = numbers; + decplaces = decimals; // naplnime cislice int i = numbers - 1; while (i >= 0) { diff --git a/src/dialogs/enternumber.h b/src/dialogs/enternumber.h index 8e73aa0..8f2cdbb 100644 --- a/src/dialogs/enternumber.h +++ b/src/dialogs/enternumber.h @@ -4,7 +4,7 @@ void drawEnterNumber(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y); -void dialog_prepareEnterNumber(String message, int oldNumber, uint8_t numbers); +void dialog_prepareEnterNumber(String message, int oldNumber, uint8_t numbers, uint8_t decimals = 0); int32_t dialog_getEnterNumberResult(void);