-
-
Notifications
You must be signed in to change notification settings - Fork 895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mysensors RFM69 gateway compilation error on 64-bit OS (RFM69_MAX_PACKET_LEN) #1551
Comments
This fix works for me on 64-bit and 32-bit OS - I tested building it and also running gateway and it works fine. But I'm not cpp programmer so better it is reviewed... diff --git a/hal/transport/RFM69/driver/new/RFM69_new.cpp b/hal/transport/RFM69/driver/new/RFM69_new.cpp
index ed1f48b4..5357b6f3 100644
--- a/hal/transport/RFM69/driver/new/RFM69_new.cpp
+++ b/hal/transport/RFM69/driver/new/RFM69_new.cpp
@@ -278,7 +278,8 @@ LOCAL void RFM69_interruptHandling(void)
RFM69.currentPacket.header.packetLen - 1);
if (RFM69.currentPacket.header.version >= RFM69_MIN_PACKET_HEADER_VERSION) {
- RFM69.currentPacket.payloadLen = min(RFM69.currentPacket.header.packetLen - (RFM69_HEADER_LEN - 1),
+ RFM69.currentPacket.payloadLen = min(static_cast<uint>
+ (RFM69.currentPacket.header.packetLen - (RFM69_HEADER_LEN - 1)),
RFM69_MAX_PACKET_LEN);
RFM69.ackReceived = RFM69_getACKReceived(RFM69.currentPacket.header.controlFlags);
RFM69.dataReceived = !RFM69.ackReceived;
|
Hi Frepkovsky, /MySensors# make |
Rollback change done in mysensors#1551 (the issue was fixed in mysensors#1500)
Just for tracking this issue that has already been discussed in the forum long time ago but is not fixed yet.
When trying to build RFM69 mysgw on 64-bit OS the following error occurs:
Workaround for this problem on 64-bit OS is to change RFM69_MAX_PACKET_LEN definition in RFM69_new.h:
and then compilation works fine.
But this fix/workaround cannot be simply committed like above in the sources because doing it this way solves the problem on 64-bit OS but causes failure on 32-bit OS. It has to be done some other way...
The text was updated successfully, but these errors were encountered: