Do not send if USB is not active

Removed_REF_marker
erikkaashoek 5 years ago
parent 87318d9c1d
commit 3a671a71f2

@ -895,6 +895,7 @@ VNA_SHELL_FUNCTION(cmd_capture)
void send_region(const char *t, int x, int y, int w, int h)
{
if (SDU1.config->usbp->state == USB_ACTIVE) {
shell_printf(t);
struct {
char new_str[2];
@ -905,12 +906,17 @@ void send_region(const char *t, int x, int y, int w, int h)
} region={"\r\n", x,y,w,h};
streamWrite(shell_stream, (void*)&region, sizeof(region));
}
else
auto_capture = false;
}
void send_buffer(uint8_t * buf, int s)
{
if (SDU1.config->usbp->state == USB_ACTIVE) {
streamWrite(shell_stream, (void*) buf, s);
streamWrite(shell_stream, (void*)"ch> \r\n", 6);
}
}
#if 0
VNA_SHELL_FUNCTION(cmd_gamma)

Loading…
Cancel
Save

Powered by TurnKey Linux.