| 606 | } |
| 607 | |
| 608 | void SettingsScreen::editReceivePin(void) |
| 609 | { |
| 610 | // 0 is the "no fixed PIN" sentinel rather than a fourth-digit-zero PIN: the |
| 611 | // keypad has no way to express "clear", and 0000 is the one value a user |
| 612 | // gains nothing by pinning. |
| 613 | const int entered = KeyboardManager::get().numpad(i18n::t("settings.network.receive_pin.prompt"), 0, 9999); |
| 614 | if (entered < 0) { |
| 615 | return; // cancelled |
| 616 | } |
| 617 | Configuration::getInstance().setDefaultReceivePin(entered == 0 ? "" : StringUtils::format("%04d", entered)); |
| 618 | savedTimer = SAVED_FLASH_FRAMES; |
| 619 | } |
| 620 | |
| 621 | void SettingsScreen::editServerPort(void) |
| 622 | { |
nothing calls this directly
no test coverage detected