Ahoj
Tak dopadlo to super
posielam tu hlavnu cast zdrojaku:
[code]
{
long int pocet_miest=3;
int i,j;
unsigned char text[41];
unsigned char cyklus=1;
unsigned char changes=0;
for (i=0;i<41;i++)
{
if (str* == 0x00) break;
text*=‘0’;
}
text*=‘\0’;
LCDGotoXY(X,Y);
LCDWriteString(str);
if(X+i>20)Y++;
X=X+i;i=0;
LCDGotoXY(X,Y);
LCDWriteString(&text[0]);
LCDTextAttr(LCD_C_BLINK_ON);
LCDGotoXY(X+i,1);
while(cyklus!=0)
{
key_scan(); //premennu key nastavuje tato metoda
if(key!=0x00)
{
if(key==arrow_down)
{
if(text*<57)
text*++;
else
text*='0';
changes=1;
}
if(key==arrow_up)
{
if(text*>48)
text*--;
else
text*='9';
changes=1;
}
if(key==arrow_left && i>0)
i--;
if(key==arrow_right && (X+i<20) && i<pocet_miest-1)
i++;
LCDGotoXY(X+i,1);
if(changes==1)
{
LCDGotoXY(X,1);
LCDWriteString(&text[0]);
LCDGotoXY(X+i,1);
changes=0;
}
}
}
return value;
}[/code]*********
Upravil sem ten zdrojak aby to bylo jako kod