|
@@ -236,25 +236,27 @@ void main(void){
|
|
|
set_charge_curr(curr_set);*/
|
|
|
|
|
|
for(;;){
|
|
|
-/* if((i = getkey())){
|
|
|
- cursor(0,0);
|
|
|
- disp_num(i, 0);
|
|
|
- clearline();
|
|
|
- }*/
|
|
|
dac_update();
|
|
|
adc_process_data();
|
|
|
-
|
|
|
- /*if(adc_process_data()){
|
|
|
- cursor(0,1);
|
|
|
- disp_num(meas[MEAS_VOLT] * 1000, 3);
|
|
|
- putchar('V');
|
|
|
- clearline();
|
|
|
- cursor(0,2);
|
|
|
- disp_num(meas[MEAS_CURR] * 1000, 3);
|
|
|
- // disp_num(adc_results[MEAS_CURR], 0);
|
|
|
- putchar('A');
|
|
|
- clearline();
|
|
|
- }*/
|
|
|
+ gettemp();
|
|
|
+
|
|
|
+ cursor(0, 7);
|
|
|
+ puttext_P(PSTR("Temp: "));
|
|
|
+ if(temp_ok & _BV(0)){
|
|
|
+ disp_temp(temps[0]);
|
|
|
+ if(temps[0] < 350){
|
|
|
+ atomic_set_uint(&OCR1B, 0);
|
|
|
+ } else if(temps[0] < 900){
|
|
|
+ atomic_set_uint(&OCR1B, (unsigned long int)((temps[0] - 300)*(unsigned long int)(0.506*32.0))>>5);
|
|
|
+ } else {
|
|
|
+ atomic_set_uint(&OCR1B, 329);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ atomic_set_uint(&OCR1B, 329);
|
|
|
+ puttext_P(PSTR("B\x80\x7e""d"));
|
|
|
+ }
|
|
|
+ clearline();
|
|
|
+
|
|
|
for(i=0; i<=MENU_MAX; i++){
|
|
|
cursor(0, i);
|
|
|
if(pos == i)
|