void choice_prg void if sysm rprog prg SET mkeypad value_key mkeypad v

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
void choice_prg(void)
{
if(sysm.rprog.prg == SET && (mkeypad.value_key > 0 && mkeypad.value_key < 10))
{
sysm.rprog.exec_set_machine = mch_set[mkeypad.value_key - 1];
sysm.rprog.number_prg = mkeypad.value_key - 1;
sysm.mwin->lcdata[1].value = &mch_set[mkeypad.value_key - 1].number_prg;
sysm.mwin->lcdata[2].value = &mch_set[mkeypad.value_key - 1].setmode.qnt_coil_set;
sysm.mwin->lcdata[4].value = &mch_set[mkeypad.value_key - 1].winding[0].quantity_step;
windraw();
return;
}
if(sysm.rprog.prg == ISOLATION && (mkeypad.value_key > 0 && mkeypad.value_key < 10))
{
sysm.rprog.exec_isl_machine = mch_isl[mkeypad.value_key - 1];
sysm.rprog.number_prg = mkeypad.value_key - 1;
sysm.mwin->lcdata[1].value = &mch_isl[mkeypad.value_key - 1].number_prg;
sysm.mwin->lcdata[2].value = &mch_isl[mkeypad.value_key - 1].setmode.qnt_coil_set;
sysm.mwin->lcdata[4].value = &mch_isl[mkeypad.value_key - 1].quantity_step;
windraw();
return;
}
}