Skip to content
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

isDigitalEnabled error #38

Open
GoogleCodeExporter opened this issue Apr 6, 2015 · 1 comment
Open

isDigitalEnabled error #38

GoogleCodeExporter opened this issue Apr 6, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 26 Mar 2013 at 7:16

Attachments:

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 2 Feb 2014 at 7:08

  • Changed state: Accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant