X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/cb779e3d7d32d7c43e0a45bb526de0a04135b0c7..ef44b8c036daf4806a369dfdcd5adf72cf85b824:/LUFA/Drivers/Board/Temperature.c diff --git a/LUFA/Drivers/Board/Temperature.c b/LUFA/Drivers/Board/Temperature.c index 67d105491..42b393796 100644 --- a/LUFA/Drivers/Board/Temperature.c +++ b/LUFA/Drivers/Board/Temperature.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2010. + Copyright (C) Dean Camera, 2011. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -30,7 +30,7 @@ #include "Temperature.h" -static const uint16_t PROGMEM Temperature_Lookup[] = { +static const uint16_t PROGMEM Temperature_Lookup[TEMP_TABLE_SIZE] = { 0x3B4, 0x3B0, 0x3AB, 0x3A6, 0x3A0, 0x39A, 0x394, 0x38E, 0x388, 0x381, 0x37A, 0x373, 0x36B, 0x363, 0x35B, 0x353, 0x34A, 0x341, 0x338, 0x32F, 0x325, 0x31B, 0x311, 0x307, 0x2FC, 0x2F1, 0x2E6, 0x2DB, 0x2D0, 0x2C4, 0x2B8, 0x2AC, 0x2A0, 0x294, 0x288, 0x27C, @@ -53,7 +53,7 @@ int8_t Temperature_GetTemperature(void) for (uint16_t Index = 0; Index < TEMP_TABLE_SIZE; Index++) { if (Temp_ADC > pgm_read_word(&Temperature_Lookup[Index])) - return (Index + TEMP_TABLE_OFFSET); + return (Index + TEMP_TABLE_OFFSET_DEGREES); } return TEMP_MAX_TEMP;