Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: more OTX to ETX housekeeping #5396

Merged
merged 4 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
851 changes: 0 additions & 851 deletions radio/releasenotes.txt

This file was deleted.

2 changes: 1 addition & 1 deletion radio/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ endif()

set(SRC
${SRC}
opentx.cpp
edgetx.cpp
functions.cpp
strhelpers.cpp
switches.cpp
Expand Down
2 changes: 1 addition & 1 deletion radio/src/analogs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "analogs.h"
#include "dataconstants.h"
#include "opentx_helpers.h"
#include "edgetx_helpers.h"

#include "hal/adc_driver.h"

Expand Down
2 changes: 1 addition & 1 deletion radio/src/audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <math.h>

#include "opentx.h"
#include "edgetx.h"
#include "strhelpers.h"
#include "switches.h"

Expand Down
7 changes: 2 additions & 5 deletions radio/src/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@
* GNU General Public License for more details.
*/

#ifndef _AUDIO_H_
#define _AUDIO_H_
#pragma once

#include <stddef.h>
#include <string.h>
#include "ff.h"
#include "opentx_types.h"
#include "edgetx_types.h"
#include "dataconstants.h"

/*
Expand Down Expand Up @@ -697,5 +696,3 @@ void referenceSystemAudioFiles();
void referenceModelAudioFiles();

bool isAudioFileReferenced(uint32_t i, char * filename/*at least AUDIO_FILENAME_MAXLEN+1 long*/);

#endif // _AUDIO_H_
2 changes: 1 addition & 1 deletion radio/src/bin_allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <stdlib.h>
#include <string.h>
#include "opentx.h"
#include "edgetx.h"
#include "bin_allocator.h"


Expand Down
5 changes: 1 addition & 4 deletions radio/src/bin_allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/

#ifndef _BIN_ALLOCATOR_H_
#define _BIN_ALLOCATOR_H_
#pragma once

#include "debug.h"

Expand Down Expand Up @@ -95,5 +94,3 @@ extern BinAllocator_slots2 slots2;
// wrapper for our BinAllocator for Lua
void *bin_l_alloc (void *ud, void *ptr, size_t osize, size_t nsize);
#endif //#if defined(USE_BIN_ALLOCATOR)

#endif // _BIN_ALLOCATOR_H_
2 changes: 1 addition & 1 deletion radio/src/bluetooth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/

#include <stdio.h>
#include "opentx.h"
#include "edgetx.h"
#include "io/frsky_firmware_update.h"
#include "bluetooth_driver.h"
#include "trainer.h"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/boards/generic_stm32/intmodule_heartbeat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "pulses/pxx.h"
#include "trainer.h"

#include "opentx.h"
#include "edgetx.h"
#include "pulses/pulses.h"

#if defined(PXX1)
Expand Down
2 changes: 1 addition & 1 deletion radio/src/boards/generic_stm32/rgb_leds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "stm32_pulse_driver.h"
#include "rgb_leds.h"
#include "hal.h"
#include "opentx.h"
#include "edgetx.h"

#if defined(LED_STRIP_GPIO)

Expand Down
2 changes: 1 addition & 1 deletion radio/src/boards/generic_stm32/sport_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include "hal.h"

#include "opentx.h" // g_eeGeneral
#include "edgetx.h" // g_eeGeneral

