Line 155... |
Line 155... |
155 |
if(!input(S1)) |
155 |
if(!input(S1)) |
156 |
{ |
156 |
{ |
157 |
button_press=true; |
157 |
button_press=true; |
158 |
sound_beep(100,700); |
158 |
sound_beep(100,700); |
159 |
if(voltage_setpoint < (MAX_OUTPUT - raw_step) ) voltage_setpoint += raw_step; |
159 |
if(voltage_setpoint < (MAX_OUTPUT - raw_step) ) voltage_setpoint += raw_step; |
- |
|
160 |
else voltage_setpoint = MAX_OUTPUT; |
160 |
} |
161 |
} |
161 |
} |
162 |
} |
162 |
|
163 |
|
163 |
if(!input(S2)) |
164 |
if(!input(S2)) |
164 |
{ |
165 |
{ |
Line 166... |
Line 167... |
166 |
if(!input(S2)) |
167 |
if(!input(S2)) |
167 |
{ |
168 |
{ |
168 |
button_press=true; |
169 |
button_press=true; |
169 |
sound_beep(100,600); |
170 |
sound_beep(100,600); |
170 |
if(voltage_setpoint > (raw_step + MIN_OUTPUT) ) voltage_setpoint -= raw_step; |
171 |
if(voltage_setpoint > (raw_step + MIN_OUTPUT) ) voltage_setpoint -= raw_step; |
- |
|
172 |
else voltage_setpoint = MIN_OUTPUT; |
171 |
} |
173 |
} |
172 |
} |
174 |
} |
173 |
|
175 |
|
174 |
if(!input(S3)) |
176 |
if(!input(S3)) |
175 |
{ |
177 |
{ |
Line 177... |
Line 179... |
177 |
if(!input(S3)) |
179 |
if(!input(S3)) |
178 |
{ |
180 |
{ |
179 |
button_press=true; |
181 |
button_press=true; |
180 |
sound_beep(100,500); |
182 |
sound_beep(100,500); |
181 |
if(voltage_setpoint < MAX_OUTPUT - fine_step )voltage_setpoint += fine_step ; |
183 |
if(voltage_setpoint < MAX_OUTPUT - fine_step )voltage_setpoint += fine_step ; |
- |
|
184 |
else voltage_setpoint = MAX_OUTPUT; |
182 |
} |
185 |
} |
183 |
} |
186 |
} |
184 |
|
187 |
|
185 |
if(!input(S4)) |
188 |
if(!input(S4)) |
186 |
{ |
189 |
{ |
Line 188... |
Line 191... |
188 |
if(!input(S4)) |
191 |
if(!input(S4)) |
189 |
{ |
192 |
{ |
190 |
button_press=true; |
193 |
button_press=true; |
191 |
sound_beep(100,400); |
194 |
sound_beep(100,400); |
192 |
if(voltage_setpoint > (fine_step + MIN_OUTPUT) ) voltage_setpoint -= fine_step; |
195 |
if(voltage_setpoint > (fine_step + MIN_OUTPUT) ) voltage_setpoint -= fine_step; |
- |
|
196 |
else voltage_setpoint = MIN_OUTPUT; |
193 |
} |
197 |
} |
194 |
} |
198 |
} |
195 |
|
199 |
|
196 |
setpoint =(int16) ((voltage_setpoint - q) / k); |
200 |
setpoint =(int16) ((voltage_setpoint - q) / k); |
197 |
} |
201 |
} |