1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 04:45:24 +03:00

fixed the coding-style issues

This commit is contained in:
azolyoung 2018-06-24 10:20:11 +08:00
parent 5b2dd46367
commit 5967b9b597
2 changed files with 3 additions and 15 deletions

View file

@ -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

View file

@ -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