Moznost zadavani des. cisel (zatim nezobrazovane)
This commit is contained in:
parent
083b49b5f9
commit
8d848fd28e
@ -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) {
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user