summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e5ef42c)
If the monitoring thread is active, then setting the radio channel can
sometimes cause the monitoring thread to get stuck. I'm not entirely
sure why though. For now, work around the issue by making sure
monitoring is off, and the monitoring thread has stopped, before
changing the radio channel.
Signed-off-by: Keith Packard <keithp@keithp.com>
public void set_channel(int channel) {
if (altos != null) {
public void set_channel(int channel) {
if (altos != null) {
+ if (monitor_mode) {
+ printf("m 0\n");
+ flush_input();
+ }
+ printf("c r %d\n", channel);
- printf("m 0\nc r %d\nm 1\n", channel);
- else
- printf("c r %d\n", channel);
+ printf("m 1\n");
+ flush_input();
if (altos != null) {
if (monitor)
printf("m 1\n");
if (altos != null) {
if (monitor)
printf("m 1\n");