I am trying to use the glkGetInt function provided with KPCUSTKEYPAD.LIB with an OP7200. This function displays an onscreen keypad for entering an integer. I have two problems
When compiling I get a warning “line 374 : WARNING SCREEN.LIB : Demotion of value may lose digits.” Line 374 is the line that has the glkGetInt function in the code below.
When running my program, it says the value entered is out of range no matter what I use.
My code is below:
static int done;
static int RetInt;
const static int Minimum = 0;
const static int Maximum = 65535;
const static int NbrDigits = 5;
RetInt = NetworkParameters.port;
done = FALSE;
while (!done)
{
costate
{
keyProcess(); // scan for key presses
waitfor(DelayMs(20)); // key debounce period
}
costate
{
waitfor (glkGetInt(&RetInt, Minimum, Maximum, NbrDigits, &Glk14x16, &Glk10x12, "ENTER NEW PORT NUMBER
"));
NetworkParameters.port = RetInt;
UpdateConfigValues();
done = TRUE;
}
}
I am new to programming with the rabbit, so I suspect I am doing something wrong but I have used the glkGetString functions and had no problems.
Any help would be much appreciated.
Thanks