void sportUpdateInit()
{
Expand Down
2 changes: 1 addition & 1 deletion radio/src/buzzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/

#include "opentx.h"
#include "edgetx.h"

uint8_t g_beepCnt;
uint8_t beepAgain = 0;
Expand Down
6 changes: 1 addition & 5 deletions radio/src/buzzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/

#ifndef _BUZZER_H_
#define _BUZZER_H_
#pragma once

#if defined(BUZZER)
extern uint8_t beepAgainOrig;
Expand Down Expand Up @@ -118,6 +117,3 @@ inline void beep(uint8_t) { }
#define PLAY_MODEL_NAME()
#define START_SILENCE_PERIOD()
#endif /* !AUDIO */


#endif // _BUZZER_H_
5 changes: 1 addition & 4 deletions radio/src/chksize.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,11 @@
* GNU General Public License for more details.
*/

#ifndef CHKSIZE_H
#define CHKSIZE_H
#pragma once

#include <inttypes.h>

template <typename ToCheck, size_t expectedSize, size_t realSize = sizeof(ToCheck)>
void check_size() {
static_assert(expectedSize == realSize, "struct size changed");
}

#endif
2 changes: 1 addition & 1 deletion radio/src/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <FreeRTOS/include/FreeRTOS.h>
#include <FreeRTOS/include/stream_buffer.h>

#include "opentx.h"
#include "edgetx.h"
#include "timers_driver.h"
#include "hal/watchdog_driver.h"

Expand Down
5 changes: 1 addition & 4 deletions radio/src/cli.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/

#ifndef _CLI_H_
#define _CLI_H_
#pragma once

#include "hal/serial_driver.h"

Expand All @@ -29,5 +28,3 @@ void cliStart();

// Connect serial driver to CLI
void cliSetSerialDriver(void* ctx, const etx_serial_driver_t* drv);

#endif // _CLI_H_
5 changes: 1 addition & 4 deletions radio/src/crc.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/

#ifndef __CRC_H__
#define __CRC_H__
#pragma once

#include <inttypes.h>

Expand All @@ -34,5 +33,3 @@ extern const unsigned short * const crc16tab[2];
uint8_t crc8(const uint8_t * ptr, uint32_t len);
uint8_t crc8_BA(const uint8_t * ptr, uint32_t len);
uint16_t crc16(uint8_t index, const uint8_t * buf, uint32_t len, uint16_t start = 0);

#endif
2 changes: 1 addition & 1 deletion radio/src/curves.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/

#include "opentx.h"
#include "edgetx.h"

#if defined(LIBOPENUI)
#include "libopenui.h"
Expand Down
5 changes: 1 addition & 4 deletions radio/src/curves.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/

#ifndef _CURVES_H_
#define _CURVES_H_
#pragma once

enum BaseCurves {
CURVE_NONE,
Expand Down Expand Up @@ -48,5 +47,3 @@ int applyCurve(int x, CurveRef & curve);
int applyCurrentCurve(int x);

char *getCurveRefString(char *dest, size_t len, const CurveRef& curve);

#endif
2 changes: 1 addition & 1 deletion radio/src/datastructs_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "board.h"
#include "dataconstants.h"
#include "definitions.h"
#include "opentx_types.h"
#include "edgetx_types.h"
#include "globals.h"
#include "serial.h"
#include "usb_joystick.h"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/

#include "opentx.h"
#include "edgetx.h"
#include "stamp.h"
#include <stdarg.h>

Expand Down
6 changes: 1 addition & 5 deletions radio/src/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/

#ifndef _DEBUG_H_
#define _DEBUG_H_
#pragma once

#include <float.h>
#include "definitions.h"
Expand Down Expand Up @@ -415,6 +414,3 @@ extern const char * const debugTimerNames[DEBUG_TIMERS_COUNT];
#define DEBUG_TIMER_SAMPLE(timer)

#endif //#if defined(DEBUG_TIMERS)

#endif // _DEBUG_H_

5 changes: 1 addition & 4 deletions radio/src/definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/

#ifndef _DEFINITIONS_H_
#define _DEFINITIONS_H_
#pragma once

#include <inttypes.h>
#include <stdbool.h>
Expand Down Expand Up @@ -115,5 +114,3 @@
#define EXTERN_C_START
#define EXTERN_C_END
#endif

#endif // _DEFINITIONS_H_
2 changes: 1 addition & 1 deletion radio/src/dump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/

#include "opentx.h"
#include "edgetx.h"

#if defined(SIMU)
#define dumpPrintf(...) debugPrintf(__VA_ARGS__)
Expand Down
5 changes: 1 addition & 4 deletions radio/src/dump.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@
* GNU General Public License for more details.
*/

#ifndef _DUMP_H_
#define _DUMP_H_
#pragma once

#if defined(DEBUG) || defined(CLI)
void dump(const void * data, unsigned int size);
#else
#define dump(data, size)
#endif

#endif // _DUMP_H_
2 changes: 1 addition & 1 deletion radio/src/opentx.cpp → radio/src/edgetx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "stm32_hal_ll.h"
#endif

#include "opentx.h"
#include "edgetx.h"
#include "io/frsky_firmware_update.h"
#include "hal/adc_driver.h"
#include "hal/switch_driver.h"
Expand Down
4 changes: 2 additions & 2 deletions radio/src/opentx.h → radio/src/edgetx.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

#include <stdlib.h>
#include "definitions.h"
#include "opentx_types.h"
#include "opentx_helpers.h"
#include "edgetx_types.h"
#include "edgetx_helpers.h"
#include "touch.h"
#include "switches.h"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 1 addition & 4 deletions radio/src/fifo.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/

#ifndef _FIFO_H_
#define _FIFO_H_
#pragma once

#include <inttypes.h>

Expand Down Expand Up @@ -114,5 +113,3 @@ class Fifo
return (idx + 1) & (N - 1);
}
};

#endif // _FIFO_H_
2 changes: 1 addition & 1 deletion radio/src/functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/

#include "opentx.h"
#include "edgetx.h"
#include "switches.h"
#include "boards/generic_stm32/rgb_leds.h"

Expand Down
7 changes: 2 additions & 5 deletions radio/src/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
* GNU General Public License for more details.
*/

#ifndef _GLOBALS_H_
#define _GLOBALS_H_
#pragma once

#include "definitions.h"
#include "dataconstants.h"
#include "opentx_types.h"
#include "edgetx_types.h"

PACK(struct GlobalData {
uint8_t externalAntennaEnabled:1;
Expand Down Expand Up @@ -97,5 +96,3 @@ extern uint8_t beepAgain;
extern uint16_t lightOffCounter;
extern uint8_t flashCounter;
extern uint8_t mixWarning;

#endif
2 changes: 1 addition & 1 deletion radio/src/gps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
*/

#include "opentx.h"
#include "edgetx.h"
#include "gps.h"
#include "gps_nmea.h"
#include "gps_ubx.h"
Expand Down
14 changes: 6 additions & 8 deletions radio/src/gps.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@
* GNU General Public License for more details.
*/

#ifndef _GPS_H_
#define _GPS_H_
#pragma once

#include "opentx.h"
#include "edgetx.h"
#include <inttypes.h>

struct gpsdata_t
Expand Down Expand Up @@ -50,14 +49,13 @@ extern uint8_t gpsTraceEnabled;
#define GPS_PROTOCOL_UBX 2

// Setup GPS serial port
void gpsSetSerialDriver(void* ctx, const etx_serial_driver_t* drv, int protocol);
void gpsSetSerialDriver(void* ctx, const etx_serial_driver_t* drv,
int protocol);

// Periodic processing
void gpsWakeup();

// Send a 0-terminated frame
void gpsSendFrame(const char * frame);
void gpsSendFrame(const char* frame);

uint32_t GPS_coord_to_degrees(const char * coordinateString);

#endif // _GPS_H_
uint32_t GPS_coord_to_degrees(const char* coordinateString);
Loading