another attempt
This commit is contained in:
No files matched your search
+15
-3
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "app/pocsag.h"
|
||||
#include <string.h>
|
||||
|
||||
#if !defined(ENABLE_OVERLAY)
|
||||
@@ -239,6 +240,7 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax) {
|
||||
#endif
|
||||
case MENU_BCL:
|
||||
case MENU_BEEP:
|
||||
case MENU_PMON:
|
||||
case MENU_S_ADD1:
|
||||
case MENU_S_ADD2:
|
||||
case MENU_S_ADD3:
|
||||
@@ -270,7 +272,8 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax) {
|
||||
break;
|
||||
|
||||
case MENU_FSKSRC:
|
||||
*pMax = INT32_MAX;
|
||||
// POCSAG: own RIC (21 bits, 7 digits); SMS: 32 bit address (8 digit input box)
|
||||
*pMax = MODEM_IS_POCSAG(gEeprom.FSKMode) ? (int32_t) POCSAG_MAX_RIC : 99999999;
|
||||
*pMin = 0;
|
||||
break;
|
||||
|
||||
@@ -566,6 +569,11 @@ void MENU_AcceptSetting(void) {
|
||||
gEeprom.BEEP_CONTROL = gSubMenuSelection;
|
||||
break;
|
||||
|
||||
case MENU_PMON:
|
||||
gEeprom.POCSAG_MONITOR = gSubMenuSelection;
|
||||
gFlagReconfigureVfos = true;
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
case MENU_VOICE:
|
||||
gEeprom.VOICE_PROMPT = gSubMenuSelection;
|
||||
@@ -952,6 +960,10 @@ void MENU_ShowCurrentSetting(void) {
|
||||
case MENU_BEEP:
|
||||
gSubMenuSelection = gEeprom.BEEP_CONTROL;
|
||||
break;
|
||||
|
||||
case MENU_PMON:
|
||||
gSubMenuSelection = gEeprom.POCSAG_MONITOR;
|
||||
break;
|
||||
#ifdef ENABLE_VOICE
|
||||
case MENU_VOICE:
|
||||
gSubMenuSelection = gEeprom.VOICE_PROMPT;
|
||||
@@ -1161,7 +1173,7 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
|
||||
uint8_t Offset;
|
||||
int32_t Min;
|
||||
int32_t Max;
|
||||
uint16_t Value = 0;
|
||||
uint32_t Value = 0; // was uint16_t: truncated FSKSRC above 65535
|
||||
|
||||
if (bKeyHeld || !bKeyPressed)
|
||||
return;
|
||||
@@ -1313,7 +1325,7 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
|
||||
if (Offset == gInputBoxIndex)
|
||||
gInputBoxIndex = 0;
|
||||
|
||||
if (Value <= Max) {
|
||||
if (Value <= (uint32_t) Max) {
|
||||
gSubMenuSelection = Value;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user