From 802c053e4e9f8f145297f380c0c1b9250bf7c583 Mon Sep 17 00:00:00 2001 From: mikeller Date: Tue, 3 Sep 2019 23:00:01 +1200 Subject: [PATCH] Removed Dshot1200 protocol. --- src/main/cli/settings.c | 2 +- src/main/drivers/dshot_dpwm.c | 3 --- src/main/drivers/dshot_dpwm.h | 1 - src/main/drivers/motor.c | 2 -- src/main/drivers/motor.h | 2 +- src/main/fc/config.c | 1 - src/main/target/XILOF4/config.c | 2 +- 7 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/main/cli/settings.c b/src/main/cli/settings.c index 2b5d1c51ab..33807469ad 100644 --- a/src/main/cli/settings.c +++ b/src/main/cli/settings.c @@ -269,7 +269,7 @@ static const char * const lookupTableCameraControlMode[] = { static const char * const lookupTablePwmProtocol[] = { "OFF", "ONESHOT125", "ONESHOT42", "MULTISHOT", "BRUSHED", #ifdef USE_DSHOT - "DSHOT150", "DSHOT300", "DSHOT600", "DSHOT1200", "PROSHOT1000" + "DSHOT150", "DSHOT300", "DSHOT600", "PROSHOT1000" #endif }; diff --git a/src/main/drivers/dshot_dpwm.c b/src/main/drivers/dshot_dpwm.c index 2900149750..87f1d4c3d1 100644 --- a/src/main/drivers/dshot_dpwm.c +++ b/src/main/drivers/dshot_dpwm.c @@ -84,8 +84,6 @@ uint32_t getDshotHz(motorPwmProtocolTypes_e pwmProtocolType) switch (pwmProtocolType) { case(PWM_TYPE_PROSHOT1000): return MOTOR_PROSHOT1000_HZ; - case(PWM_TYPE_DSHOT1200): - return MOTOR_DSHOT1200_HZ; case(PWM_TYPE_DSHOT600): return MOTOR_DSHOT600_HZ; case(PWM_TYPE_DSHOT300): @@ -168,7 +166,6 @@ motorDevice_t *dshotPwmDevInit(const motorDevConfig_t *motorConfig, uint16_t idl case PWM_TYPE_PROSHOT1000: loadDmaBuffer = loadDmaBufferProshot; break; - case PWM_TYPE_DSHOT1200: case PWM_TYPE_DSHOT600: case PWM_TYPE_DSHOT300: case PWM_TYPE_DSHOT150: diff --git a/src/main/drivers/dshot_dpwm.h b/src/main/drivers/dshot_dpwm.h index 482157b527..646520befa 100644 --- a/src/main/drivers/dshot_dpwm.h +++ b/src/main/drivers/dshot_dpwm.h @@ -24,7 +24,6 @@ #include "drivers/motor.h" -#define MOTOR_DSHOT1200_HZ MHZ_TO_HZ(24) #define MOTOR_DSHOT600_HZ MHZ_TO_HZ(12) #define MOTOR_DSHOT300_HZ MHZ_TO_HZ(6) #define MOTOR_DSHOT150_HZ MHZ_TO_HZ(3) diff --git a/src/main/drivers/motor.c b/src/main/drivers/motor.c index 12fd331b50..18f421c229 100644 --- a/src/main/drivers/motor.c +++ b/src/main/drivers/motor.c @@ -97,7 +97,6 @@ void motorInitEndpoints(float outputLimit, float *outputLow, float *outputHigh, switch (motorConfig()->dev.motorPwmProtocol) { #ifdef USE_DSHOT case PWM_TYPE_PROSHOT1000: - case PWM_TYPE_DSHOT1200: case PWM_TYPE_DSHOT600: case PWM_TYPE_DSHOT300: case PWM_TYPE_DSHOT150: @@ -204,7 +203,6 @@ void motorDevInit(const motorDevConfig_t *motorConfig, uint16_t idlePulse, uint8 case PWM_TYPE_DSHOT150: case PWM_TYPE_DSHOT300: case PWM_TYPE_DSHOT600: - case PWM_TYPE_DSHOT1200: case PWM_TYPE_PROSHOT1000: motorDevice = dshotPwmDevInit(motorConfig, idlePulse, motorCount, useUnsyncedPwm); isDshot = true; diff --git a/src/main/drivers/motor.h b/src/main/drivers/motor.h index 5e2ba2682a..d018748a84 100644 --- a/src/main/drivers/motor.h +++ b/src/main/drivers/motor.h @@ -32,7 +32,7 @@ typedef enum { PWM_TYPE_DSHOT150, PWM_TYPE_DSHOT300, PWM_TYPE_DSHOT600, - PWM_TYPE_DSHOT1200, +// PWM_TYPE_DSHOT1200, removed PWM_TYPE_PROSHOT1000, #endif PWM_TYPE_MAX diff --git a/src/main/fc/config.c b/src/main/fc/config.c index c173d03112..fbf23982ca 100644 --- a/src/main/fc/config.c +++ b/src/main/fc/config.c @@ -487,7 +487,6 @@ static void validateAndFixConfig(void) bool usingDshotProtocol; switch (motorConfig()->dev.motorPwmProtocol) { case PWM_TYPE_PROSHOT1000: - case PWM_TYPE_DSHOT1200: case PWM_TYPE_DSHOT600: case PWM_TYPE_DSHOT300: case PWM_TYPE_DSHOT150: diff --git a/src/main/target/XILOF4/config.c b/src/main/target/XILOF4/config.c index e7e0a558cb..aceaf85d5c 100644 --- a/src/main/target/XILOF4/config.c +++ b/src/main/target/XILOF4/config.c @@ -51,7 +51,7 @@ void targetConfiguration(void) { pinioConfigMutable()->config[0] = PINIO_CONFIG_MODE_OUT_PP | PINIO_CONFIG_OUT_INVERTED; pinioBoxConfigMutable()->permanentId[0] = 40; - motorConfigMutable()->dev.motorPwmProtocol = PWM_TYPE_DSHOT1200; + motorConfigMutable()->dev.motorPwmProtocol = PWM_TYPE_DSHOT600; pidConfigMutable()->pid_process_denom = 1; currentSensorADCConfigMutable()->scale = CURRENT_SCALE; featureDisable(FEATURE_SOFTSERIAL);