diff --git a/src/main/fc/fc_tasks.c b/src/main/fc/fc_tasks.c index ebbc38d9a1..705882752a 100644 --- a/src/main/fc/fc_tasks.c +++ b/src/main/fc/fc_tasks.c @@ -591,7 +591,7 @@ cfTask_t cfTasks[TASK_COUNT] = { [TASK_RCDEVICE] = { .taskName = "RCDEVICE", .taskFunc = rcdeviceUpdate, - .desiredPeriod = TASK_PERIOD_HZ(20), // 10 Hz, 100ms + .desiredPeriod = TASK_PERIOD_HZ(20), .staticPriority = TASK_PRIORITY_MEDIUM, }, #endif diff --git a/src/main/io/rcdevice_cam.c b/src/main/io/rcdevice_cam.c index dae476c3fa..2c29876807 100644 --- a/src/main/io/rcdevice_cam.c +++ b/src/main/io/rcdevice_cam.c @@ -145,15 +145,12 @@ static void rcdeviceSimulationRespHandle(rcdeviceResponseParseContext_t *ctx) { if (ctx->result != RCDEVICE_RESP_SUCCESS) { rcdeviceSimulationOSDCableFailed(ctx); - return ; + return; } switch (ctx->command) { case RCDEVICE_PROTOCOL_COMMAND_5KEY_SIMULATION_RELEASE: - { - UNUSED(ctx); isButtonPressed = false; - } break; case RCDEVICE_PROTOCOL_COMMAND_5KEY_CONNECTION: { @@ -178,15 +175,11 @@ static void rcdeviceSimulationRespHandle(rcdeviceResponseParseContext_t *ctx) } break; case RCDEVICE_PROTOCOL_COMMAND_5KEY_SIMULATION_PRESS: - { isButtonPressed = true; - } break; } waitingDeviceResponse = false; - - return ; } static void rcdeviceCamSimulate5KeyCablePress(rcdeviceCamSimulationKeyEvent_e key) @@ -223,9 +216,8 @@ void rcdeviceSend5KeyOSDCableSimualtionEvent(rcdeviceCamSimulationKeyEvent_e key case RCDEVICE_CAM_KEY_CONNECTION_OPEN: runcamDeviceOpen5KeyOSDCableConnection(camDevice, rcdeviceSimulationRespHandle); break; - case RCDEVICE_CAM_KEY_CONNECTION_CLOSE: { + case RCDEVICE_CAM_KEY_CONNECTION_CLOSE: runcamDeviceClose5KeyOSDCableConnection(camDevice, rcdeviceSimulationRespHandle); - } break; case RCDEVICE_CAM_KEY_ENTER: case RCDEVICE_CAM_KEY_LEFT: @@ -241,8 +233,6 @@ void rcdeviceSend5KeyOSDCableSimualtionEvent(rcdeviceCamSimulationKeyEvent_e key default: break; } - - return; } static void rcdevice5KeySimulationProcess(timeUs_t currentTimeUs) @@ -323,8 +313,6 @@ void rcdeviceInit(void) uint8_t switchIndex = i - BOXCAMERA1; switchStates[switchIndex].isActivated = true; } - - return; } #endif