mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 05:15:25 +03:00
Minor cleanup and rename of fastpwm lookup table
This commit is contained in:
parent
2af1130666
commit
339bd0b0d3
4 changed files with 7 additions and 13 deletions
|
@ -17,13 +17,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/*
|
|
||||||
#define SPI_0_28125MHZ_CLOCK_DIVIDER 256
|
|
||||||
#define SPI_0_5625MHZ_CLOCK_DIVIDER 128
|
|
||||||
#define SPI_18MHZ_CLOCK_DIVIDER 2
|
|
||||||
#define SPI_9MHZ_CLOCK_DIVIDER 4
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
#include "rcc.h"
|
#include "rcc.h"
|
||||||
|
|
|
@ -463,7 +463,7 @@ static const char * const lookupTableSuperExpoYaw[] = {
|
||||||
"OFF", "ON", "ALWAYS"
|
"OFF", "ON", "ALWAYS"
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char * const lookupTableFastPwm[] = {
|
static const char * const lookupTablePwmProtocol[] = {
|
||||||
"OFF", "ONESHOT125", "ONESHOT42", "MULTISHOT", "BRUSHED"
|
"OFF", "ONESHOT125", "ONESHOT42", "MULTISHOT", "BRUSHED"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -525,7 +525,7 @@ static const lookupTableEntry_t lookupTables[] = {
|
||||||
{ lookupTableMagHardware, sizeof(lookupTableMagHardware) / sizeof(char *) },
|
{ lookupTableMagHardware, sizeof(lookupTableMagHardware) / sizeof(char *) },
|
||||||
{ lookupTableDebug, sizeof(lookupTableDebug) / sizeof(char *) },
|
{ lookupTableDebug, sizeof(lookupTableDebug) / sizeof(char *) },
|
||||||
{ lookupTableSuperExpoYaw, sizeof(lookupTableSuperExpoYaw) / sizeof(char *) },
|
{ lookupTableSuperExpoYaw, sizeof(lookupTableSuperExpoYaw) / sizeof(char *) },
|
||||||
{ lookupTableFastPwm, sizeof(lookupTableFastPwm) / sizeof(char *) },
|
{ lookupTablePwmProtocol, sizeof(lookupTablePwmProtocol) / sizeof(char *) },
|
||||||
{ lookupDeltaMethod, sizeof(lookupDeltaMethod) / sizeof(char *) },
|
{ lookupDeltaMethod, sizeof(lookupDeltaMethod) / sizeof(char *) },
|
||||||
#ifdef OSD
|
#ifdef OSD
|
||||||
{ lookupTableOsdType, sizeof(lookupTableOsdType) / sizeof(char *) },
|
{ lookupTableOsdType, sizeof(lookupTableOsdType) / sizeof(char *) },
|
||||||
|
|
|
@ -322,6 +322,7 @@ void init(void)
|
||||||
pwm_params.idlePulse = masterConfig.escAndServoConfig.mincommand;
|
pwm_params.idlePulse = masterConfig.escAndServoConfig.mincommand;
|
||||||
if (feature(FEATURE_3D))
|
if (feature(FEATURE_3D))
|
||||||
pwm_params.idlePulse = masterConfig.flight3DConfig.neutral3d;
|
pwm_params.idlePulse = masterConfig.flight3DConfig.neutral3d;
|
||||||
|
|
||||||
if (masterConfig.motor_pwm_protocol == PWM_TYPE_BRUSHED) {
|
if (masterConfig.motor_pwm_protocol == PWM_TYPE_BRUSHED) {
|
||||||
pwm_params.idlePulse = 0; // brushed motors
|
pwm_params.idlePulse = 0; // brushed motors
|
||||||
use_unsyncedPwm = false;
|
use_unsyncedPwm = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue