source: titan/titan/blindscanadjust.h @ 15272

Last change on this file since 15272 was 14953, checked in by nit, 10 years ago

[titan] fix blindscanadjust (ok), don't show akt, channel in channelhist on first pos

File size: 3.0 KB
Line 
1#ifndef BLINDSCANADJUST_H
2#define BLINDSCANADJUST_H
3
4//todo set defaults
5
6void screenblindscanadjust()
7{
8        int rcret = 0, i = 0;
9        struct skin* blindscan = getscreen("blindscanadjust");
10        struct skin* listbox = getscreennode(blindscan, "listbox");
11        struct skin* minfrequency = getscreennode(blindscan, "minfrequency");
12        struct skin* maxfrequency = getscreennode(blindscan, "maxfrequency");
13        struct skin* stepfrequency = getscreennode(blindscan, "stepfrequency");
14        struct skin* minsignalrate = getscreennode(blindscan, "minsignalrate");
15        struct skin* maxsignalrate = getscreennode(blindscan, "maxsignalrate");
16        struct skin* stepsignalrate = getscreennode(blindscan, "stepsignalrate");
17        struct skin* tmp = NULL;
18
19        changemask(minfrequency, "00000");
20        changeinput(minfrequency, getconfig("blindminfrequency", NULL));
21        if(minfrequency->input != NULL)
22        {
23                for(i = 0; i < 5 - strlen(minfrequency->input); i++)
24                        minfrequency->input = ostrcat("0", minfrequency->input, 0, 1);
25        }
26 
27        changemask(maxfrequency, "00000");
28        changeinput(maxfrequency, getconfig("blindmaxfrequency", NULL));
29        if(maxfrequency->input != NULL)
30        {
31                for(i = 0; i < 5 - strlen(maxfrequency->input); i++)
32                        maxfrequency->input = ostrcat("0", maxfrequency->input, 0, 1);
33        }
34 
35        changeinput(stepfrequency, getconfig("blindstepfrequency", NULL));
36        changemask(stepfrequency, "00");
37        if(stepfrequency->input != NULL)
38        {
39                for(i = 0; i < 2 - strlen(stepfrequency->input); i++)
40                        stepfrequency->input = ostrcat("0", stepfrequency->input, 0, 1);
41        }
42 
43        changeinput(minsignalrate, getconfig("blindminsignalrate", NULL));
44        changemask(minsignalrate, "00000");
45        if(minsignalrate->input != NULL)
46        {
47                for(i = 0; i < 5 - strlen(minsignalrate->input); i++)
48                        minsignalrate->input = ostrcat("0", minsignalrate->input, 0, 1);
49        }
50 
51        changeinput(maxsignalrate, getconfig("blindmaxsignalrate", NULL));
52        changemask(maxsignalrate, "00000");
53        if(maxsignalrate->input != NULL)
54        {
55                for(i = 0; i < 5 - strlen(maxsignalrate->input); i++)
56                        maxsignalrate->input = ostrcat("0", maxsignalrate->input, 0, 1);
57        }
58 
59        changeinput(stepsignalrate, getconfig("blindstepsignalrate", NULL));
60        changemask(stepsignalrate, "00");
61        if(stepsignalrate->input != NULL)
62        {
63                for(i = 0; i < 2 - strlen(stepsignalrate->input); i++)
64                        stepsignalrate->input = ostrcat("0", stepsignalrate->input, 0, 1);
65        }
66
67        drawscreen(blindscan, 0);
68        addscreenrc(blindscan, listbox);
69
70        tmp = listbox->select;
71        while(1)
72        {
73                addscreenrc(blindscan, tmp);
74                rcret = waitrc(blindscan, 0, 0);
75                tmp = listbox->select;
76
77                if(rcret == getrcconfigint("rcexit", NULL)) break;
78
79                if(rcret == getrcconfigint("rcok", NULL))
80                {
81                        addconfigscreencheck("blindminfrequency", minfrequency, "9500");
82                        addconfigscreencheck("blindmaxfrequency", maxfrequency, "14500");
83                        addconfigscreencheck("blindstepfrequency", stepfrequency, "20");
84                        addconfigscreencheck("blindminsignalrate", minsignalrate, "20000");
85                        addconfigscreencheck("blindmaxsignalrate", maxsignalrate, "30000");
86                        addconfigscreencheck("blindstepsignalrate", stepsignalrate, "20");
87                       
88                        break;
89                }
90        }
91
92        delownerrc(blindscan);
93        clearscreen(blindscan);
94}
95
96#endif
Note: See TracBrowser for help on using the repository browser.