yadavkapildev4 / xbee-arduino

Automatically exported from code.google.com/p/xbee-arduino
GNU General Public License v3.0
0 stars 0 forks source link

isDigitalEnabled error #38

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. configure xbee s1 for adc and digital sample (a0,a1,d2,d3)
2. parse received data from RX_16_IO_RESPONSE
3. check digital inputs enabled with isDigitalEnabled

What is the expected output? What do you see instead?
shows the digital value instead of if digital output is enabled or not

What version of the product are you using? On what operating system?
xbee-arduino-0.4-softwareserial-beta

Please provide any additional information below.

solved changing this in Xbee.cpp

bool RxIoSampleBaseResponse::isDigitalEnabled(uint8_t pin) {
    if (pin < 8) {
        return ((getFrameData()[getSampleOffset() + 4] >> pin) & 1) == 1;
    } else {
        return (getFrameData()[getSampleOffset() + 3] & 1) == 1;
    }
}

for this:
bool RxIoSampleBaseResponse::isDigitalEnabled(uint8_t pin) {
    if (pin < 8) {
        return ((getFrameData()[getSampleOffset() + 2] >> pin) & 1) == 1;
    } else {
        return (getFrameData()[getSampleOffset() + 1] & 1) == 1;
    }
}

Original issue reported on code.google.com by carlos.r...@gmail.com on 26 Mar 2013 at 7:16

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by andrew.rapp@gmail.com on 2 Feb 2014 at 7:08