Minor bug in RAPIRO_ver0_0.ino

Hi

I've got my Rapiro up and running and have been very impressed with the quality of the parts and how easy it was to get it going (once I had the correct batteries). I was reading through the supplied sketch to see what could be done and I noticed what I believe is a bug. This bit of code, in getPose():


if(0 <= value || value < MAXSN) {
while(!Serial.available()) {}
if(Serial.read() == 'A') {

should, I believe, use && not II, so it should look like:


if(0 <= value && value < MAXSN) {
while(!Serial.available()) {}
if(Serial.read() == 'A') {

I could be wrong, what do you think?

In a related topic, is the Rapiro code on github or anything like that? If it was it would be easier for people to submit bugs and more importantly bug fixes and new features (in the form of pull requests).

Cheers

Andy

posted by Andrew_Burrows on 2014-02-27 17:31

did you try with your code? any noticable differences? I'm new to arduino to i can't tell you but good point about a github. Even a Wiki should be made IMHO.

posted by djakku on 2014-02-28 10:39

Yes I think
if(0 <= value && value < MAXSN) {
is correct.

posted by ken on 2014-02-28 11:12

Yeah,

if(0 <= value && value < MAXSN) {
is correct. This is my mistake.

Thank you.

posted by shota.ishiwatari on 2014-03-05 22:05

( Allowed tags: <b> <s> <code> <blockquote> <img> . Automatic URL link.)

Uploaded image is placed to the bottom of the post. To add multiple images, make post once then edit the post.

Read Terms of Service upon submitting. 投稿する前に利用規約をお読みください。