Added option to skip selftest

Set #define SKIPSELFTEST 1 to skip selftest. Saves a lot of time while
developing / debugging.
This commit is contained in:
Admar Schoonen 2012-01-05 22:05:24 +01:00
parent 6cf277c1fe
commit fc2494631a
1 changed files with 5 additions and 0 deletions

View File

@ -61,6 +61,8 @@ void SWversion(void);
* using an ISR to control the display
*/
// set SKIPSELFTEST to 1 to skip selftest
#define SKIPSELFTEST 1
// set USELIGHTSENSOR to 1 to use ambient light sensor connected to ADC0 (pin
// 23)
@ -194,6 +196,7 @@ void setup()
pinMode(LED4PIN, OUTPUT);
analogReference(DEFAULT);
//analogReference(EXTERNAL);
// known 'bug' in AVR ADC: after switching analog reference, first sample
// could be corrupt and should be ignored --> discard this sample now
analogRead(LIGHTSENSOR_INPUTPIN);
@ -302,7 +305,9 @@ void setup()
msTick=millis(); // Initialise the msTick counter
#if (SKIPSELFTEST != 1)
selftest(); // validate the hardware for the user
#endif
selftestmode=0;