Wait for measurement to complete light sensor init

This commit is contained in:
fruchti 2020-07-15 13:47:59 +02:00
parent 29ed80730d
commit 5ffaee918a

View file

@ -55,6 +55,9 @@ void LightSensor_Init(void)
NVIC_EnableIRQ(TIM14_IRQn); NVIC_EnableIRQ(TIM14_IRQn);
LightSensor_Measure(); LightSensor_Measure();
while(!LightSensor_NewMeasurement);
LightSensor_Poll();
} }
void LightSensor_Poll(void) void LightSensor_Poll(void)