1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 08:15:17 +03:00

Some rename to open9x

This commit is contained in:
bsongis 2012-01-18 21:39:45 +00:00
parent 9cdf70f9d8
commit c651917da8
23 changed files with 98 additions and 34 deletions

View file

@ -139,13 +139,13 @@ F_CPU = 16000000
FORMAT = ihex
# Target file name (without extension).
TARGET = gruvin9x
TARGET = open9x
# Object files directory
OBJDIR = obj
# 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)
CPPSRC += jeti.cpp
@ -572,7 +572,6 @@ REMOVEDIR = rm -rf
COPY = cp
WINSHELL = cmd
# th9x/gruvin9x-specific
XBM2LBM = ruby ../util/xbm2lbm.rb
AREV = $(shell sh -c "cat .svn/entries | sed -n '4p'")
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_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:]]\""}
ABUILD_NUM = ${shell sh -c "grep \"BUILD_NUM\" stamp-gruvin9x.h | 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-open9x.h | egrep -o \"[[:digit:]]+\""}
BUILD_NUM = $(shell echo $$(( $(ABUILD_NUM) + 1 )))
BUILD_DIR = $(shell pwd | awk -F'/' '{print $$((NF-1))}')
ifeq "$(USER)" "bryan"
@ -651,14 +650,14 @@ stamp:
@echo $(CPPSRC)
@echo "Generate Version-stamp:"
@echo "//Automatically generated file (Makefile) - do not edit" > stamp-gruvin9x.h
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" >> stamp-gruvin9x.h
@echo "#define TIME_STR \"`date +%H:%I:%S`\"" >> stamp-gruvin9x.h
@echo "#define TAG_VERS $(SUB_VER)-$(THEUSER)" >> stamp-gruvin9x.h
@echo "#define SVN_VERS \"$(BUILD_DIR)-r$(REV)\"" >> stamp-gruvin9x.h
@echo "#define MOD_VERS \"$(MODS)\"" >> stamp-gruvin9x.h
@echo "#define BUILD_NUM $(BUILD_NUM)" >> stamp-gruvin9x.h
@cat stamp-gruvin9x.h
@echo "//Automatically generated file (Makefile) - do not edit" > stamp-open9x.h
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" >> stamp-open9x.h
@echo "#define TIME_STR \"`date +%H:%I:%S`\"" >> stamp-open9x.h
@echo "#define TAG_VERS $(SUB_VER)-$(THEUSER)" >> stamp-open9x.h
@echo "#define SVN_VERS \"$(BUILD_DIR)-r$(REV)\"" >> stamp-open9x.h
@echo "#define MOD_VERS \"$(MODS)\"" >> stamp-open9x.h
@echo "#define BUILD_NUM $(BUILD_NUM)" >> stamp-open9x.h
@cat stamp-open9x.h
font.lbm: font_6x1.xbm
@echo

View file

@ -26,7 +26,7 @@
/* are platform dependent. */
/*-----------------------------------------------------------------------*/
#include "gruvin9x.h"
#include "open9x.h"
#include "diskio.h"
/* Definitions for MMC/SDC command */

View file

@ -19,7 +19,7 @@
*
*/
#include "gruvin9x.h"
#include "open9x.h"
uint16_t eeprom_pointer;
const char* eeprom_buffer_data;

View file

@ -20,7 +20,7 @@
#define PROGRESS_VERTICAL_BAR
#include "gruvin9x.h"
#include "open9x.h"
#include "stdio.h"
#include "inttypes.h"
#include "string.h"

View file

@ -18,7 +18,7 @@
*
*/
#include "gruvin9x.h"
#include "open9x.h"
// Enumerate FrSky packet codes
#define LINKPKT 0xfe

View file

@ -20,7 +20,7 @@
*/
#include <gtest/gtest.h>
#include "gruvin9x.h"
#include "open9x.h"
uint16_t anaIn(uint8_t chan)
{

View file

@ -18,7 +18,7 @@
*/
#include "jeti.h"
#include "gruvin9x.h"
#include "open9x.h"
uint16_t jeti_keys = JETI_KEY_NOCHANGE;
uint8_t JetiBuffer[32]; // 32 characters

View file

@ -19,7 +19,7 @@
#define jeti_h
#include "gruvin9x.h"
#include "open9x.h"
#define JETI_KEY_LEFT 0x70
#define JETI_KEY_RIGHT 0xe0

View file

@ -22,7 +22,7 @@
#ifndef lcd_h
#define lcd_h
#include "gruvin9x.h"
#include "open9x.h"
#define DISPLAY_W 128
#define DISPLAY_H 64

View file

@ -18,7 +18,7 @@
*
*/
#include "gruvin9x.h"
#include "open9x.h"
#include "ff.h"
// "/G9XLOGS/M00_000.TXT\0" max required length = 21

View file

@ -20,7 +20,7 @@
*/
#include "gruvin9x.h"
#include "open9x.h"
#include "templates.h"
#include "menus.h"

View file

@ -23,7 +23,7 @@
#define menus_h
#include <inttypes.h>
#include "gruvin9x.h"
#include "open9x.h"
#define IS_THROTTLE(x) (((2-(g_eeGeneral.stickMode&1)) == x) && (x<4))

View file

@ -1,4 +1,4 @@
#include "gruvin9x.h"
#include "open9x.h"
#ifdef TRANSLATIONS_FR
#include "translations/fr.h"

View file

@ -19,7 +19,7 @@
*
*/
#include "gruvin9x.h"
#include "open9x.h"
#ifdef SPLASH
prog_uchar APM spsMarker[] = { "SPS" };

View file

@ -19,7 +19,7 @@
*
*/
#include "gruvin9x.h"
#include "open9x.h"
#include "templates.h"
RlcFile theFile; //used for any file operation

View file

@ -19,7 +19,7 @@
*
*/
#include "gruvin9x.h"
#include "open9x.h"
#ifdef CTP1009
uint16_t pulses2MHz[50] = {0};

View file

@ -22,7 +22,7 @@
/*--------------------------------------------------------------------------*/
/* RTC controls */
#include "gruvin9x.h"
#include "open9x.h"
#if defined (PCBV4)
#define SCL_LOW() DDRD |= 0x01 /* SCL = LOW */

View file

@ -22,7 +22,7 @@
#include <ctype.h>
#include "simpgmspace.h"
#include "lcd.h"
#include "gruvin9x.h"
#include "open9x.h"
#include "menus.h"
volatile uint8_t pinb=0, pinc=0xff, pind, pine=0xff, ping=0xff, pinh=0xff, pinj=0xff, pinl=0;

View file

@ -25,7 +25,7 @@
#include <unistd.h>
#include "simpgmspace.h"
#include "fxkeys.h"
#include "gruvin9x.h"
#include "open9x.h"
#include "menus.h"
#include <time.h>
#include <ctype.h>

View file

@ -1,5 +1,5 @@
#include "gruvin9x.h"
#include "stamp-gruvin9x.h"
#include "open9x.h"
#include "stamp-open9x.h"
#define STR2(s) #s
#define DEFNUMSTR(s) STR2(s)

View file

@ -46,7 +46,7 @@
*
*/
#include "gruvin9x.h"
#include "open9x.h"
#include "templates.h"
const char stn1[] APM = "Simple 4-CH";

65
util/parse.py Normal file
View 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()