From: Joseph Coffland Date: Sun, 11 Sep 2016 15:24:56 +0000 (-0700) Subject: Set bf->run_state eariler for planning X-Git-Url: https://git.buildbotics.com/?a=commitdiff_plain;h=a8a40d4120a1c466bd62a18e052291f30027f66a;p=bbctrl-firmware Set bf->run_state eariler for planning --- diff --git a/src/plan/buffer.c b/src/plan/buffer.c index a9e30cc..7cd1929 100644 --- a/src/plan/buffer.c +++ b/src/plan/buffer.c @@ -119,6 +119,7 @@ bool mp_queue_is_empty() {return mb.tail == mb.head;} /// Get pointer to next buffer, waiting until one is available. mp_buffer_t *mp_queue_get_tail() { while (!mb.space) continue; // Wait for a buffer + mb.tail->run_state = MOVE_NEW; return mb.tail; } @@ -136,7 +137,6 @@ void mp_queue_push(buffer_cb_t cb, bool plan, uint32_t line) { mb.tail->plan = plan; mb.tail->cb = cb; mb.tail->line = line; - mb.tail->run_state = MOVE_NEW; _push(); }