Bug #1550

Setting analog channels = 0 hangs

Added by Giulio Moro over 9 years ago. Updated over 9 years ago.

Status:RejectedStart date:2016-02-08
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

I believe it hangs the PRU (it never sets the flag).
Tried to make it hang in gdb a few times, it either hangs here
PRU.cpp:
while(pru_buffer_comm[PRU_CURRENT_BUFFER] == lastPRUBuffer && !gShouldStop) {
rt_task_sleep(sleepTime);
}

or here
main.cpp:
while(!gShouldStop) {
usleep(100000);
}

Also, as a matter of fact, it automatically disables DIGITAL in the PRU as well.
I see no reason why someone would not want to activate the analogs except for saving us the uint_16 -> flot -> uint_16 conversion (which could be disabled without telling the PRU, anyhow).

History

#1 Updated by Giulio Moro over 9 years ago

  • Subject changed from Setting analog channels == 0 hangs to Setting analog channels = 0 hangs
  • Status changed from New to Rejected

not a bug: this was happening when
settings.useAnalog = 0; // No matrix usage by default
was used in main.cpp, but not when running with -C 0

So the bug is not that analogChannels == 0. But we need to provide a safe API to edit command line settings from the C++ code, ideally in setup(), as per #1524

Also available in: Atom PDF