mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 12:33:34 +08:00
Use defines instead of hardcoded magic values for maximum number of output channels and rpm filter time constant
This commit is contained in:
@@ -71,7 +71,7 @@ CameraCapture::CameraCapture() :
|
||||
_p_camera_capture_edge = param_find("CAM_CAP_EDGE");
|
||||
param_get(_p_camera_capture_edge, &_camera_capture_edge);
|
||||
|
||||
for (unsigned i = 0; i < 16 && _capture_channel == -1; ++i) {
|
||||
for (unsigned i = 0; i < PWM_OUTPUT_MAX_CHANNELS && _capture_channel == -1; ++i) {
|
||||
char param_name[17];
|
||||
snprintf(param_name, sizeof(param_name), "%s_%s%d", PARAM_PREFIX, "FUNC", i + 1);
|
||||
param_t function_handle = param_find(param_name);
|
||||
|
||||
Reference in New Issue
Block a user