- Timestamp:
- Jul 4, 2019, 12:39:57 AM (7 years ago)
- Location:
- trunk/Arduino
- Files:
-
- 3 edited
-
libraries/OT_Slave/OT_Slave.cpp (modified) (1 diff)
-
libraries/OT_Slave/OT_Slave.h (modified) (1 diff)
-
projects/OT_boiler/OT_boiler.ino (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Arduino/libraries/OT_Slave/OT_Slave.cpp
r11 r12 5 5 6 6 // OpenthermData OT_Slave::message; 7 8 uint32_t OT_Action::OTD2uint32 (const OpenthermData& data) 9 { 10 uint32_t val(data.type); 11 val = ((val << 8) | data.id); 12 val = ((val << 8) | data.valueHB); 13 val = ((val << 8) | data.valueLB); 14 return val; 15 } 7 16 8 17 OT_Action OT_Slave::action; -
trunk/Arduino/libraries/OT_Slave/OT_Slave.h
r11 r12 9 9 OpenthermData request; 10 10 OpenthermData response; 11 12 uint32_t GetRequestValue () const { return OTD2uint32(request); } 13 uint32_t GetResponseValue () const { return OTD2uint32(response); } 14 15 static uint32_t OTD2uint32 (const OpenthermData&); 11 16 }; 12 17 -
trunk/Arduino/projects/OT_boiler/OT_boiler.ino
r11 r12 110 110 client.print(data.valueLB,HEX); 111 111 */ 112 uint32_t request = *((uint32_t *)&data.request); 113 client.print(request,HEX); 112 client.print(data.GetRequestValue(),HEX); 114 113 client.print("\t"); 115 uint32_t response = *((uint32_t *)&data.response); 116 client.print(response,HEX); 114 client.print(data.GetResponseValue(),HEX); 117 115 client.println(""); 118 116 }
Note: See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/trac/Paradigma/chrome/site/paradigma.png)