mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Added USB VCP detect and debugging. (#5689)
This commit is contained in:
parent
49139f2d6d
commit
b2c247d34a
6 changed files with 22 additions and 1 deletions
|
@ -36,10 +36,12 @@
|
|||
#include "pg/pg_ids.h"
|
||||
|
||||
#include "drivers/light_led.h"
|
||||
#include "drivers/serial_usb_vcp.h"
|
||||
#include "drivers/sound_beeper.h"
|
||||
#include "drivers/system.h"
|
||||
#include "drivers/time.h"
|
||||
#include "drivers/transponder_ir.h"
|
||||
#include "drivers/usb_io.h"
|
||||
|
||||
#include "sensors/acceleration.h"
|
||||
#include "sensors/barometer.h"
|
||||
|
@ -847,7 +849,9 @@ static void subTaskPidController(timeUs_t currentTimeUs)
|
|||
static void subTaskMainSubprocesses(timeUs_t currentTimeUs)
|
||||
{
|
||||
uint32_t startTime = 0;
|
||||
if (debugMode == DEBUG_PIDLOOP) {startTime = micros();}
|
||||
if (debugMode == DEBUG_PIDLOOP) {
|
||||
startTime = micros();
|
||||
}
|
||||
|
||||
// Read out gyro temperature if used for telemmetry
|
||||
if (feature(FEATURE_TELEMETRY)) {
|
||||
|
@ -904,6 +908,11 @@ static void subTaskMainSubprocesses(timeUs_t currentTimeUs)
|
|||
afatfs_poll();
|
||||
#endif
|
||||
|
||||
#if defined(USE_VCP)
|
||||
DEBUG_SET(DEBUG_USB, 0, usbCableIsInserted());
|
||||
DEBUG_SET(DEBUG_USB, 1, usbVcpIsConnected());
|
||||
#endif
|
||||
|
||||
#ifdef USE_BLACKBOX
|
||||
if (!cliMode && blackboxConfig()->device) {
|
||||
blackboxUpdate(currentTimeUs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue