Skip to content

Commit ca8eda9

Browse files
authored
Fixed buildResponse for Arduino compiler (#50)
1 parent 2dc3b24 commit ca8eda9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/OpenTherm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ unsigned long OpenTherm::buildRequest(OpenThermMessageType type, OpenThermMessag
249249
unsigned long OpenTherm::buildResponse(OpenThermMessageType type, OpenThermMessageID id, unsigned int data)
250250
{
251251
unsigned long response = data;
252-
response |= type << 28;
252+
response |= ((unsigned long)type) << 28;
253253
response |= ((unsigned long)id) << 16;
254254
if (parity(response)) response |= (1ul << 31);
255255
return response;

0 commit comments

Comments
 (0)