Added USE_ESC_SENSOR_INFO define, cleaned up USE_ESC_SENSOR define. (#5580)
This commit is contained in:
parent
b8aa6ac915
commit
b5c0076bc8
|
@ -2372,7 +2372,8 @@ static int parseOutputIndex(char *pch, bool allowAllEscs) {
|
|||
return outputIndex;
|
||||
}
|
||||
|
||||
#ifdef USE_DSHOT
|
||||
#if defined(USE_DSHOT)
|
||||
#if defined(USE_ESC_SENSOR) && defined(USE_ESC_SENSOR_INFO)
|
||||
|
||||
#define ESC_INFO_KISS_V1_EXPECTED_FRAME_SIZE 15
|
||||
#define ESC_INFO_KISS_V2_EXPECTED_FRAME_SIZE 21
|
||||
|
@ -2558,6 +2559,7 @@ static void executeEscInfoCommand(uint8_t escIndex)
|
|||
|
||||
printEscInfo(escInfoBuffer, getNumberEscBytesRead());
|
||||
}
|
||||
#endif // USE_ESC_SENSOR && USE_ESC_SENSOR_INFO
|
||||
|
||||
static void cliDshotProg(char *cmdline)
|
||||
{
|
||||
|
@ -2600,6 +2602,8 @@ static void cliDshotProg(char *cmdline)
|
|||
if (command != DSHOT_CMD_ESC_INFO) {
|
||||
pwmWriteDshotCommand(escIndex, getMotorCount(), command);
|
||||
} else {
|
||||
#if defined(USE_ESC_SENSOR) && defined(USE_ESC_SENSOR_INFO)
|
||||
if (feature(FEATURE_ESC_SENSOR)) {
|
||||
if (escIndex != ALL_MOTORS) {
|
||||
executeEscInfoCommand(escIndex);
|
||||
} else {
|
||||
|
@ -2607,6 +2611,11 @@ static void cliDshotProg(char *cmdline)
|
|||
executeEscInfoCommand(i);
|
||||
}
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
cliPrintLine("Not supported.");
|
||||
}
|
||||
}
|
||||
|
||||
cliPrintLinef("Command Sent: %d", command);
|
||||
|
@ -2628,7 +2637,7 @@ static void cliDshotProg(char *cmdline)
|
|||
|
||||
pwmEnableMotors();
|
||||
}
|
||||
#endif
|
||||
#endif // USE_DSHOT
|
||||
|
||||
#ifdef USE_ESCSERIAL
|
||||
static void cliEscPassthrough(char *cmdline)
|
||||
|
|
|
@ -741,6 +741,8 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
|
|||
|
||||
static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
|
||||
{
|
||||
bool unsupportedCommand = false;
|
||||
|
||||
switch (cmdMSP) {
|
||||
case MSP_STATUS_EX:
|
||||
case MSP_STATUS:
|
||||
|
@ -967,13 +969,19 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
|
|||
break;
|
||||
#endif
|
||||
|
||||
#ifdef USE_DSHOT
|
||||
#if defined(USE_ESC_SENSOR)
|
||||
case MSP_ESC_SENSOR_DATA:
|
||||
if (feature(FEATURE_ESC_SENSOR)) {
|
||||
sbufWriteU8(dst, getMotorCount());
|
||||
for (int i = 0; i < getMotorCount(); i++) {
|
||||
sbufWriteU8(dst, getEscSensorData(i)->temperature);
|
||||
sbufWriteU16(dst, getEscSensorData(i)->rpm);
|
||||
const escSensorData_t *escData = getEscSensorData(i);
|
||||
sbufWriteU8(dst, escData->temperature);
|
||||
sbufWriteU16(dst, escData->rpm);
|
||||
}
|
||||
} else {
|
||||
unsupportedCommand = true;
|
||||
}
|
||||
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
@ -1276,9 +1284,9 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
|
|||
break;
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
unsupportedCommand = true;
|
||||
}
|
||||
return true;
|
||||
return !unsupportedCommand;
|
||||
}
|
||||
|
||||
static mspResult_e mspFcProcessOutCommandWithArg(uint8_t cmdMSP, sbuf_t *arg, sbuf_t *dst)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include <platform.h>
|
||||
|
||||
#ifdef USE_DSHOT
|
||||
#if defined(USE_ESC_SENSOR)
|
||||
|
||||
#include "build/debug.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
|
||||
#define USBD_PRODUCT_STRING "AnyFCM7"
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
|
||||
#define LED0_PIN PB6 //red
|
||||
#define LED1_PIN PB9 //blue
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
#define MPU_INT_EXTI PC13
|
||||
#define USE_EXTI
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
#define REMAP_TIM16_DMA
|
||||
#define REMAP_TIM17_DMA
|
||||
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
#define TARGET_BOARD_IDENTIFIER "BFF4"
|
||||
#define USBD_PRODUCT_STRING "BetaFlightF4"
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
|
||||
#define LED0_PIN PB5
|
||||
|
||||
#define USE_BEEPER
|
||||
|
|
|
@ -124,8 +124,6 @@
|
|||
#define USE_MPU_DATA_READY_SIGNAL
|
||||
#define ENSURE_MPU_DATA_READY_IS_LOW
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
|
||||
#define USE_SERIAL_4WAY_BLHELI_INTERFACE
|
||||
|
|
|
@ -148,7 +148,6 @@
|
|||
/*---------------------------------*/
|
||||
|
||||
/*-------------ESCs----------------*/
|
||||
#define USE_ESC_SENSOR
|
||||
#define USE_SERIAL_4WAY_BLHELI_INTERFACE
|
||||
#define USE_ESCSERIAL
|
||||
#define ESCSERIAL_TIMER_TX_PIN PB0 // (HARDARE=0)
|
||||
|
|
|
@ -162,7 +162,6 @@
|
|||
/*---------------------------------*/
|
||||
|
||||
/*-------------ESCs----------------*/
|
||||
#define USE_ESC_SENSOR
|
||||
#define USE_SERIAL_4WAY_BLHELI_INTERFACE
|
||||
#define USE_ESCSERIAL
|
||||
#define ESCSERIAL_TIMER_TX_PIN PA3 // (HARDARE=0)
|
||||
|
|
|
@ -109,8 +109,6 @@
|
|||
#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256
|
||||
#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
|
||||
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
|
||||
#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_NONE
|
||||
|
||||
|
|
|
@ -166,7 +166,6 @@
|
|||
|
||||
#define USE_SERIAL_4WAY_BLHELI_INTERFACE
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
#define REMAP_TIM17_DMA
|
||||
|
||||
#define TARGET_IO_PORTA 0xffff
|
||||
|
|
|
@ -44,8 +44,6 @@
|
|||
#define USE_FLASHFS
|
||||
#define USE_FLASH_M25P16
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
|
||||
#define USE_VCP
|
||||
#define USE_UART1
|
||||
#define USE_UART2
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
#define SBUS_PORT_OPTIONS (SERIAL_STOPBITS_2 | SERIAL_PARITY_EVEN | SERIAL_INVERTED | SERIAL_BIDIR)
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
|
||||
#define USE_ESCSERIAL
|
||||
#define ESCSERIAL_TIMER_TX_PIN PA13 // (Hardware=6, common to KISSFC & KISSCC)
|
||||
#define REMAP_TIM17_DMA
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
#define USBD_PRODUCT_STRING "KISSFCV2F7"
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
|
||||
#define LED0 PA8 // blue
|
||||
#define LED1 PC8 // blingbling
|
||||
#define LED1_INVERTED
|
||||
|
|
|
@ -48,8 +48,6 @@
|
|||
#define USE_MPU_DATA_READY_SIGNAL
|
||||
#define ENSURE_MPU_DATA_READY_IS_LOW
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
|
||||
#define USE_SPI
|
||||
#define USE_SPI_DEVICE_1
|
||||
#ifdef LUXV2_RACE
|
||||
|
|
|
@ -97,8 +97,6 @@
|
|||
//#define CURRENT_METER_ADC_PIN PA5
|
||||
#define RSSI_ADC_PIN PB2
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
|
||||
#define USE_SERIAL_4WAY_BLHELI_INTERFACE
|
||||
|
||||
// IO - stm32f303cc in 48pin package
|
||||
|
|
|
@ -109,7 +109,6 @@
|
|||
#define CURRENT_METER_ADC_PIN PA5
|
||||
#define RSSI_ADC_PIN PB2
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
#define REMAP_TIM17_DMA
|
||||
|
||||
// UART1 TX uses DMA1_Channel4, which is also used by dshot on motor 4
|
||||
|
|
|
@ -158,8 +158,6 @@
|
|||
#define RSSI_ADC_PIN PC2
|
||||
#define EXTERNAL1_ADC_PIN PC3
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
|
||||
#define USE_SONAR
|
||||
#define SONAR_TRIGGER_PIN PB0
|
||||
#define SONAR_ECHO_PIN PB1
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#undef USE_RTC_TIME
|
||||
#undef USE_COPY_PROFILE_CMS_MENU
|
||||
#undef USE_RX_MSP
|
||||
#undef USE_ESC_SENSOR_INFO
|
||||
|
||||
|
||||
#define TARGET_BOARD_IDENTIFIER "OMNI" // https://en.wikipedia.org/wiki/Omnibus
|
||||
|
@ -139,8 +140,6 @@
|
|||
// Divide to under 25MHz for normal operation:
|
||||
#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 2
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
|
||||
// DSHOT output 4 uses DMA1_Channel5, so don't use it for the SDCARD until we find an alternative
|
||||
#ifndef USE_DSHOT
|
||||
#define SDCARD_DMA_CHANNEL_TX DMA1_Channel5
|
||||
|
|
|
@ -33,8 +33,6 @@
|
|||
|
||||
#define INVERTER_PIN_UART6 PC6
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
|
||||
// MPU9250 interrupt
|
||||
#define USE_EXTI
|
||||
#define MPU_INT_EXTI PC5
|
||||
|
|
|
@ -176,7 +176,6 @@
|
|||
|
||||
#define USE_MSP_CURRENT_METER
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
#define REMAP_TIM17_DMA
|
||||
|
||||
// UART1 TX uses DMA1_Channel4, which is also used by dshot on motor 4
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#undef USE_RTC_TIME
|
||||
#undef USE_COPY_PROFILE_CMS_MENU
|
||||
#undef USE_RX_MSP
|
||||
#undef USE_ESC_SENSOR_INFO
|
||||
|
||||
|
||||
#if !defined(AIORACERF3)
|
||||
|
@ -63,8 +64,6 @@
|
|||
#define USE_MAG_DATA_READY_SIGNAL
|
||||
#define ENSURE_MAG_DATA_READY_IS_HIGH
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
|
||||
#define USE_GYRO
|
||||
#define USE_GYRO_SPI_MPU6500
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#undef USE_RTC_TIME
|
||||
#undef USE_COPY_PROFILE_CMS_MENU
|
||||
#undef USE_RX_MSP
|
||||
#undef USE_ESC_SENSOR_INFO
|
||||
|
||||
|
||||
#undef USE_COPY_PROFILE_CMS_MENU
|
||||
|
|
|
@ -190,8 +190,6 @@
|
|||
#define RSSI_ADC_PIN PC2
|
||||
#define EXTERNAL1_ADC_PIN PC3
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
|
||||
#define USE_RANGEFINDER
|
||||
#define USE_RANGEFINDER_HCSR04
|
||||
#define RANGEFINDER_HCSR04_TRIGGER_PIN PB0
|
||||
|
|
|
@ -104,8 +104,6 @@
|
|||
#define CURRENT_METER_ADC_PIN PA5
|
||||
#define RSSI_ADC_PIN PB2
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
|
||||
#define REMAP_TIM17_DMA
|
||||
// UART1 TX uses DMA1_Channel4, which is also used by dshot on motor 4
|
||||
#if defined(USE_UART1_TX_DMA) && defined(USE_DSHOT)
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
|
||||
#ifdef STM32F4
|
||||
#define USE_DSHOT
|
||||
#define USE_ESC_SENSOR
|
||||
#define I2C3_OVERCLOCK true
|
||||
#define USE_GYRO_DATA_ANALYSE
|
||||
#define USE_ADC
|
||||
|
@ -65,7 +64,6 @@
|
|||
#endif
|
||||
#ifdef STM32F7
|
||||
#define USE_DSHOT
|
||||
#define USE_ESC_SENSOR
|
||||
#define I2C3_OVERCLOCK true
|
||||
#define I2C4_OVERCLOCK true
|
||||
#define USE_GYRO_DATA_ANALYSE
|
||||
|
@ -162,6 +160,8 @@
|
|||
#define USE_VTX_SMARTAUDIO
|
||||
#define USE_VTX_TRAMP
|
||||
#define USE_GYRO_LPF2
|
||||
#define USE_ESC_SENSOR
|
||||
#define USE_ESC_SENSOR_INFO
|
||||
|
||||
#ifdef USE_SERIALRX_SPEKTRUM
|
||||
#define USE_SPEKTRUM_BIND
|
||||
|
|
Loading…
Reference in New Issue