Skip to content

Support sending beacon messages to EV3 IR sensor #3

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion PowerFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ void PowerFunctions::combo_pwm(uint8_t blue_speed, uint8_t red_speed)
send();
}

void PowerFunctions::send_beacon()
{
_nib1 = ESCAPE | _channel;
_nib2 = 0x0;
_nib3 = 0x0;
send();
}

//
// Private methods
//
Expand Down Expand Up @@ -109,4 +117,4 @@ void PowerFunctions::send()
}
start_stop_bit();
}
}
}
3 changes: 2 additions & 1 deletion PowerFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class PowerFunctions
void red_pwm(uint8_t);
void blue_pwm(uint8_t);
void combo_pwm(uint8_t, uint8_t);
void send_beacon();

private:
void pause(uint8_t);
Expand All @@ -76,4 +77,4 @@ class PowerFunctions
};

#endif
// END OF FILE
// END OF FILE