main: wait until logger fully stopped before starting again

This commit is contained in:
Thomas Schoebel-Theuer 2020-07-03 23:12:54 +02:00
parent be5e9aa5ae
commit c31efa006a
1 changed files with 10 additions and 0 deletions

View File

@ -4280,6 +4280,16 @@ int _start_trans(struct mars_rotate *rot)
MARS_DBG("stop status=%d\n", status);
goto done;
}
if (!trans_brick->power.led_off ||
rot->trans_brick->inputs[TL_INPUT_LOG1]->connect ||
rot->trans_brick->inputs[TL_INPUT_LOG2]->connect) {
MARS_DBG("stopping not yet finished %d %d %d\n",
trans_brick->power.led_off,
rot->trans_brick->inputs[TL_INPUT_LOG1]->connect != NULL,
rot->trans_brick->inputs[TL_INPUT_LOG2]->connect != NULL);
mars_trigger();
goto done;
}
/* Further safety checks.
*/