chore: more OTX to ETX housekeeping (#5396)

This commit is contained in:
Peter Feerick
2024-08-14 21:02:29 +10:00
committed by GitHub
parent 0768091fe1
commit 839cfbd53c
487 changed files with 537 additions and 1651 deletions
@@ -24,7 +24,7 @@
#include "stm32_timer.h"
#include "stm32_dma.h"
#include "opentx.h"
#include "edgetx.h"
#if !defined(SIMU)
const AudioBuffer * nextBuffer = nullptr;
@@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/
#ifndef _BOARD_COMMON_H_
#define _BOARD_COMMON_H_
#pragma once
#include <inttypes.h>
#include "cpu_id.h"
@@ -43,5 +42,3 @@
#endif
#include "delays_driver.h"
#endif
@@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/
#ifndef _bin_files_h_
#define _bin_files_h_
#pragma once
#include <FatFs/ff.h>
#include "sdcard.h"
@@ -98,5 +97,3 @@ FRESULT readBinFile();
// Close the previously opened file
FRESULT closeBinFile();
#endif
@@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/
#ifndef _boot_h_
#define _boot_h_
#pragma once
#include <stdint.h>
#include "stamp.h"
@@ -89,5 +88,3 @@ uint32_t bootloaderGetMenuItemCount(int baseCount);
bool bootloaderRadioMenu(uint32_t menuItem, event_t event);
void blExit();
#endif
@@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "edgetx.h"
#if defined(SIMU)
const uint32_t cpu_uid[3] = { 0x12345678, 0x55AA55AA, 0x87654321};
+1 -1
View File
@@ -21,7 +21,7 @@
#pragma once
#include "opentx_types.h"
#include "edgetx_types.h"
#if !defined(SIMU)
static inline void DMAWait()
@@ -32,7 +32,7 @@
#include "stm32_timer.h"
#if !defined(BOOT)
#include "opentx.h"
#include "edgetx.h"
#endif
#if ROTARY_ENCODER_GRANULARITY == 2
@@ -21,7 +21,7 @@
#pragma once
#include "opentx_types.h"
#include "edgetx_types.h"
extern "C" volatile tmr10ms_t g_tmr10ms;
static inline tmr10ms_t get_tmr10ms() { return g_tmr10ms; }
@@ -27,7 +27,7 @@
#include "hal.h"
#include "opentx.h"
#include "edgetx.h"
#include "trainer.h"
static void (*_trainer_timer_isr)();
@@ -22,7 +22,7 @@
#if defined(USBJ_EX)
#include "usb_joystick.h"
#else
#include "opentx_helpers.h"
#include "edgetx_helpers.h"
#endif
extern "C" {
@@ -26,7 +26,7 @@
#include "hal/gpio.h"
#include "opentx.h"
#include "edgetx.h"
#if !defined(SIMU)
+1 -1
View File
@@ -23,7 +23,7 @@
#include "stm32_gpio.h"
#include "stm32_timer.h"
#include "opentx_types.h"
#include "edgetx_types.h"
#include "board.h"
#if !defined(BOOT)
+2 -2
View File
@@ -37,7 +37,7 @@
#include "timers_driver.h"
#include "dataconstants.h"
#include "opentx_types.h"
#include "edgetx_types.h"
#include "globals.h"
#include "sdcard.h"
#include "debug.h"
@@ -61,7 +61,7 @@ void boardBLInit()
#endif
#if !defined(BOOT)
#include "opentx.h"
#include "edgetx.h"
void boardInit()
{
+2 -7
View File
@@ -19,13 +19,10 @@
* GNU General Public License for more details.
*/
#ifndef _BOARD_H_
#define _BOARD_H_
#pragma once
//#include "stm32_hal.h"
//#include "stm32_hal_ll.h"
#include "definitions.h"
#include "opentx_constants.h"
#include "edgetx_constants.h"
// Defines used in board_common.h
#define ROTARY_ENCODER_NAVIGATION
@@ -344,5 +341,3 @@ void bluetoothDisable();
#else
#define NUM_FUNCTIONS_SWITCHES 0
#endif
#endif // _BOARD_H_
+1 -4
View File
@@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/
#ifndef _HAL_H_
#define _HAL_H_
#pragma once
#define CPU_FREQ 168000000
#define PERI1_FREQUENCY 42000000
@@ -1099,5 +1098,3 @@
#define LCD_PHYS_W LCD_W
#define LCD_DEPTH 16
#endif
#endif // _HAL_H_
+1 -1
View File
@@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "edgetx.h"
#include "i2c_driver.h"
#include "imu_lsm6ds33.h"
+1 -1
View File
@@ -24,7 +24,7 @@
#include "stm32_hal_ll.h"
#include "stm32_hal.h"
#include "opentx_types.h"
#include "edgetx_types.h"
#include "dma2d.h"
#include "board.h"
#include "hal.h"
@@ -31,7 +31,7 @@
#include "dma2d.h"
#include "hal.h"
#include "lcd.h"
#include "opentx_types.h"
#include "edgetx_types.h"
static LTDC_HandleTypeDef hltdc;
static void* initialFrameBuffer = nullptr;
+1 -1
View File
@@ -33,7 +33,7 @@
#include "delays_driver.h"
#include "rtos.h"
#include "opentx_types.h"
#include "edgetx_types.h"
#include "debug.h"
#include <stdlib.h>
+1 -4
View File
@@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/
#ifndef _USB_DESCRIPTOR_H_
#define _USB_DESCRIPTOR_H_
#pragma once
#if defined(PCBX12S)
#define USB_NAME "FrSky Horus"
@@ -51,5 +50,3 @@
#define USB_MANUFACTURER 'F', 'r', 'S', 'k', 'y', ' ', ' ', ' ' /* 8 bytes */
#define USB_PRODUCT 'X', '1', '0', ' ', ' ', ' ', ' ', ' ' /* 8 Bytes */
#endif
#endif // _USB_DESCRIPTOR_H_
+1 -1
View File
@@ -23,7 +23,7 @@
#include "stm32_gpio.h"
#include "stm32_timer.h"
#include "opentx_types.h"
#include "edgetx_types.h"
#include "board.h"
#include "globals.h"
+1 -1
View File
@@ -22,7 +22,7 @@
#include "hal/gpio.h"
#include "stm32_gpio.h"
#include "opentx.h"
#include "edgetx.h"
#include "battery_driver.h"
#define __BATTERY_DRIVER_C__
+2 -5
View File
@@ -19,11 +19,10 @@
* GNU General Public License for more details.
*/
#ifndef _BOARD_H_
#define _BOARD_H_
#pragma once
#include "definitions.h"
#include "opentx_constants.h"
#include "edgetx_constants.h"
#include "board_common.h"
#include "hal.h"
@@ -240,5 +239,3 @@ void hapticOn(uint32_t pwmPercent);
bool touchPanelEventOccured();
struct TouchState touchPanelRead();
struct TouchState getInternalTouchState();
#endif // _BOARD_H_
+1 -4
View File
@@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/
#ifndef _HAL_H_
#define _HAL_H_
#pragma once
#define CPU_FREQ 168000000
@@ -476,5 +475,3 @@
#define LCD_DEPTH 16
#define LCD_CONTRAST_DEFAULT 20
#endif // _HAL_H_
+1 -1
View File
@@ -22,7 +22,7 @@
#include "stm32_hal_ll.h"
#include "stm32_hal.h"
#include "opentx_types.h"
#include "edgetx_types.h"
#include "dma2d.h"
#include "hal.h"
#include "hal/gpio.h"
+1 -10
View File
@@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/
#ifndef __LCD_DRIVER_H__
#define __LCD_DRIVER_H__
#pragma once
#define HBP ( 24 ) // TODO use names from FlySky
#define VBP ( 10 )
@@ -91,11 +90,3 @@ extern lcdSpiInitFucPtr lcdOnFunction;
#define VERTICAL_BACK_PORCH ( 6 )
#define VERTICAL_FRONT_PORCH ( 14 - VERTICAL_BACK_PORCH )
#endif
#endif
+2 -3
View File
@@ -71,8 +71,8 @@
*
******************************************************************************
*/
#ifndef __FT6X06_H
#define __FT6X06_H
#pragma once
#ifdef __cplusplus
extern "C" {
@@ -364,4 +364,3 @@ extern void TouchDriver( void );
#ifdef __cplusplus
}
#endif
#endif /* __FT6X06_H */
+1 -4
View File
@@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/
#ifndef _USB_DESCRIPTOR_H_
#define _USB_DESCRIPTOR_H_
#pragma once
#if (PCBREV == EL18)
#define USB_NAME "Flysky EL18"
@@ -31,5 +30,3 @@
#define USB_MANUFACTURER 'F', 'l', 'y', 's', 'k', 'y', ' ', ' ' /* 8 bytes */
#define USB_PRODUCT 'N', 'V', '1', '4', ' ', ' ', ' ', ' ' /* 8 Bytes */
#endif
#endif // _USB_DESCRIPTOR_H_
+1 -1
View File
@@ -23,7 +23,7 @@
#include "stm32_gpio.h"
#include "stm32_timer.h"
#include "opentx_types.h"
#include "edgetx_types.h"
#include "board.h"
#include "globals.h"
+1 -1
View File
@@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "edgetx.h"
#include "battery_driver.h"
#include "boards/generic_stm32/rgb_leds.h"
+2 -5
View File
@@ -19,11 +19,10 @@
* GNU General Public License for more details.
*/
#ifndef _BOARD_H_
#define _BOARD_H_
#pragma once
#include "definitions.h"
#include "opentx_constants.h"
#include "edgetx_constants.h"
#include "board_common.h"
#include "hal.h"
@@ -227,5 +226,3 @@ void hapticOn(uint32_t pwmPercent);
bool touchPanelEventOccured();
struct TouchState touchPanelRead();
struct TouchState getInternalTouchState();
#endif // _BOARD_H_
+1 -4
View File
@@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/
#ifndef _HAL_H_
#define _HAL_H_
#pragma once
#define CPU_FREQ 168000000
@@ -653,5 +652,3 @@
#define LCD_DEPTH 16
#define LCD_CONTRAST_DEFAULT 20
#endif // _HAL_H_
+1 -1
View File
@@ -21,7 +21,7 @@
#include "stm32_hal_ll.h"
#include "stm32_hal.h"
#include "opentx_types.h"
#include "edgetx_types.h"
#include "dma2d.h"
#include "hal.h"
#include "hal/gpio.h"
+1 -10
View File
@@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/
#ifndef __LCD_DRIVER_H__
#define __LCD_DRIVER_H__
#pragma once
#define HBP ( 24 ) // TODO use names from FlySky
#define VBP ( 10 )
@@ -75,11 +74,3 @@ extern lcdSpiInitFucPtr lcdOnFunction;
#define VERTICAL_BACK_PORCH ( 6 )
#define VERTICAL_FRONT_PORCH ( 14 - VERTICAL_BACK_PORCH )
#endif
#endif
+1 -4
View File
@@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/
#ifndef _USB_DESCRIPTOR_H_
#define _USB_DESCRIPTOR_H_
#pragma once
#if defined(RADIO_PL18EV)
#define USB_NAME "FlySky PL18EV"
@@ -31,5 +30,3 @@
#define USB_MANUFACTURER 'F', 'l', 'y', 'S', 'k', 'y', ' ', ' ' /* 8 bytes */
#define USB_PRODUCT 'P', 'L', '1', '8', ' ', ' ', ' ', ' ' /* 8 Bytes */
#endif
#endif // _USB_DESCRIPTOR_H_
+2 -2
View File
@@ -20,7 +20,7 @@
*/
#include "opentxsimulator.h"
#include "opentx.h"
#include "edgetx.h"
#include "simulcd.h"
#include "switches.h"
@@ -558,7 +558,7 @@ void OpenTxSimulator::checkOutputsChanged()
const static int16_t limit = 512 * 2;
qint32 tmpVal;
uint8_t i, idx;
const uint8_t phase = getFlightMode(); // opentx.cpp
const uint8_t phase = getFlightMode(); // edgetx.cpp
for (i=0; i < chansDim; i++) {
if (lastOutputs.chans[i] != channelOutputs[i] || m_resetOutputsData) {
+1 -4
View File
@@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/
#ifndef _OPENTX_SIMULATOR_H_
#define _OPENTX_SIMULATOR_H_
#pragma once
#include "simulatorinterface.h"
@@ -111,5 +110,3 @@ class DLLEXPORT OpenTxSimulator : public SimulatorInterface
bool m_stopRequested;
};
#endif // _OPENTX_SIMULATOR_H_
+1 -4
View File
@@ -30,8 +30,7 @@
THE SOFTWARE.
*/
#ifndef RS232_H
#define RS232_H
#pragma once
#ifdef __cplusplus
extern "C" {
@@ -151,5 +150,3 @@ extern "C" {
#ifdef __cplusplus
}
#endif
#endif // RS232_H
+1 -1
View File
@@ -26,7 +26,7 @@
#include <SDL.h>
#endif
#include "opentx.h"
#include "edgetx.h"
#include "simulcd.h"
#include "hal/adc_driver.h"
+1 -4
View File
@@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/
#ifndef _SIMPGMSPACE_H_
#define _SIMPGMSPACE_H_
#pragma once
#include <unistd.h>
#define sleep(x) usleep(1000*x)
@@ -94,5 +93,3 @@ void simuMain();
extern struct TouchState simTouchState;
extern bool simTouchOccured;
#endif
#endif // _SIMPGMSPACE_H_
+1 -1
View File
@@ -20,7 +20,7 @@
*/
#if defined(SIMU_DISKIO)
#include "opentx.h"
#include "edgetx.h"
#include "ff.h"
#include "diskio.h"
#include <time.h>
+1 -1
View File
@@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "edgetx.h"
const char * eepromFile = nullptr;
FILE * fp = nullptr;
+1 -1
View File
@@ -23,7 +23,7 @@
#include <string>
#include <vector>
#include <algorithm>
#include "opentx.h"
#include "edgetx.h"
#if defined(SIMU_USE_SDCARD) // rest of file is excluded otherwise
+2 -5
View File
@@ -19,10 +19,9 @@
* GNU General Public License for more details.
*/
#ifndef _SIMULCD_H_
#define _SIMULCD_H_
#pragma once
#include "opentx_types.h"
#include "edgetx_types.h"
#include "lcd.h"
extern int g_snapshot_idx;
@@ -34,5 +33,3 @@ extern pixel_t* simuLcdBuf;
extern pixel_t simuLcdBuf[DISPLAY_BUFFER_SIZE];
extern pixel_t displayBuf[DISPLAY_BUFFER_SIZE];
#endif
#endif // _SIMULCD_H_
@@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "edgetx.h"
#include "MultiProtoDefs.h"
bool setBindProtocolSelection()
+1 -1
View File
@@ -49,7 +49,7 @@
#endif
#if !defined(BOOT)
#include "opentx.h"
#include "edgetx.h"
#if defined(PXX1)
#include "pulses/pxx1.h"
#endif
+1 -1
View File
@@ -27,7 +27,7 @@
#include "hal/watchdog_driver.h"
#include "definitions.h"
#include "opentx_constants.h"
#include "edgetx_constants.h"
#include "board_common.h"
#if defined(ROTARY_ENCODER_NAVIGATION)
+1 -4
View File
@@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/
#ifndef _HAL_H_
#define _HAL_H_
#pragma once
#if defined(STM32F413xx)
#define CPU_FREQ 100000000
@@ -2774,5 +2773,3 @@
#define MIXER_SCHEDULER_TIMER_FREQ (PERI1_FREQUENCY * TIMER_MULT_APB1)
#define MIXER_SCHEDULER_TIMER_IRQn TIM8_BRK_TIM12_IRQn
#define MIXER_SCHEDULER_TIMER_IRQHandler TIM8_BRK_TIM12_IRQHandler
#endif // _HAL_H_
+1 -1
View File
@@ -31,7 +31,7 @@
#include "hal/abnormal_reboot.h"
#if !defined(BOOT)
#include "opentx.h"
#include "edgetx.h"
#endif
#if defined(OLED_SCREEN)
+1 -1
View File
@@ -22,7 +22,7 @@
#include "hal/gpio.h"
#include "stm32_gpio.h"
#include "opentx.h"
#include "edgetx.h"
#include "board.h"
#include "lcd.h"
+1 -4
View File
@@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/
#ifndef _USB_DESCRIPTOR_H_
#define _USB_DESCRIPTOR_H_
#pragma once
#if defined(RADIO_TX12) || defined(RADIO_TX12MK2)
#define USB_NAME "Radiomaster TX12"
@@ -91,5 +90,3 @@
#define USB_MANUFACTURER 'F', 'r', 'S', 'k', 'y', ' ', ' ', ' ' /* 8 bytes */
#define USB_PRODUCT 'T', 'a', 'r', 'a', 'n', 'i', 's', ' ' /* 8 Bytes */
#endif
#endif // _USB_DESCRIPTOR_H_