Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rcdevice.c #9348

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main/io/rcdevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ static void runcamDeviceParseV2DeviceInfo(rcdeviceResponseParsingContext_t *ctx)
// definition of runcamDeviceInfo_t to know more)
static void runcamDeviceGetDeviceInfo(runcamDevice_t *device)
{
// preset with rc split 2s support which has issue to respond
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably should not be blindly enabled, as we are asking the device for information that should populate the features.

We should probably fix the protocol differences with this camera, so we can read the featrures correctly, or at least have a configuration variable to enable this hack.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change it as you like it is hot fix for now. Having feature variable would be good for diagnostics via CLI.Also I noticed that runcam attempt interval variable was removed in some Inav version as there was related workaround before.
I would add possibility to set features manually and let user to configure/map what he needs.

device->info.features = RCDEVICE_PROTOCOL_FEATURE_SIMULATE_POWER_BUTTON | RCDEVICE_PROTOCOL_FEATURE_SIMULATE_WIFI_BUTTON | RCDEVICE_PROTOCOL_FEATURE_CHANGE_MODE;
device->info.protocolVersion = RCDEVICE_PROTOCOL_VERSION_1_0;
device->isReady = true;
runcamDeviceSendRequestAndWaitingResp(device, RCDEVICE_PROTOCOL_COMMAND_GET_DEVICE_INFO, NULL, 0, RCDEVICE_INIT_DEVICE_ATTEMPT_INTERVAL, RCDEVICE_INIT_DEVICE_ATTEMPTS, NULL, runcamDeviceParseV2DeviceInfo);
}

Expand Down
Loading