Moznost zadavani des. cisel (zatim nezobrazovane)

This commit is contained in:
Pavel Brychta 2020-12-20 11:53:35 +01:00
parent 083b49b5f9
commit 8d848fd28e
2 changed files with 4 additions and 2 deletions

View File

@ -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) {

View File

@ -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);