mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
fixed the coding-style issues
This commit is contained in:
parent
5b2dd46367
commit
5967b9b597
2 changed files with 3 additions and 15 deletions
|
@ -591,7 +591,7 @@ cfTask_t cfTasks[TASK_COUNT] = {
|
||||||
[TASK_RCDEVICE] = {
|
[TASK_RCDEVICE] = {
|
||||||
.taskName = "RCDEVICE",
|
.taskName = "RCDEVICE",
|
||||||
.taskFunc = rcdeviceUpdate,
|
.taskFunc = rcdeviceUpdate,
|
||||||
.desiredPeriod = TASK_PERIOD_HZ(20), // 10 Hz, 100ms
|
.desiredPeriod = TASK_PERIOD_HZ(20),
|
||||||
.staticPriority = TASK_PRIORITY_MEDIUM,
|
.staticPriority = TASK_PRIORITY_MEDIUM,
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -145,15 +145,12 @@ static void rcdeviceSimulationRespHandle(rcdeviceResponseParseContext_t *ctx)
|
||||||
{
|
{
|
||||||
if (ctx->result != RCDEVICE_RESP_SUCCESS) {
|
if (ctx->result != RCDEVICE_RESP_SUCCESS) {
|
||||||
rcdeviceSimulationOSDCableFailed(ctx);
|
rcdeviceSimulationOSDCableFailed(ctx);
|
||||||
return ;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (ctx->command) {
|
switch (ctx->command) {
|
||||||
case RCDEVICE_PROTOCOL_COMMAND_5KEY_SIMULATION_RELEASE:
|
case RCDEVICE_PROTOCOL_COMMAND_5KEY_SIMULATION_RELEASE:
|
||||||
{
|
|
||||||
UNUSED(ctx);
|
|
||||||
isButtonPressed = false;
|
isButtonPressed = false;
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case RCDEVICE_PROTOCOL_COMMAND_5KEY_CONNECTION:
|
case RCDEVICE_PROTOCOL_COMMAND_5KEY_CONNECTION:
|
||||||
{
|
{
|
||||||
|
@ -178,15 +175,11 @@ static void rcdeviceSimulationRespHandle(rcdeviceResponseParseContext_t *ctx)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RCDEVICE_PROTOCOL_COMMAND_5KEY_SIMULATION_PRESS:
|
case RCDEVICE_PROTOCOL_COMMAND_5KEY_SIMULATION_PRESS:
|
||||||
{
|
|
||||||
isButtonPressed = true;
|
isButtonPressed = true;
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
waitingDeviceResponse = false;
|
waitingDeviceResponse = false;
|
||||||
|
|
||||||
return ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rcdeviceCamSimulate5KeyCablePress(rcdeviceCamSimulationKeyEvent_e key)
|
static void rcdeviceCamSimulate5KeyCablePress(rcdeviceCamSimulationKeyEvent_e key)
|
||||||
|
@ -223,9 +216,8 @@ void rcdeviceSend5KeyOSDCableSimualtionEvent(rcdeviceCamSimulationKeyEvent_e key
|
||||||
case RCDEVICE_CAM_KEY_CONNECTION_OPEN:
|
case RCDEVICE_CAM_KEY_CONNECTION_OPEN:
|
||||||
runcamDeviceOpen5KeyOSDCableConnection(camDevice, rcdeviceSimulationRespHandle);
|
runcamDeviceOpen5KeyOSDCableConnection(camDevice, rcdeviceSimulationRespHandle);
|
||||||
break;
|
break;
|
||||||
case RCDEVICE_CAM_KEY_CONNECTION_CLOSE: {
|
case RCDEVICE_CAM_KEY_CONNECTION_CLOSE:
|
||||||
runcamDeviceClose5KeyOSDCableConnection(camDevice, rcdeviceSimulationRespHandle);
|
runcamDeviceClose5KeyOSDCableConnection(camDevice, rcdeviceSimulationRespHandle);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case RCDEVICE_CAM_KEY_ENTER:
|
case RCDEVICE_CAM_KEY_ENTER:
|
||||||
case RCDEVICE_CAM_KEY_LEFT:
|
case RCDEVICE_CAM_KEY_LEFT:
|
||||||
|
@ -241,8 +233,6 @@ void rcdeviceSend5KeyOSDCableSimualtionEvent(rcdeviceCamSimulationKeyEvent_e key
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rcdevice5KeySimulationProcess(timeUs_t currentTimeUs)
|
static void rcdevice5KeySimulationProcess(timeUs_t currentTimeUs)
|
||||||
|
@ -323,8 +313,6 @@ void rcdeviceInit(void)
|
||||||
uint8_t switchIndex = i - BOXCAMERA1;
|
uint8_t switchIndex = i - BOXCAMERA1;
|
||||||
switchStates[switchIndex].isActivated = true;
|
switchStates[switchIndex].isActivated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue