-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
livolo.patch
38 lines (31 loc) · 2.95 KB
/
livolo.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- /Users/eigenein/Downloads/OneWireHub_config.h.txt 2019-12-25 13:21:32.000000000 +0100
+++ .pio/libdeps/nanoatmega328/OneWireHub_ID526/src/OneWireHub_config.h 2019-12-25 13:16:16.000000000 +0100
@@ -24,9 +24,9 @@
// was --> shagrat-legacy
// Reset: every low-state of the master between MIN & MAX microseconds will be recognized as a Reset
-constexpr timeOW_t ONEWIRE_TIME_RESET_TIMEOUT = { 5000_us }; // for not hanging to long in reset-detection, lower value is better for more responsive applications, but can miss resets
+constexpr timeOW_t ONEWIRE_TIME_RESET_TIMEOUT = { 500000_us }; // for not hanging to long in reset-detection, lower value is better for more responsive applications, but can miss resets
constexpr timeOW_t ONEWIRE_TIME_RESET_MIN[2] = { 430_us, 48_us }; // should be 480
-constexpr timeOW_t ONEWIRE_TIME_RESET_MAX[2] = { 960_us, 80_us }; // from ds2413
+constexpr timeOW_t ONEWIRE_TIME_RESET_MAX[2] = { 50000_us, 80_us }; // from ds2413
// Presence: slave waits TIMEOUT and emits a low state after the reset with ~MIN length, if the bus stays low after that and exceeds MAX the hub will issue an error
constexpr timeOW_t ONEWIRE_TIME_PRESENCE_TIMEOUT = { 20_us }; // probe measures 25us, duration of high state between reset and presence
@@ -34,11 +34,11 @@
constexpr timeOW_t ONEWIRE_TIME_PRESENCE_MAX[2] = { 480_us, 32_us }; // should be 280, was 480
-constexpr timeOW_t ONEWIRE_TIME_MSG_HIGH_TIMEOUT = { 15000_us }; // there can be these inactive / high timeperiods after reset / presence, this value defines the timeout for these
+constexpr timeOW_t ONEWIRE_TIME_MSG_HIGH_TIMEOUT = { 30000_us }; // there can be these inactive / high timeperiods after reset / presence, this value defines the timeout for these
constexpr timeOW_t ONEWIRE_TIME_SLOT_MAX[2] = { 135_us, 30_us }; // should be 120, measured from falling edge to next falling edge
// read and write from the viewpoint of the slave!!!!
-constexpr timeOW_t ONEWIRE_TIME_READ_MIN[2] = { 20_us, 4_us }; // should be 15, was 30, says when it is safe to read a valid bit
+constexpr timeOW_t ONEWIRE_TIME_READ_MIN[2] = { 35_us, 4_us }; // should be 15, was 30, says when it is safe to read a valid bit
constexpr timeOW_t ONEWIRE_TIME_READ_MAX[2] = { 60_us, 10_us }; // low states (zeros) of a master should not exceed this time in a slot
constexpr timeOW_t ONEWIRE_TIME_WRITE_ZERO[2] = { 30_us, 8_us }; // the hub holds a zero for this long
--- .pio/libdeps/nanoatmega328/OneWireHub_ID526/src/DS18B20.cpp 2017-08-20 18:39:51.000000000 +0200
+++ /Users/eigenein/Downloads/DS18B20.cpp 2019-12-25 13:43:31.000000000 +0100
@@ -36,7 +36,7 @@
break;
case 0xBE: // READ SCRATCHPAD
- hub->send(scratchpad, 9);
+ hub->send(scratchpad, 2);
break;
case 0x48: // COPY SCRATCHPAD to EEPROM