Commit a68ad147 authored by Philippe Kalaf's avatar Philippe Kalaf

Fix to the new lmt101 code

parent 5d56f545
......@@ -33,6 +33,7 @@ LMT01::LMT01(PinName pin) : _interrupt(pin), _worker_thread(osPriorityNormal, 25
// Start worker thread for counting pulses and calculating temp
_worker_thread.start(callback(this, &LMT01::_worker));
_interrupt.fall(callback(this, &LMT01::_increment)); // attach increment function of this counter instance
}
void LMT01::_worker()
......@@ -41,7 +42,6 @@ void LMT01::_worker()
while(true)
{
_interrupt.fall(callback(this, &LMT01::_increment)); // attach increment function of this counter instance
ThisThread::sleep_for(250);
_pulse_count = 0;
_last_pulse_count = 0;
......@@ -78,8 +78,6 @@ void LMT01::_worker()
)
+ _pulse_temp_table[i-1][0] * 1000;
_interrupt.fall(NULL);
ThisThread::sleep_for(250);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment