mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-23 16:25:12 +03:00
Some rename to open9x
This commit is contained in:
parent
9cdf70f9d8
commit
c651917da8
23 changed files with 98 additions and 34 deletions
25
src/Makefile
25
src/Makefile
|
@ -139,13 +139,13 @@ F_CPU = 16000000
|
||||||
FORMAT = ihex
|
FORMAT = ihex
|
||||||
|
|
||||||
# Target file name (without extension).
|
# Target file name (without extension).
|
||||||
TARGET = gruvin9x
|
TARGET = open9x
|
||||||
|
|
||||||
# Object files directory
|
# Object files directory
|
||||||
OBJDIR = obj
|
OBJDIR = obj
|
||||||
|
|
||||||
# List C++ source files here. (C dependencies are automatically generated.)
|
# List C++ source files here. (C dependencies are automatically generated.)
|
||||||
CPPSRC = gruvin9x.cpp pulses.cpp stamp.cpp menus.cpp model_menus.cpp general_menus.cpp main_views.cpp statistics_views.cpp pers.cpp file.cpp lcd.cpp drivers.cpp o9xstrings.cpp
|
CPPSRC = open9x.cpp pulses.cpp stamp.cpp menus.cpp model_menus.cpp general_menus.cpp main_views.cpp statistics_views.cpp pers.cpp file.cpp lcd.cpp drivers.cpp o9xstrings.cpp
|
||||||
|
|
||||||
ifeq ($(EXT), JETI)
|
ifeq ($(EXT), JETI)
|
||||||
CPPSRC += jeti.cpp
|
CPPSRC += jeti.cpp
|
||||||
|
@ -572,7 +572,6 @@ REMOVEDIR = rm -rf
|
||||||
COPY = cp
|
COPY = cp
|
||||||
WINSHELL = cmd
|
WINSHELL = cmd
|
||||||
|
|
||||||
# th9x/gruvin9x-specific
|
|
||||||
XBM2LBM = ruby ../util/xbm2lbm.rb
|
XBM2LBM = ruby ../util/xbm2lbm.rb
|
||||||
AREV = $(shell sh -c "cat .svn/entries | sed -n '4p'")
|
AREV = $(shell sh -c "cat .svn/entries | sed -n '4p'")
|
||||||
REV = $(shell echo $$(( $(AREV) + 1 )))
|
REV = $(shell echo $$(( $(AREV) + 1 )))
|
||||||
|
@ -618,8 +617,8 @@ ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
|
||||||
ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS) $(AVRGCCFLAGS)
|
ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS) $(AVRGCCFLAGS)
|
||||||
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
|
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
|
||||||
|
|
||||||
SUB_VER = ${shell sh -c "grep \"SUB_VERS\" gruvin9x.h | cut -d\ -f3 | egrep -o \"[[:digit:]]\""}
|
SUB_VER = ${shell sh -c "grep \"SUB_VERS\" open9x.h | cut -d\ -f3 | egrep -o \"[[:digit:]]\""}
|
||||||
ABUILD_NUM = ${shell sh -c "grep \"BUILD_NUM\" stamp-gruvin9x.h | egrep -o \"[[:digit:]]+\""}
|
ABUILD_NUM = ${shell sh -c "grep \"BUILD_NUM\" stamp-open9x.h | egrep -o \"[[:digit:]]+\""}
|
||||||
BUILD_NUM = $(shell echo $$(( $(ABUILD_NUM) + 1 )))
|
BUILD_NUM = $(shell echo $$(( $(ABUILD_NUM) + 1 )))
|
||||||
BUILD_DIR = $(shell pwd | awk -F'/' '{print $$((NF-1))}')
|
BUILD_DIR = $(shell pwd | awk -F'/' '{print $$((NF-1))}')
|
||||||
ifeq "$(USER)" "bryan"
|
ifeq "$(USER)" "bryan"
|
||||||
|
@ -651,14 +650,14 @@ stamp:
|
||||||
@echo $(CPPSRC)
|
@echo $(CPPSRC)
|
||||||
|
|
||||||
@echo "Generate Version-stamp:"
|
@echo "Generate Version-stamp:"
|
||||||
@echo "//Automatically generated file (Makefile) - do not edit" > stamp-gruvin9x.h
|
@echo "//Automatically generated file (Makefile) - do not edit" > stamp-open9x.h
|
||||||
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" >> stamp-gruvin9x.h
|
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" >> stamp-open9x.h
|
||||||
@echo "#define TIME_STR \"`date +%H:%I:%S`\"" >> stamp-gruvin9x.h
|
@echo "#define TIME_STR \"`date +%H:%I:%S`\"" >> stamp-open9x.h
|
||||||
@echo "#define TAG_VERS $(SUB_VER)-$(THEUSER)" >> stamp-gruvin9x.h
|
@echo "#define TAG_VERS $(SUB_VER)-$(THEUSER)" >> stamp-open9x.h
|
||||||
@echo "#define SVN_VERS \"$(BUILD_DIR)-r$(REV)\"" >> stamp-gruvin9x.h
|
@echo "#define SVN_VERS \"$(BUILD_DIR)-r$(REV)\"" >> stamp-open9x.h
|
||||||
@echo "#define MOD_VERS \"$(MODS)\"" >> stamp-gruvin9x.h
|
@echo "#define MOD_VERS \"$(MODS)\"" >> stamp-open9x.h
|
||||||
@echo "#define BUILD_NUM $(BUILD_NUM)" >> stamp-gruvin9x.h
|
@echo "#define BUILD_NUM $(BUILD_NUM)" >> stamp-open9x.h
|
||||||
@cat stamp-gruvin9x.h
|
@cat stamp-open9x.h
|
||||||
|
|
||||||
font.lbm: font_6x1.xbm
|
font.lbm: font_6x1.xbm
|
||||||
@echo
|
@echo
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
/* are platform dependent. */
|
/* are platform dependent. */
|
||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
#include "diskio.h"
|
#include "diskio.h"
|
||||||
|
|
||||||
/* Definitions for MMC/SDC command */
|
/* Definitions for MMC/SDC command */
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
|
|
||||||
uint16_t eeprom_pointer;
|
uint16_t eeprom_pointer;
|
||||||
const char* eeprom_buffer_data;
|
const char* eeprom_buffer_data;
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#define PROGRESS_VERTICAL_BAR
|
#define PROGRESS_VERTICAL_BAR
|
||||||
|
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
#include "stdio.h"
|
#include "stdio.h"
|
||||||
#include "inttypes.h"
|
#include "inttypes.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
|
|
||||||
// Enumerate FrSky packet codes
|
// Enumerate FrSky packet codes
|
||||||
#define LINKPKT 0xfe
|
#define LINKPKT 0xfe
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
|
|
||||||
uint16_t anaIn(uint8_t chan)
|
uint16_t anaIn(uint8_t chan)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "jeti.h"
|
#include "jeti.h"
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
|
|
||||||
uint16_t jeti_keys = JETI_KEY_NOCHANGE;
|
uint16_t jeti_keys = JETI_KEY_NOCHANGE;
|
||||||
uint8_t JetiBuffer[32]; // 32 characters
|
uint8_t JetiBuffer[32]; // 32 characters
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#define jeti_h
|
#define jeti_h
|
||||||
|
|
||||||
|
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
|
|
||||||
#define JETI_KEY_LEFT 0x70
|
#define JETI_KEY_LEFT 0x70
|
||||||
#define JETI_KEY_RIGHT 0xe0
|
#define JETI_KEY_RIGHT 0xe0
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#ifndef lcd_h
|
#ifndef lcd_h
|
||||||
#define lcd_h
|
#define lcd_h
|
||||||
|
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
|
|
||||||
#define DISPLAY_W 128
|
#define DISPLAY_W 128
|
||||||
#define DISPLAY_H 64
|
#define DISPLAY_H 64
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
#include "ff.h"
|
#include "ff.h"
|
||||||
|
|
||||||
// "/G9XLOGS/M00_000.TXT\0" max required length = 21
|
// "/G9XLOGS/M00_000.TXT\0" max required length = 21
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
#include "templates.h"
|
#include "templates.h"
|
||||||
#include "menus.h"
|
#include "menus.h"
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#define menus_h
|
#define menus_h
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
|
|
||||||
#define IS_THROTTLE(x) (((2-(g_eeGeneral.stickMode&1)) == x) && (x<4))
|
#define IS_THROTTLE(x) (((2-(g_eeGeneral.stickMode&1)) == x) && (x<4))
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
|
|
||||||
#ifdef TRANSLATIONS_FR
|
#ifdef TRANSLATIONS_FR
|
||||||
#include "translations/fr.h"
|
#include "translations/fr.h"
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
|
|
||||||
#ifdef SPLASH
|
#ifdef SPLASH
|
||||||
prog_uchar APM spsMarker[] = { "SPS" };
|
prog_uchar APM spsMarker[] = { "SPS" };
|
|
@ -19,7 +19,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
#include "templates.h"
|
#include "templates.h"
|
||||||
|
|
||||||
RlcFile theFile; //used for any file operation
|
RlcFile theFile; //used for any file operation
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
|
|
||||||
#ifdef CTP1009
|
#ifdef CTP1009
|
||||||
uint16_t pulses2MHz[50] = {0};
|
uint16_t pulses2MHz[50] = {0};
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
/* RTC controls */
|
/* RTC controls */
|
||||||
|
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
|
|
||||||
#if defined (PCBV4)
|
#if defined (PCBV4)
|
||||||
#define SCL_LOW() DDRD |= 0x01 /* SCL = LOW */
|
#define SCL_LOW() DDRD |= 0x01 /* SCL = LOW */
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include "simpgmspace.h"
|
#include "simpgmspace.h"
|
||||||
#include "lcd.h"
|
#include "lcd.h"
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
#include "menus.h"
|
#include "menus.h"
|
||||||
|
|
||||||
volatile uint8_t pinb=0, pinc=0xff, pind, pine=0xff, ping=0xff, pinh=0xff, pinj=0xff, pinl=0;
|
volatile uint8_t pinb=0, pinc=0xff, pind, pine=0xff, ping=0xff, pinh=0xff, pinj=0xff, pinl=0;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "simpgmspace.h"
|
#include "simpgmspace.h"
|
||||||
#include "fxkeys.h"
|
#include "fxkeys.h"
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
#include "menus.h"
|
#include "menus.h"
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
#include "stamp-gruvin9x.h"
|
#include "stamp-open9x.h"
|
||||||
|
|
||||||
#define STR2(s) #s
|
#define STR2(s) #s
|
||||||
#define DEFNUMSTR(s) STR2(s)
|
#define DEFNUMSTR(s) STR2(s)
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gruvin9x.h"
|
#include "open9x.h"
|
||||||
#include "templates.h"
|
#include "templates.h"
|
||||||
|
|
||||||
const char stn1[] APM = "Simple 4-CH";
|
const char stn1[] APM = "Simple 4-CH";
|
||||||
|
|
65
util/parse.py
Normal file
65
util/parse.py
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
filename = sys.argv[1]
|
||||||
|
print filename
|
||||||
|
fr = file(filename)
|
||||||
|
fw = file(filename+".new", "w")
|
||||||
|
ew = file(filename+".en", "w")
|
||||||
|
hw = file(filename+".stringsh", "w")
|
||||||
|
cw = file(filename+".stringsc", "w")
|
||||||
|
|
||||||
|
replacements = {}
|
||||||
|
|
||||||
|
for line in fr.readlines():
|
||||||
|
pos_pstr = line.find("PSTR(\"")
|
||||||
|
MENU = False
|
||||||
|
if pos_pstr < 0:
|
||||||
|
pos_pstr = line.find("MENU(\"")
|
||||||
|
MENU = True
|
||||||
|
while pos_pstr >= 0:
|
||||||
|
# print line,
|
||||||
|
if MENU:
|
||||||
|
pos_endparenthesis = line.find('"', pos_pstr+7)
|
||||||
|
else:
|
||||||
|
pos_endparenthesis = line.find("\")", pos_pstr)
|
||||||
|
str = line[pos_pstr+6:pos_endparenthesis]
|
||||||
|
|
||||||
|
str_rep = "STR_"+str.upper()
|
||||||
|
for s in (" ", ".", "[", "]", "-", "!", "/", ")", "(", "%", "+", ":"):
|
||||||
|
str_rep = str_rep.replace(s, "")
|
||||||
|
|
||||||
|
if "14" in str or "32" in str or "@" in str or len(str_rep) <= 5:
|
||||||
|
pos_pstr = -1
|
||||||
|
else:
|
||||||
|
if MENU:
|
||||||
|
glob_str = line[pos_pstr+5:pos_endparenthesis+1]
|
||||||
|
str_rep = "STR_MENU"+str.upper()
|
||||||
|
else:
|
||||||
|
glob_str = line[pos_pstr:pos_endparenthesis+2]
|
||||||
|
str_rep = "STR_"+str.upper()
|
||||||
|
for s in (" ", ".", "[", "]", "-", "!", "/", ")", "(", "%", "+", ":"):
|
||||||
|
str_rep = str_rep.replace(s, "")
|
||||||
|
|
||||||
|
line = line.replace(glob_str, str_rep)
|
||||||
|
|
||||||
|
if str_rep in replacements.keys():
|
||||||
|
if replacements[str_rep] != str:
|
||||||
|
print "!!!!! NON !!!!!"
|
||||||
|
else:
|
||||||
|
replacements[str_rep] = str
|
||||||
|
print glob_str, "=>", str, str_rep
|
||||||
|
ew.write("#define " + str_rep[1:] + " "*(17-len(str_rep)) + '"%s"\n' % str)
|
||||||
|
hw.write("extern const PROGMEM char %s[];\n" % str_rep)
|
||||||
|
cw.write("const prog_char APM %s[] = %s;\n" % (str_rep, str_rep[1:]))
|
||||||
|
|
||||||
|
pos_pstr = line.find("PSTR(\"")
|
||||||
|
|
||||||
|
fw.write(line)
|
||||||
|
|
||||||
|
fw.close()
|
||||||
|
ew.close()
|
||||||
|
hw.close()
|
||||||
|
cw.close()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue