Line 135... |
Line 135... |
135 |
if(input(OUTPUT_ENABLE)) output_permit=TRUE; |
135 |
if(input(OUTPUT_ENABLE)) output_permit=TRUE; |
136 |
else output_permit=FALSE; |
136 |
else output_permit=FALSE; |
137 |
|
137 |
|
138 |
output_voltage = adc_value * k + q; |
138 |
output_voltage = adc_value * k + q; |
139 |
|
139 |
|
140 |
lcd_gotoxy(1,1); |
140 |
lcd_gotoxy(1,1); // output voltage out of range |
141 |
printf(lcd_putc,"%3.0f",output_voltage); |
141 |
if (output_voltage > 215) printf(lcd_putc,"%3.0f",output_voltage); |
142 |
lcd_gotoxy(1,2); |
142 |
else printf(lcd_putc,"---"); |
- |
|
143 |
|
143 |
|
144 |
|
- |
|
145 |
lcd_gotoxy(1,2); |
144 |
voltage_setpoint = setpoint * k + q; |
146 |
voltage_setpoint = setpoint * k + q; |
145 |
|
147 |
|
146 |
if(input(OUTPUT_ENABLE))printf(lcd_putc,"Set:%3.0f ", voltage_setpoint); |
148 |
if(input(OUTPUT_ENABLE))printf(lcd_putc,"Set:%3.0f ", voltage_setpoint); // setpoint print |
147 |
else printf(lcd_putc,"DISABLED"); |
149 |
else printf(lcd_putc,"DISABLED"); |
148 |
|
150 |
|
149 |
if(button_press==false ) // tlacitka se ctou znovu pouze pokud v redchozim cyklu nebyla zmacknuta. |
151 |
if(button_press==false ) // tlacitka se ctou znovu pouze pokud v redchozim cyklu nebyla zmacknuta. |
150 |
{ |
152 |
{ |
151 |
|
153 |
|