tm3d
/
owTools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Config Change.... 0xCC for temp measurement DS2438/DS18B20
[owTools.git]
/
src
/
owDevice.cpp
diff --git
a/src/owDevice.cpp
b/src/owDevice.cpp
index
e710102
..
60a8e99
100755
(executable)
--- a/
src/owDevice.cpp
+++ b/
src/owDevice.cpp
@@
-231,8
+231,8
@@
int owDeviceDS18B20::readScratchpad(std::vector<uint8_t> *sp) {
int owDeviceDS18B20::convertAll() {
std::vector<uint8_t> sp;
int owDeviceDS18B20::convertAll() {
std::vector<uint8_t> sp;
- sp.push_back(0x44);
- Communicate(&sp, 1, 0);
+
//
sp.push_back(0x44);
+ //communicate(&sp, 1, 0); ///########################################################
usleep(750000);
if (readScratchpad(&sp)) {
usleep(750000);
if (readScratchpad(&sp)) {
@@
-375,8
+375,8
@@
inline int16_t ow_fconvert(uint8_t b1, uint16_t b2) {
int owDeviceDS2438::convertAll() {
for(int k=0;k<owi->maxrepeat;k++) {
std::vector<uint8_t> sp;
int owDeviceDS2438::convertAll() {
for(int k=0;k<owi->maxrepeat;k++) {
std::vector<uint8_t> sp;
- sp.push_back(0x44);
- Communicate(&sp, 1, 0);
+
//
sp.push_back(0x44);
+ //Communicate(&sp, 1, 0);///########################################################
if (owi->log->last()>=OWLOG_ERROR) continue;
usleep(100000);
if (setConfigByte(0x08)<=0) continue;
if (owi->log->last()>=OWLOG_ERROR) continue;
usleep(100000);
if (setConfigByte(0x08)<=0) continue;
@@
-457,6
+457,8
@@
void owDeviceDS2450::readMemory(uint8_t addr,std::vector<uint8_t> *sp) {
return;
}
if (!owi->testCRC16(cl)) {
return;
}
if (!owi->testCRC16(cl)) {
+ for (uint8_t v :cl) printf("%02X ",v);
+ printf("\n");
owi->log->set(OWLOG_ERROR,"CRC ERROR Reading Memory of DS2450");
return;
}
owi->log->set(OWLOG_ERROR,"CRC ERROR Reading Memory of DS2450");
return;
}
@@
-503,6
+505,8
@@
void owDeviceDS2450::convert(uint8_t mask, uint8_t preset) {
cl.push_back(preset);
Communicate(&cl, 3, 2);
if (!owi->testCRC16(cl)) {
cl.push_back(preset);
Communicate(&cl, 3, 2);
if (!owi->testCRC16(cl)) {
+ for (uint8_t v :cl) printf("%02X ",v);
+ printf("\n");
owi->log->set(OWLOG_ERROR,"CRC ERROR Convert Command of DS2450");
return;
}
owi->log->set(OWLOG_ERROR,"CRC ERROR Convert Command of DS2450");
return;
}