Merge branch 'master' of ghostdub.de:cupwarmer

Conflicts:
	firmware/cup.c
master
Dennis Gnad 13 years ago
commit 17c241b992

12
PLAN

@ -1,12 +1,16 @@
Dinge die zu tun sind:
- platte und heizelemente befestigen
- brett wachsen
FAST FERTIG
- impulsgeber befestigen
DONE
- Schaltung entwerfen
- Schaltung löten
- blech sägen
- brett sägen
- brett aushölen
- brett fasen
- innenleben planen
- impulsgeber befestigen
- platte und heizelemente befestigen u. bohren
- brett wachsen

@ -10,7 +10,7 @@
#define FET0_PIN 0
#define FET1_PIN 1
#define TIMEOUT 255
#define TIMEOUT 51 /* 2 seconds */
const uint16_t LED_GREEN_TEMP = 300;
const uint16_t LED_RED_TEMP = 1200;
@ -171,8 +171,9 @@ void adc_init(void)
void heat_init(void)
{
TCCR1B = (1 << CS12) | (1 << CS10);/* prescaler / 1024 */
TCCR1B = (1 << WGM12) | (1 << CS10);/* some mode allowing to set timer TOP, no prescaler */
TIMSK1 = (1 << TOIE1);/* interupt on overflow */
OCR1A = 39063;
/* insert loading of heat setting here */
}
@ -204,7 +205,18 @@ int main(void)
temperature = linearize_temp(adc_sum);
adc_sum = 0;
adc_pos = 0;
heat_output = control_output();
if(dev_state)
{
heat_output = control_output();
heat_on[0] = 0;
heat_on[1] = 128;
heat_off[0] = heat_output;
heat_off[1] = heat_output + 128;
}
else
{
heat_on[0] = heat_on[1] = heat_off[0] = heat_off[1] = 0;
}
}
}

Loading…
Cancel
Save