Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -385,7 +385,7 @@ void SDI12::wakeSensors(int8_t extraWakeTime) {
385
385
digitalWrite (_dataPin, HIGH); // break is HIGH
386
386
delayMicroseconds (
387
387
SDI12_LINE_BREAK_MICROS); // Required break of 12 milliseconds (12,000 µs)
388
- delay (extraWakeTime); // allow the sensors to wake
388
+ delayMicroseconds (extraWakeTime * 1000 ); // allow the sensors to wake
389
389
digitalWrite (_dataPin, LOW); // marking is LOW
390
390
delayMicroseconds (
391
391
SDI12_LINE_MARK_MICROS); // Required marking of 8.33 milliseconds(8,333 µs)
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ typedef const __FlashStringHelper* FlashString;
156
156
* digits + the decimal point))
157
157
* - The polarity symbol (+ or -) acts as a delimeter between the numeric values
158
158
*/
159
- #define SDI12_VALUE_STR_SIZE
159
+ #define SDI12_VALUE_STR_SIZE 9
160
160
/* *
161
161
* @brief The maximum length of a standard data command response
162
162
*
Original file line number Diff line number Diff line change @@ -26,7 +26,9 @@ uint16_t SDI12Timer::mul8x8to16(uint8_t x, uint8_t y) {
26
26
#if TIMER_INT_SIZE == 8
27
27
uint16_t SDI12Timer::bitTimes (sdi12timer_t dt) {
28
28
// multiply the time delta in ticks by the bits per tick
29
- return mul8x8to16 (dt + RX_WINDOW_FUDGE, BITS_PER_TICK_Q10) >> 10 ;
29
+ return mul8x8to16 (dt + static_cast <uint8_t >(RX_WINDOW_FUDGE),
30
+ static_cast <uint8_t >(BITS_PER_TICK_Q10)) >>
31
+ 10 ;
30
32
}
31
33
32
34
// But nothing fancy for bigger timers
0 commit comments