mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Execute a script only if there's no script running.
This commit is contained in:
parent
28047269ac
commit
c12473d8b7
@ -134,7 +134,7 @@ void usbdbg_data_out(void *buffer, int length)
|
|||||||
// check if GC is locked before allocating memory for vstr. If GC was locked
|
// check if GC is locked before allocating memory for vstr. If GC was locked
|
||||||
// at least once before the script is fully uploaded xfer_bytes will be less
|
// at least once before the script is fully uploaded xfer_bytes will be less
|
||||||
// than the total length (xfer_length) and the script will Not be executed.
|
// than the total length (xfer_length) and the script will Not be executed.
|
||||||
if (usbdbg_get_irq_enabled() && !gc_is_locked()) {
|
if (!script_running && usbdbg_get_irq_enabled() && !gc_is_locked()) {
|
||||||
vstr_add_strn(&script_buf, buffer, length);
|
vstr_add_strn(&script_buf, buffer, length);
|
||||||
xfer_bytes += length;
|
xfer_bytes += length;
|
||||||
if (xfer_bytes == xfer_length) {
|
if (xfer_bytes == xfer_length) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user