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

Changes in stamp

This commit is contained in:
bsongis 2012-01-19 20:53:38 +00:00
parent 6266898738
commit 48e0a262de
4 changed files with 17 additions and 20 deletions

View file

@ -229,8 +229,6 @@ ifneq ($(SPLASH), NO)
CPPDEFS += -DSPLASH
endif
MODS =
ifeq ($(PCB), STD)
# STD PCB, so ...
@ -621,7 +619,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\" open9x.h | cut -d\ -f3 | egrep -o \"[[:digit:]]\""}
MAJ_VER = ${shell sh -c "grep \"MAJ_VERS\" open9x.h | cut -d\ -f3 | egrep -o \"[[:digit:]]\""}
MIN_VER = ${shell sh -c "grep \"MIN_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))}')
@ -657,10 +656,9 @@ stamp:
@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
@echo "#define VERS_STR \"$(MAJ_VER).$(MIN_VER)-$(THEUSER)\"" >> stamp-open9x.h
@echo "#define SVN_STR \"$(BUILD_DIR)-r$(REV)\"" >> stamp-open9x.h
@echo "#define MOD_STR \"$(MODS)\"" >> stamp-open9x.h
@cat stamp-open9x.h
font.lbm: font_6x1.xbm

View file

@ -429,11 +429,10 @@ void menuProcDiagVers(uint8_t event)
{
SIMPLE_MENU(STR_MENUVERSION, menuTabDiag, e_Vers, 1);
lcd_puts_P(0, 2*FH,stamp4 );
lcd_puts_P(0, 3*FH,stamp1 );
lcd_puts_P(0, 4*FH,stamp5 );
lcd_puts_P(0, 5*FH,stamp2 );
lcd_puts_P(0, 6*FH,stamp3 );
lcd_puts_P(0, 2*FH,stamp1 );
lcd_puts_P(0, 3*FH,stamp2 );
lcd_puts_P(0, 4*FH,stamp3 );
lcd_puts_P(0, 5*FH,stamp4 );
lcd_puts_P(0, 7*FH,STR_EEPROMV);
lcd_outdezAtt(8*FW, 7*FH, g_eeGeneral.myVers, LEFT);
}

View file

@ -22,8 +22,8 @@
#ifndef gruvin9x_h
#define gruvin9x_h
#define VERS 2
#define SUB_VERS 0
#define MAJ_VERS 2
#define MIN_VERS 0
#include <inttypes.h>
#include <string.h>

View file

@ -4,10 +4,10 @@
#define STR2(s) #s
#define DEFNUMSTR(s) STR2(s)
const char APM stamp1[] = "VERS: V" DEFNUMSTR(VERS) "." DEFNUMSTR(TAG_VERS);
const char APM stamp2[] = "DATE: " DATE_STR;
const char APM stamp3[] = "TIME: " TIME_STR;
const char APM stamp4[] = " SVN: " SVN_VERS;
const char APM stamp5[] = " BLD: " DEFNUMSTR(BUILD_NUM);
const char APM stamp1[] = "VERS: V" VERS_STR;
const char APM stamp2[] = " SVN: " SVN_STR;
const char APM stamp3[] = "DATE: " DATE_STR;
const char APM stamp4[] = "TIME: " TIME_STR;
const char APM stamp5[] = " MOD: " MOD_STR;