From 18c3d3f444fb8ca800a43f7a785d8aaa9436d9dc Mon Sep 17 00:00:00 2001 From: Martin Budden Date: Thu, 19 Jan 2017 23:46:37 +0000 Subject: [PATCH] Fix to servoParams PG reset function --- src/main/flight/servos.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/flight/servos.c b/src/main/flight/servos.c index a3b4c39d68..d4c9d43202 100755 --- a/src/main/flight/servos.c +++ b/src/main/flight/servos.c @@ -77,12 +77,12 @@ PG_RESET_TEMPLATE(servoConfig_t, servoConfig, PG_REGISTER_ARR(servoMixer_t, MAX_SERVO_RULES, customServoMixers, PG_SERVO_MIXER, 0); -PG_REGISTER_ARR(servoParam_t, MAX_SUPPORTED_SERVOS, servoParams, PG_SERVO_PARAMS, 0); +PG_REGISTER_ARR_WITH_RESET_FN(servoParam_t, MAX_SUPPORTED_SERVOS, servoParams, PG_SERVO_PARAMS, 0); -void pgResetFn_servoParams(const servoParam_t *instance) +void pgResetFn_servoParams(servoParam_t *instance) { for (int i = 0; i < MAX_SUPPORTED_SERVOS; i++) { - RESET_CONFIG(const servoParam_t, ((servoParam_t*)&instance[i]), + RESET_CONFIG(const servoParam_t, &instance[i], .min = DEFAULT_SERVO_MIN, .max = DEFAULT_SERVO_MAX, .middle = DEFAULT_SERVO_MIDDLE,