SWR added in the firmware as an option (SWR=YES)
This commit is contained in:
+8
-16
@@ -615,7 +615,7 @@ ifeq ($(PCB), $(filter $(PCB), SKY9X 9XRPRO))
|
|||||||
SDCARD = YES
|
SDCARD = YES
|
||||||
BUZZER = NO
|
BUZZER = NO
|
||||||
THR_TRACE = YES
|
THR_TRACE = YES
|
||||||
CPPDEFS += -DPCBSKY9X -DCPUARM -DEEPROM_VARIANT=0 -DAUDIO -DHAPTIC -DDSM2 -DDSM2_PPM
|
CPPDEFS += -DPCBSKY9X -DCPUARM -DEEPROM_VARIANT=0 -DAUDIO -DHAPTIC -DDSM2 -DDSM2_PPM -DSWR
|
||||||
ifeq ($(PCB), SKY9X)
|
ifeq ($(PCB), SKY9X)
|
||||||
CPPDEFS += -DROTARY_ENCODERS=1
|
CPPDEFS += -DROTARY_ENCODERS=1
|
||||||
CPPSRC += targets/sky9x/rotenc_driver.cpp
|
CPPSRC += targets/sky9x/rotenc_driver.cpp
|
||||||
@@ -638,28 +638,23 @@ ifeq ($(PCB), $(filter $(PCB), SKY9X 9XRPRO))
|
|||||||
CPPSRC += tasks_arm.cpp audio_arm.cpp haptic.cpp gui/view_about.cpp gui/view_text.cpp
|
CPPSRC += tasks_arm.cpp audio_arm.cpp haptic.cpp gui/view_about.cpp gui/view_text.cpp
|
||||||
CPPSRC += targets/sky9x/telemetry_driver.cpp targets/sky9x/second_serial_driver.cpp targets/sky9x/pwr_driver.cpp targets/sky9x/adc_driver.cpp targets/sky9x/eeprom_driver.cpp targets/sky9x/pulses_driver.cpp targets/sky9x/keys_driver.cpp targets/sky9x/audio_driver.cpp targets/sky9x/buzzer_driver.cpp targets/sky9x/haptic_driver.cpp targets/sky9x/sdcard_driver.cpp targets/sky9x/massstorage.cpp
|
CPPSRC += targets/sky9x/telemetry_driver.cpp targets/sky9x/second_serial_driver.cpp targets/sky9x/pwr_driver.cpp targets/sky9x/adc_driver.cpp targets/sky9x/eeprom_driver.cpp targets/sky9x/pulses_driver.cpp targets/sky9x/keys_driver.cpp targets/sky9x/audio_driver.cpp targets/sky9x/buzzer_driver.cpp targets/sky9x/haptic_driver.cpp targets/sky9x/sdcard_driver.cpp targets/sky9x/massstorage.cpp
|
||||||
CPPSRC += loadboot.cpp
|
CPPSRC += loadboot.cpp
|
||||||
|
|
||||||
ifeq ($(SDCARD), YES)
|
ifeq ($(SDCARD), YES)
|
||||||
CPPDEFS += -DVOICE
|
CPPDEFS += -DVOICE
|
||||||
INCDIRS += FatFs FatFs/option
|
INCDIRS += FatFs FatFs/option
|
||||||
EXTRABOARDSRC += FatFs/ff.c FatFs/fattime.c FatFs/option/ccsbcs.c targets/sky9x/diskio.cpp
|
EXTRABOARDSRC += FatFs/ff.c FatFs/fattime.c FatFs/option/ccsbcs.c targets/sky9x/diskio.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(BUZZER), YES)
|
ifeq ($(BUZZER), YES)
|
||||||
CPPDEFS += -DBUZZER
|
CPPDEFS += -DBUZZER
|
||||||
CPPSRC += buzzer.cpp
|
CPPSRC += buzzer.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(RTCLOCK), YES)
|
ifeq ($(RTCLOCK), YES)
|
||||||
CPPDEFS += -DRTCLOCK
|
CPPDEFS += -DRTCLOCK
|
||||||
CPPSRC += rtc.cpp targets/sky9x/rtc_driver.cpp
|
CPPSRC += rtc.cpp targets/sky9x/rtc_driver.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(BLUETOOTH), YES)
|
ifeq ($(BLUETOOTH), YES)
|
||||||
CPPDEFS += -DBLUETOOTH
|
CPPDEFS += -DBLUETOOTH
|
||||||
CPPSRC += targets/sky9x/bluetooth.cpp
|
CPPSRC += targets/sky9x/bluetooth.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(DEBUG), YES)
|
ifeq ($(DEBUG), YES)
|
||||||
CPPSRC += debug.cpp
|
CPPSRC += debug.cpp
|
||||||
SRC += targets/sky9x/syscalls.c
|
SRC += targets/sky9x/syscalls.c
|
||||||
@@ -671,13 +666,17 @@ ifeq ($(PCB), TARANIS)
|
|||||||
ARCH = ARM
|
ARCH = ARM
|
||||||
ifeq ($(PCBREV), REV3)
|
ifeq ($(PCBREV), REV3)
|
||||||
CPPDEFS = -DREV3
|
CPPDEFS = -DREV3
|
||||||
|
SWR = YES
|
||||||
else ifeq ($(PCBREV), REV4a)
|
else ifeq ($(PCBREV), REV4a)
|
||||||
CPPDEFS = -DREV4a
|
CPPDEFS = -DREV4a
|
||||||
|
SWR = YES
|
||||||
else ifeq ($(PCBREV), REVPLUS)
|
else ifeq ($(PCBREV), REVPLUS)
|
||||||
CPPDEFS = -DREVPLUS
|
CPPDEFS = -DREVPLUS
|
||||||
HAPTIC = YES
|
HAPTIC = YES
|
||||||
|
SWR = NO
|
||||||
else
|
else
|
||||||
CPPDEFS = -DREV4
|
CPPDEFS = -DREV4
|
||||||
|
SWR = YES
|
||||||
endif
|
endif
|
||||||
ifeq ($(SPORT_FILE_LOG), YES)
|
ifeq ($(SPORT_FILE_LOG), YES)
|
||||||
CPPDEFS += -DSPORT_FILE_LOG
|
CPPDEFS += -DSPORT_FILE_LOG
|
||||||
@@ -760,13 +759,11 @@ ifeq ($(PCB), TARANIS)
|
|||||||
SRC += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c
|
SRC += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c
|
||||||
EXTRABOARDSRC += targets/taranis/usbd_storage_msd.cpp
|
EXTRABOARDSRC += targets/taranis/usbd_storage_msd.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(NANO), YES)
|
ifeq ($(NANO), YES)
|
||||||
# use newlib-nano for linking
|
# use newlib-nano for linking
|
||||||
NEWLIB_NANO_FLAGS = --specs=nano.specs -u _printf_float
|
NEWLIB_NANO_FLAGS = --specs=nano.specs -u _printf_float
|
||||||
CPPDEFS += -DNANO
|
CPPDEFS += -DNANO
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(LUA), NO)
|
ifneq ($(LUA), NO)
|
||||||
ifeq ($(LUA), YES)
|
ifeq ($(LUA), YES)
|
||||||
CPPDEFS += -DLUA_MODEL_SCRIPTS
|
CPPDEFS += -DLUA_MODEL_SCRIPTS
|
||||||
@@ -780,42 +777,37 @@ ifeq ($(PCB), TARANIS)
|
|||||||
SRC += $(LUASRC)
|
SRC += $(LUASRC)
|
||||||
LUADEP = lua_exports.cpp
|
LUADEP = lua_exports.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(SDCARD), YES)
|
ifeq ($(SDCARD), YES)
|
||||||
EXTRABOARDSRC += FatFs/ff.c FatFs/fattime.c FatFs/option/ccsbcs.c targets/taranis/diskio.cpp
|
EXTRABOARDSRC += FatFs/ff.c FatFs/fattime.c FatFs/option/ccsbcs.c targets/taranis/diskio.cpp
|
||||||
CPPDEFS += -DVOICE
|
CPPDEFS += -DVOICE
|
||||||
INCDIRS += FatFs FatFs/option
|
INCDIRS += FatFs FatFs/option
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(RTCLOCK), YES)
|
ifeq ($(RTCLOCK), YES)
|
||||||
CPPDEFS += -DRTCLOCK
|
CPPDEFS += -DRTCLOCK
|
||||||
CPPSRC += rtc.cpp targets/taranis/rtc_driver.cpp
|
CPPSRC += rtc.cpp targets/taranis/rtc_driver.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(DEBUG), YES)
|
ifeq ($(DEBUG), YES)
|
||||||
CPPSRC += debug.cpp
|
CPPSRC += debug.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(DSM2), PPM)
|
ifeq ($(DSM2), PPM)
|
||||||
CPPSRC += pulses/dsm2_arm.cpp
|
CPPSRC += pulses/dsm2_arm.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HUBSAN), YES)
|
ifeq ($(HUBSAN), YES)
|
||||||
CPPDEFS += -DHUBSAN
|
CPPDEFS += -DHUBSAN
|
||||||
CPPSRC += pulses/hubsan.cpp
|
CPPSRC += pulses/hubsan.cpp
|
||||||
CPPSRC += targets/taranis/a7105_driver.cpp
|
CPPSRC += targets/taranis/a7105_driver.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HAPTIC), YES)
|
ifeq ($(HAPTIC), YES)
|
||||||
CPPDEFS += -DHAPTIC
|
CPPDEFS += -DHAPTIC
|
||||||
CPPSRC += haptic.cpp
|
CPPSRC += haptic.cpp
|
||||||
CPPSRC += targets/taranis/haptic_driver.cpp
|
CPPSRC += targets/taranis/haptic_driver.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CHANNELS_MONITOR_INV_HIDE), YES)
|
ifeq ($(CHANNELS_MONITOR_INV_HIDE), YES)
|
||||||
CPPDEFS += -DCHANNELS_MONITOR_INV_HIDE
|
CPPDEFS += -DCHANNELS_MONITOR_INV_HIDE
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(SWR), YES)
|
||||||
|
CPPDEFS += -DSWR
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = $(TRGT)gcc
|
CC = $(TRGT)gcc
|
||||||
|
|||||||
@@ -1423,7 +1423,7 @@ bool isTelemetrySourceAvailable(int source)
|
|||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBTARANIS) && defined(REVPLUS)
|
#if !defined(SWR)
|
||||||
// on Taranis+ we also hide the SWR
|
// on Taranis+ we also hide the SWR
|
||||||
if (source == TELEM_SWR)
|
if (source == TELEM_SWR)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
+9
-8
@@ -115,13 +115,15 @@ const pm_char * openLogs()
|
|||||||
f_puts("Time,", &g_oLogFile);
|
f_puts("Time,", &g_oLogFile);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBTARANIS) && defined(REVPLUS)
|
#if defined(FRSKY)
|
||||||
f_puts("RSSI,A1,A2,A3,A4,", &g_oLogFile);
|
#if defined(CPUARM) && defined(SWR)
|
||||||
#elif defined(CPUARM) && defined(FRSKY)
|
|
||||||
f_puts("SWR,RSSI,A1,A2,A3,A4,", &g_oLogFile);
|
f_puts("SWR,RSSI,A1,A2,A3,A4,", &g_oLogFile);
|
||||||
#elif defined(FRSKY)
|
#elif defined(CPUARM)
|
||||||
|
f_puts("RSSI,A1,A2,A3,A4,", &g_oLogFile);
|
||||||
|
#else
|
||||||
f_puts("Buffer,RX,TX,A1,A2,", &g_oLogFile);
|
f_puts("Buffer,RX,TX,A1,A2,", &g_oLogFile);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(FRSKY_HUB)
|
#if defined(FRSKY_HUB)
|
||||||
if (IS_USR_PROTO_FRSKY_HUB()) {
|
if (IS_USR_PROTO_FRSKY_HUB()) {
|
||||||
@@ -207,14 +209,13 @@ void writeLogs()
|
|||||||
#endif // #if defined(RTCLOCK)
|
#endif // #if defined(RTCLOCK)
|
||||||
|
|
||||||
#if defined(FRSKY)
|
#if defined(FRSKY)
|
||||||
#if defined(PCBTARANIS) && defined(REVPLUS)
|
#if defined(CPUARM) && defined(SWR)
|
||||||
f_printf(&g_oLogFile, "%d,", RAW_FRSKY_MINMAX(frskyData.rssi[0]));
|
|
||||||
#elif defined(CPUARM)
|
|
||||||
f_printf(&g_oLogFile, "%d,%d,", RAW_FRSKY_MINMAX(frskyData.swr), RAW_FRSKY_MINMAX(frskyData.rssi[0]));
|
f_printf(&g_oLogFile, "%d,%d,", RAW_FRSKY_MINMAX(frskyData.swr), RAW_FRSKY_MINMAX(frskyData.rssi[0]));
|
||||||
|
#elif defined(CPUARM)
|
||||||
|
f_printf(&g_oLogFile, "%d,", RAW_FRSKY_MINMAX(frskyData.rssi[0]));
|
||||||
#else
|
#else
|
||||||
f_printf(&g_oLogFile, "%d,%d,%d,", frskyStreaming, RAW_FRSKY_MINMAX(frskyData.rssi[0]), RAW_FRSKY_MINMAX(frskyData.rssi[1]));
|
f_printf(&g_oLogFile, "%d,%d,%d,", frskyStreaming, RAW_FRSKY_MINMAX(frskyData.rssi[0]), RAW_FRSKY_MINMAX(frskyData.rssi[1]));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (uint8_t i=0; i<MAX_FRSKY_A_CHANNELS; i++) {
|
for (uint8_t i=0; i<MAX_FRSKY_A_CHANNELS; i++) {
|
||||||
int16_t converted_value = applyChannelRatio(i, RAW_FRSKY_MINMAX(frskyData.analog[i]));
|
int16_t converted_value = applyChannelRatio(i, RAW_FRSKY_MINMAX(frskyData.analog[i]));
|
||||||
f_printf(&g_oLogFile, "%d.%02d,", converted_value/100, converted_value%100);
|
f_printf(&g_oLogFile, "%d.%02d,", converted_value/100, converted_value%100);
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ void telemetryWakeup()
|
|||||||
alarmsCheckTime = get_tmr10ms() + 100; /* next check in 1 second */
|
alarmsCheckTime = get_tmr10ms() + 100; /* next check in 1 second */
|
||||||
|
|
||||||
if (alarmsCheckStep == ALARM_SWR_STEP) {
|
if (alarmsCheckStep == ALARM_SWR_STEP) {
|
||||||
#if defined(PCBTARANIS) && !defined(REVPLUS)
|
#if defined(PCBTARANIS) && defined(SWR)
|
||||||
if (IS_FRSKY_SPORT_PROTOCOL() && frskyData.swr.value > 0x33) {
|
if (IS_FRSKY_SPORT_PROTOCOL() && frskyData.swr.value > 0x33) {
|
||||||
AUDIO_SWR_RED();
|
AUDIO_SWR_RED();
|
||||||
POPUP_WARNING(STR_ANTENNAPROBLEM);
|
POPUP_WARNING(STR_ANTENNAPROBLEM);
|
||||||
|
|||||||
Reference in New Issue
Block a user