Rev 2132 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2132 | Rev 2135 | ||
---|---|---|---|
Line 142... | Line 142... | ||
142 | void delay_ms_with_adc_measurement(uint16_t w, uint8_t stop) { |
142 | void delay_ms_with_adc_measurement(uint16_t w, uint8_t stop) { |
143 | uint16_t t_stop; |
143 | uint16_t t_stop; |
144 | t_stop = setDelay(w); |
144 | t_stop = setDelay(w); |
145 | while (!checkDelay(t_stop)) { |
145 | while (!checkDelay(t_stop)) { |
146 | wdt_reset(); |
146 | wdt_reset(); |
147 | debugOut.analog[30]++; |
- | |
148 | if (sensorDataReady == ALL_DATA_READY) { |
147 | if (sensorDataReady == ALL_DATA_READY) { |
149 | analog_update(); |
148 | analog_update(); |
150 | startAnalogConversionCycle(); |
149 | startAnalogConversionCycle(); |
151 | } |
150 | } |
152 | } |
151 | } |
153 | if (stop) { |
152 | if (stop) { |
154 | // Wait for new samples to get prepared but do not restart AD conversion after that! |
153 | // Wait for new samples to get prepared but do not restart AD conversion after that! |
155 | // Caller MUST to that. |
154 | // Caller MUST to that. |
156 | while (!sensorDataReady != ALL_DATA_READY) wdt_reset(); |
155 | // while (sensorDataReady != ALL_DATA_READY) wdt_reset(); |
157 | } |
156 | } |
158 | } |
157 | } |
Line 159... | Line 158... | ||
159 | 158 | ||
160 | #ifdef DO_PROFILE |
159 | #ifdef DO_PROFILE |