mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
commit
d6c5b9824c
7 changed files with 3 additions and 10 deletions
|
@ -269,7 +269,7 @@ static const char * const lookupTableCameraControlMode[] = {
|
||||||
static const char * const lookupTablePwmProtocol[] = {
|
static const char * const lookupTablePwmProtocol[] = {
|
||||||
"OFF", "ONESHOT125", "ONESHOT42", "MULTISHOT", "BRUSHED",
|
"OFF", "ONESHOT125", "ONESHOT42", "MULTISHOT", "BRUSHED",
|
||||||
#ifdef USE_DSHOT
|
#ifdef USE_DSHOT
|
||||||
"DSHOT150", "DSHOT300", "DSHOT600", "DSHOT1200", "PROSHOT1000"
|
"DSHOT150", "DSHOT300", "DSHOT600", "PROSHOT1000"
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -84,8 +84,6 @@ uint32_t getDshotHz(motorPwmProtocolTypes_e pwmProtocolType)
|
||||||
switch (pwmProtocolType) {
|
switch (pwmProtocolType) {
|
||||||
case(PWM_TYPE_PROSHOT1000):
|
case(PWM_TYPE_PROSHOT1000):
|
||||||
return MOTOR_PROSHOT1000_HZ;
|
return MOTOR_PROSHOT1000_HZ;
|
||||||
case(PWM_TYPE_DSHOT1200):
|
|
||||||
return MOTOR_DSHOT1200_HZ;
|
|
||||||
case(PWM_TYPE_DSHOT600):
|
case(PWM_TYPE_DSHOT600):
|
||||||
return MOTOR_DSHOT600_HZ;
|
return MOTOR_DSHOT600_HZ;
|
||||||
case(PWM_TYPE_DSHOT300):
|
case(PWM_TYPE_DSHOT300):
|
||||||
|
@ -169,7 +167,6 @@ motorDevice_t *dshotPwmDevInit(const motorDevConfig_t *motorConfig, uint16_t idl
|
||||||
case PWM_TYPE_PROSHOT1000:
|
case PWM_TYPE_PROSHOT1000:
|
||||||
loadDmaBuffer = loadDmaBufferProshot;
|
loadDmaBuffer = loadDmaBufferProshot;
|
||||||
break;
|
break;
|
||||||
case PWM_TYPE_DSHOT1200:
|
|
||||||
case PWM_TYPE_DSHOT600:
|
case PWM_TYPE_DSHOT600:
|
||||||
case PWM_TYPE_DSHOT300:
|
case PWM_TYPE_DSHOT300:
|
||||||
case PWM_TYPE_DSHOT150:
|
case PWM_TYPE_DSHOT150:
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
#include "drivers/motor.h"
|
#include "drivers/motor.h"
|
||||||
|
|
||||||
#define MOTOR_DSHOT1200_HZ MHZ_TO_HZ(24)
|
|
||||||
#define MOTOR_DSHOT600_HZ MHZ_TO_HZ(12)
|
#define MOTOR_DSHOT600_HZ MHZ_TO_HZ(12)
|
||||||
#define MOTOR_DSHOT300_HZ MHZ_TO_HZ(6)
|
#define MOTOR_DSHOT300_HZ MHZ_TO_HZ(6)
|
||||||
#define MOTOR_DSHOT150_HZ MHZ_TO_HZ(3)
|
#define MOTOR_DSHOT150_HZ MHZ_TO_HZ(3)
|
||||||
|
|
|
@ -98,7 +98,6 @@ void motorInitEndpoints(float outputLimit, float *outputLow, float *outputHigh,
|
||||||
switch (motorConfig()->dev.motorPwmProtocol) {
|
switch (motorConfig()->dev.motorPwmProtocol) {
|
||||||
#ifdef USE_DSHOT
|
#ifdef USE_DSHOT
|
||||||
case PWM_TYPE_PROSHOT1000:
|
case PWM_TYPE_PROSHOT1000:
|
||||||
case PWM_TYPE_DSHOT1200:
|
|
||||||
case PWM_TYPE_DSHOT600:
|
case PWM_TYPE_DSHOT600:
|
||||||
case PWM_TYPE_DSHOT300:
|
case PWM_TYPE_DSHOT300:
|
||||||
case PWM_TYPE_DSHOT150:
|
case PWM_TYPE_DSHOT150:
|
||||||
|
@ -215,7 +214,6 @@ void motorDevInit(const motorDevConfig_t *motorConfig, uint16_t idlePulse, uint8
|
||||||
case PWM_TYPE_DSHOT150:
|
case PWM_TYPE_DSHOT150:
|
||||||
case PWM_TYPE_DSHOT300:
|
case PWM_TYPE_DSHOT300:
|
||||||
case PWM_TYPE_DSHOT600:
|
case PWM_TYPE_DSHOT600:
|
||||||
case PWM_TYPE_DSHOT1200:
|
|
||||||
case PWM_TYPE_PROSHOT1000:
|
case PWM_TYPE_PROSHOT1000:
|
||||||
#ifdef USE_DSHOT_BITBANG
|
#ifdef USE_DSHOT_BITBANG
|
||||||
if (isDshotBitbangActive(motorConfig)) {
|
if (isDshotBitbangActive(motorConfig)) {
|
||||||
|
|
|
@ -32,7 +32,7 @@ typedef enum {
|
||||||
PWM_TYPE_DSHOT150,
|
PWM_TYPE_DSHOT150,
|
||||||
PWM_TYPE_DSHOT300,
|
PWM_TYPE_DSHOT300,
|
||||||
PWM_TYPE_DSHOT600,
|
PWM_TYPE_DSHOT600,
|
||||||
PWM_TYPE_DSHOT1200,
|
// PWM_TYPE_DSHOT1200, removed
|
||||||
PWM_TYPE_PROSHOT1000,
|
PWM_TYPE_PROSHOT1000,
|
||||||
#endif
|
#endif
|
||||||
PWM_TYPE_MAX
|
PWM_TYPE_MAX
|
||||||
|
|
|
@ -494,7 +494,6 @@ static void validateAndFixConfig(void)
|
||||||
bool usingDshotProtocol;
|
bool usingDshotProtocol;
|
||||||
switch (motorConfig()->dev.motorPwmProtocol) {
|
switch (motorConfig()->dev.motorPwmProtocol) {
|
||||||
case PWM_TYPE_PROSHOT1000:
|
case PWM_TYPE_PROSHOT1000:
|
||||||
case PWM_TYPE_DSHOT1200:
|
|
||||||
case PWM_TYPE_DSHOT600:
|
case PWM_TYPE_DSHOT600:
|
||||||
case PWM_TYPE_DSHOT300:
|
case PWM_TYPE_DSHOT300:
|
||||||
case PWM_TYPE_DSHOT150:
|
case PWM_TYPE_DSHOT150:
|
||||||
|
|
|
@ -51,7 +51,7 @@ void targetConfiguration(void)
|
||||||
{
|
{
|
||||||
pinioConfigMutable()->config[0] = PINIO_CONFIG_MODE_OUT_PP | PINIO_CONFIG_OUT_INVERTED;
|
pinioConfigMutable()->config[0] = PINIO_CONFIG_MODE_OUT_PP | PINIO_CONFIG_OUT_INVERTED;
|
||||||
pinioBoxConfigMutable()->permanentId[0] = 40;
|
pinioBoxConfigMutable()->permanentId[0] = 40;
|
||||||
motorConfigMutable()->dev.motorPwmProtocol = PWM_TYPE_DSHOT1200;
|
motorConfigMutable()->dev.motorPwmProtocol = PWM_TYPE_DSHOT600;
|
||||||
pidConfigMutable()->pid_process_denom = 1;
|
pidConfigMutable()->pid_process_denom = 1;
|
||||||
currentSensorADCConfigMutable()->scale = CURRENT_SCALE;
|
currentSensorADCConfigMutable()->scale = CURRENT_SCALE;
|
||||||
featureDisable(FEATURE_SOFTSERIAL);
|
featureDisable(FEATURE_SOFTSERIAL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue