From 2a8f8cd74e957730cac881db99098d7e41680b69 Mon Sep 17 00:00:00 2001 From: Nidan Date: Mon, 14 Jan 2013 14:24:40 +0100 Subject: [PATCH] fixing syntax and intendation errors --- firmware/cup.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/firmware/cup.c b/firmware/cup.c index 832c37f..de52544 100644 --- a/firmware/cup.c +++ b/firmware/cup.c @@ -99,13 +99,12 @@ uint16_t linearize_temp(uint16_t temp_in) 65474, 1500, // 150 celsius 65535, 1520, // made-up, not from datasheet }; - uint8_t i=2; + uint8_t i=2; for (; i < (sizeof(coeffs)>>1)-2; i+=2) { - if ( temp_in < coeffs[i] ) + if ( temp_in < coeffs[i] ) { - temp_out = (uint16_t) ( coeffs[i-1] + (uint32_t) - ( (uint32_t) (temp_in-coeffs[i-2]) * (coeffs[i+1]-coeffs[i-1]) ) / (coeffs[i]-coeffs[i-2])); + temp_out = (uint16_t) ( coeffs[i-1] + (uint32_t) ( (uint32_t) (temp_in-coeffs[i-2]) * (coeffs[i+1]-coeffs[i-1]) ) / (coeffs[i]-coeffs[i-2])); break; } } @@ -182,7 +181,7 @@ int main(void) } if(setting_timeout) {led_set(target);} - else {led_set(temperature);}OB + else {led_set(temperature);} } return 0;