diff --git a/src/Makefile b/src/Makefile index 70286e2da..274116009 100644 --- a/src/Makefile +++ b/src/Makefile @@ -29,7 +29,8 @@ #gruvin: PCB version -- OVERRIDES the following settings if not STD # Values: STD, V3, V4 -PCB = V3 +PCB = V4 +#NOTE!: V4 adds to V3, such that both PCBV3 and PCBV4 get defined # Following options for PCB=STD only (ignored otherwise) ... @@ -96,7 +97,7 @@ TARGET = gruvin9x OBJDIR = obj # List C++ source files here. (C dependencies are automatically generated.) -CPPSRC = gruvin9x.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 templates.cpp +CPPSRC = gruvin9x.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 ifeq ($(EXT), JETI) CPPSRC += jeti.cpp @@ -168,6 +169,11 @@ ifeq ($(PCB), STD) # STD PCB, so ... CPPDEFS += -DPCBSTD +# If Hardware PPM mode ( PB0<->BP7) switch the Backlight output with the original PPM to use hardware facility to generate precise PPM (hardware mods) +# G: TODO This prevents HARDPPM being used with FRSKY. HARDPPM needs its own option XXX + ifeq ($(EXT), HARDPPM) + CPPDEFS += -DPPMPB7_HARDWARE + endif # If JETI-Support is enabled ifeq ($(EXT), JETI) @@ -210,7 +216,7 @@ else CPPDEFS += -DPCBV3 -DFRSKY -DBEEPSPKR endif ifeq ($(PCB), V4) - CPPDEFS += -DPCBV4 -DFRSKY -DBEEPSPKR + CPPDEFS += -DPCBV3 -DPCBV4 -DFRSKY -DBEEPSPKR endif endif @@ -231,6 +237,7 @@ endif ifeq ($(TEMPLATES), YES) CPPDEFS += -DTEMPLATES + CPPSRC += templates.cpp endif @@ -845,6 +852,6 @@ gtest_main.a : gtest-all.o gtest_main.o # gtest_main.a, depending on whether it defines its own main() # function. -gtests: $(CPPSRC) gtests.cpp simpgmspace.cpp gtest_main.a +gtests: $(CPPSRC) gtests.cpp simpgmspace.cpp *.h gtest_main.a g++ $(CPPSRC) gtests.cpp simpgmspace.cpp $(CPPFLAGS) -I$(GTEST_DIR) $(ARCH) -o gtests -lpthread -MD -DSIMU gtest_main.a - \ No newline at end of file + diff --git a/src/drivers.cpp b/src/drivers.cpp index cda701c5f..05b96dd41 100644 --- a/src/drivers.cpp +++ b/src/drivers.cpp @@ -231,6 +231,31 @@ void Key::input(bool val, EnumKeys enuk) bool keyState(EnumKeys enuk) { if(enuk < (int)DIM(keys)) return keys[enuk].state() ? 1 : 0; + +#if defined (PCBV4) + switch(enuk){ + case SW_ElevDR : return PINC & (1<> 3; + +# else + +// Gruvin's PCBv2.14/v3 key scanning ... #define KEY_Y0 1 // EXIT / MENU #define KEY_Y1 2 // LEFT / RIGHT / UP / DOWN #define KEY_Y2 4 // LV_Trim_Up / Down / LH_Trim_Up / Down @@ -338,6 +373,8 @@ void per10ms() in = keyDown(); // in gruvin9x.cpp +# endif // PCBV4 + #else uint8_t in = ~PINB; #endif @@ -348,8 +385,22 @@ void per10ms() keys[enuk].input(in & (1<> 4); PORTD = 0xFF; +# endif #else in = ~PIND; // Legacy support for USART1 free hardware mod [DEPRECATED] -#if defined(USART1FREED) +# if defined(USART1FREED) // mask out original INP_D_TRM_LV_UP and INP_D_TRM_LV_DWN bits in &= ~((1< 10ms intervals - if ( FrskyAlarmSendState ) - FRSKY10mspoll() ; + + // TODO why sending only every 50ms + // Attempt to transmit any waiting Fr-Sky alarm set packets every 50ms (subject to packet buffer availability) + static uint8_t FrskyDelay = 5; + if (FrskyAlarmSendState && (--FrskyDelay == 0)) + { + FrskyDelay = 5; // 50ms + FRSKY10mspoll(); + } if (frskyStreaming > 0) frskyStreaming--; diff --git a/src/eeprom_v3.h b/src/eeprom_v3.h index 1c842200e..5eeed2f24 100644 --- a/src/eeprom_v3.h +++ b/src/eeprom_v3.h @@ -1,3 +1,24 @@ +/* + * Authors (alphabetical order) + * - Bertrand Songis + * - Bryan J. Rentoul (Gruvin) + * + * gruvin9x is based on code named er9x by + * Author - Erez Raviv , which is in turn + * was based on the original (and ongoing) project by Thomas Husterer, + * th9x -- http://code.google.com/p/th9x/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + #ifndef eepromv3_h #define eepromv3_h diff --git a/src/eeprom_v4.h b/src/eeprom_v4.h index 8ba2af781..817c52d93 100644 --- a/src/eeprom_v4.h +++ b/src/eeprom_v4.h @@ -1,3 +1,24 @@ +/* + * Authors (alphabetical order) + * - Bertrand Songis + * - Bryan J. Rentoul (Gruvin) + * + * gruvin9x is based on code named er9x by + * Author - Erez Raviv , which is in turn + * was based on the original (and ongoing) project by Thomas Husterer, + * th9x -- http://code.google.com/p/th9x/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + #ifndef eepromv4_h #define eepromv4_h diff --git a/src/ff.cpp b/src/ff.cpp index 3b5e53fa0..f973d2eea 100644 --- a/src/ff.cpp +++ b/src/ff.cpp @@ -1,3 +1,24 @@ +/* + * Authors (alphabetical order) + * - Bertrand Songis + * - Bryan J. Rentoul (Gruvin) + * + * gruvin9x is based on code named er9x by + * Author - Erez Raviv , which is in turn + * was based on the original (and ongoing) project by Thomas Husterer, + * th9x -- http://code.google.com/p/th9x/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + /*----------------------------------------------------------------------------/ / FatFs - FAT file system module R0.08a (C)ChaN, 2010 /-----------------------------------------------------------------------------/ @@ -3518,6 +3539,34 @@ FRESULT f_mkfs ( #endif /* _USE_MKFS && !_FS_READONLY */ +#if _USE_LFN == 3 /* LFN with a working buffer on the heap */ +/*------------------------------------------------------------------------*/ +/* Allocate a memory block */ +/*------------------------------------------------------------------------*/ +/* If a NULL is returned, the file function fails with FR_NOT_ENOUGH_CORE. + */ + +void* ff_memalloc ( /* Returns pointer to the allocated memory block */ + UINT size /* Number of bytes to allocate */ + ) +{ + return malloc(size); +} + + +/*------------------------------------------------------------------------*/ +/* Free a memory block */ +/*------------------------------------------------------------------------*/ + +void ff_memfree( + void* mblock /* Pointer to the memory block to free */ + ) +{ + free(mblock); +} + +#endif + diff --git a/src/ff.h b/src/ff.h index e348efe2a..cb6687076 100644 --- a/src/ff.h +++ b/src/ff.h @@ -1,3 +1,24 @@ +/* + * Authors (alphabetical order) + * - Bertrand Songis + * - Bryan J. Rentoul (Gruvin) + * + * gruvin9x is based on code named er9x by + * Author - Erez Raviv , which is in turn + * was based on the original (and ongoing) project by Thomas Husterer, + * th9x -- http://code.google.com/p/th9x/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + /*---------------------------------------------------------------------------/ / FatFs - FAT file system module include file R0.08a (C)ChaN, 2010 /----------------------------------------------------------------------------/ diff --git a/src/ffconf.h b/src/ffconf.h index 0b20b311e..4948e6c3a 100644 --- a/src/ffconf.h +++ b/src/ffconf.h @@ -1,3 +1,24 @@ +/* + * Authors (alphabetical order) + * - Bertrand Songis + * - Bryan J. Rentoul (Gruvin) + * + * gruvin9x is based on code named er9x by + * Author - Erez Raviv , which is in turn + * was based on the original (and ongoing) project by Thomas Husterer, + * th9x -- http://code.google.com/p/th9x/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + /*---------------------------------------------------------------------------/ / FatFs - FAT file system module configuration file R0.08a (C)ChaN, 2010 /----------------------------------------------------------------------------/ diff --git a/src/gruvin9x.cpp b/src/gruvin9x.cpp index 0a1543b9b..8a5e9d3d1 100644 --- a/src/gruvin9x.cpp +++ b/src/gruvin9x.cpp @@ -1,12 +1,12 @@ /* - * Authors (alphabetical order) - * - Bertrand Songis - * - Bryan J. Rentoul (Gruvin) + * Authors (alphabetical order) + * - Bertrand Songis + * - Bryan J. Rentoul (Gruvin) * * gruvin9x is based on code named er9x by * Author - Erez Raviv , which is in turn - * was based on the original (and ongoing) project by Thomas Husterer, - * th9x -- http://code.google.com/p/th9x/ + * was based on the original (and ongoing) project by Thomas Husterer, + * th9x -- http://code.google.com/p/th9x/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -442,7 +442,7 @@ bool getSwitch(int8_t swtch, bool nc, uint8_t level) //#define CS_EGREATER 12 //#define CS_ELESS 13 -#if defined (PCBV3) +#if defined (PCBV3) && !defined (PCBV4) // The ugly scanned keys thing should be gone for PCBV4+. In the meantime ... uint8_t keyDown() { @@ -459,7 +459,11 @@ uint8_t keyDown() #else inline uint8_t keyDown() { +#if defined (PCBV4) + return (~PINL) & 0x3F; +#else return (~PINB) & 0x7E; +#endif } #endif @@ -831,9 +835,10 @@ void getADC_filt() void getADC_osmp() { uint16_t temp_ana[8] = {0}; - for (uint8_t adc_input=0;adc_input<8;adc_input++){ + for (uint8_t adc_input=0;adc_input<8;adc_input++) + { + ADMUX=adc_input|ADC_VREF_TYPE; // TODO now it is done only one time before the loop, is it good? for (uint8_t i=0; i<4;i++) { // Going from 10bits to 11 bits. Addition = n. Loop 4^n times - ADMUX=adc_input|ADC_VREF_TYPE; // Start the AD conversion ADCSRA|=0x40; // Wait for the AD conversion to complete @@ -847,7 +852,8 @@ void getADC_osmp() void getADC_single() { - for (uint8_t adc_input=0;adc_input<8;adc_input++){ + for (uint8_t adc_input=0;adc_input<8;adc_input++) + { ADMUX=adc_input|ADC_VREF_TYPE; // Start the AD conversion ADCSRA|=0x40; @@ -871,11 +877,16 @@ void getADC_bandgap() // See http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=847208#847208 // In the end, simply using a longer delay (presumably to account for the higher // impedance Vbg internal source) solved the problem. NOTE: Does NOT adversely affect PPM_out latency. +#if defined (PCBV4) + ADCSRB &= ~(1< 1024*100 // later we multiply by the limit (up to 100) and then we need to normalize // at the end chans[i] = chans[i]/100 => -1024..1024 @@ -1577,6 +1588,9 @@ void perMain() else BACKLIGHT_OFF; + //////////////// + // G: TODO This shouldn't be in perMain(). It should be in the same place + // all the other ADC samples happen static int16_t p1valprev; p1valdiff = (p1val-calibratedStick[6])/32; if(p1valdiff) { @@ -1584,6 +1598,7 @@ void perMain() p1val = calibratedStick[6]; } p1valprev = calibratedStick[6]; + ///////////////// g_menuStack[g_menuStackPtr](evt); refreshDiplay(); @@ -1630,8 +1645,8 @@ Gruvin: g_vbat100mV = (ab*16 + (ab*g_eeGeneral.vBatCalib)/8)/BandGap; #else - int32_t instant_vbat = anaIn(7); - instant_vbat = (instant_vbat*16 + instant_vbat*g_eeGeneral.vBatCalib/8) / BandGap; + int32_t instant_vbat = anaIn(7); + instant_vbat = (instant_vbat*16 + instant_vbat*g_eeGeneral.vBatCalib/8) / BandGap; if (g_vbat100mV == 0 || g_menuStack[0] != menuMainView) g_vbat100mV = instant_vbat; g_vbat100mV = (instant_vbat + g_vbat100mV*7) / 8; #endif @@ -1647,7 +1662,6 @@ Gruvin: break; - case 3: { // The various "beep" tone lengths @@ -1676,7 +1690,7 @@ uint8_t ppmInState = 0; //0=unsync 1..8= wait for value i-1 uint8_t heartbeat; - + ISR(TIMER1_COMPA_vect) //2MHz pulse generation { static uint8_t pulsePol; @@ -1688,19 +1702,27 @@ ISR(TIMER1_COMPA_vect) //2MHz pulse generation ; uint16_t dt=TCNT1;//-OCR1A; +//vinceofdrink@gmail harwared ppm +//Orginal bitbang for PPM +#ifndef DPPMPB7_HARDWARE if(pulsePol) { PORTB |= (1<ofs vofs|v|v2 ""v1=v2 ""v1<=v2 " #define CSW_LEN_FUNC 7 -#define FSWITCH_STR "---- ""Trainer ""Instant Trim ""Trims2Offsets ""Telemetry View" +#define FSWITCH_STR "---- ""Trainer ""Instant Trim ""Telemetry View" #define FSW_LEN_FUNC 14 #define SWASH_TYPE_STR "--- ""120 ""120X ""140 ""90 " @@ -673,6 +751,12 @@ inline bool isFunctionActive(uint8_t func) return active_functions & (1 << (func-1)); } +#if defined (PCBV3) +extern char g_logFilename[21]; // pers.cpp::resetTelemetry() +extern FATFS FATFS_Obj; // pers.cpp::resetTelemetry() +extern FIL g_oLogFile; // pers.cpp::resetTelemetry() +#endif + #endif // gruvin9x_h /*eof*/ diff --git a/src/integer.h b/src/integer.h index 137b98815..4584ffaad 100644 --- a/src/integer.h +++ b/src/integer.h @@ -1,3 +1,24 @@ +/* + * Authors (alphabetical order) + * - Bertrand Songis + * - Bryan J. Rentoul (Gruvin) + * + * gruvin9x is based on code named er9x by + * Author - Erez Raviv , which is in turn + * was based on the original (and ongoing) project by Thomas Husterer, + * th9x -- http://code.google.com/p/th9x/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + /*-------------------------------------------*/ /* Integer type definitions for FatFs module */ /*-------------------------------------------*/ diff --git a/src/main_views.cpp b/src/main_views.cpp index b5881e863..05330ede2 100644 --- a/src/main_views.cpp +++ b/src/main_views.cpp @@ -48,7 +48,6 @@ void menuMainView(uint8_t event) { static uint8_t switchView = 255; static bool instantTrimSwLock; - static bool trim2OfsSwLock; uint8_t view = (switchView == 255 ? g_eeGeneral.view : switchView); @@ -146,7 +145,6 @@ void menuMainView(uint8_t event) killEvents(KEY_UP); killEvents(KEY_DOWN); instantTrimSwLock = true; - trim2OfsSwLock = true; break; } @@ -154,10 +152,6 @@ void menuMainView(uint8_t event) if (!instantTrimSwLock && trimSw) instantTrim(); instantTrimSwLock = trimSw; - trimSw = isFunctionActive(FUNC_TRIMS_2_OFS); - if (!trim2OfsSwLock && trimSw) moveTrimsToOffsets(); - trim2OfsSwLock = trimSw; - if (view == e_telemetry+ALTERNATE) { putsModelName(0, 0, g_model.name, g_eeGeneral.currModel, 0); uint8_t att = (g_vbat100mV < g_eeGeneral.vBatWarn ? BLINK : 0); diff --git a/src/menus.cpp b/src/menus.cpp index df39d3c70..eb7556dcf 100644 --- a/src/menus.cpp +++ b/src/menus.cpp @@ -323,6 +323,13 @@ void setupPulses() setupPulsesTracerCtp1009(); break; } +#if defined (DPPMPB7_HARDWARE) + + //Don't know if its usefull for the other encoding type or if they have polarity option cannot test those + //Force an ouput compare to match the ppm polarity + if(PINB&(1<<7) && g_model.pulsePol) + TCCR1C |=(1< + * Authors (alphabetical order) + * - Bertrand Songis + * - Bryan J. Rentoul (Gruvin) * - * Based on th9x -> http://code.google.com/p/th9x/ + * gruvin9x is based on code named er9x by + * Author - Erez Raviv , which is in turn + * was based on the original (and ongoing) project by Thomas Husterer, + * th9x -- http://code.google.com/p/th9x/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -13,6 +18,7 @@ * GNU General Public License for more details. * */ + #ifndef eeprom_h #define eeprom_h @@ -35,7 +41,7 @@ #define EEPROM_VER_r584 3 #define EEPROM_VER_r751 5 -#define EEPROM_VER 105 +#define EEPROM_VER 105 // TODO make it 201 typedef struct t_TrainerMix { uint8_t srcChn:6; // 0-7 = ch1-8 @@ -148,9 +154,8 @@ typedef struct t_SafetySwData { // Safety Switches data #define FUNC_TRAINER 1 #define FUNC_INSTANT_TRIM 2 -#define FUNC_TRIMS_2_OFS 3 -#define FUNC_VIEW_TELEMETRY 4 -#define FUNC_LAST 4 +#define FUNC_VIEW_TELEMETRY 3 +#define FUNC_LAST 3 typedef struct t_FuncSwData { // Function Switches data int8_t swtch; //input diff --git a/src/pers.cpp b/src/pers.cpp index b4fa8694f..027343b33 100644 --- a/src/pers.cpp +++ b/src/pers.cpp @@ -191,8 +191,6 @@ uint8_t Translate() if (trimSw) { g_model.funcSw[0].swtch = trimSw; g_model.funcSw[0].func = FUNC_INSTANT_TRIM; - g_model.funcSw[1].swtch = trimSw; - g_model.funcSw[1].func = FUNC_TRIMS_2_OFS; } memcpy(&g_model.phaseData[0].trim[0], &trims[0], 4); theFile.writeRlc(FILE_MODEL(id), FILE_TYP_MODEL, (uint8_t*)&g_model, sizeof(g_model), true); @@ -233,10 +231,24 @@ bool eeLoadGeneral() return false; } +#ifndef TEMPLATES +inline void applyDefaultTemplate() +{ + for (int i=0; idestCh = i+1; + md->weight = 100; + md->srcRaw = i+1; + } + + STORE_MODELVARS; +} +#endif + void modelDefault(uint8_t id) { memset(&g_model, 0, sizeof(g_model)); - applyTemplate(0); //default 4 channel template + applyDefaultTemplate(); } uint16_t eeLoadModelName(uint8_t id, char *name) diff --git a/src/rtc.cpp b/src/rtc.cpp index 3b44a7992..922a454b1 100644 --- a/src/rtc.cpp +++ b/src/rtc.cpp @@ -1,3 +1,24 @@ +/* + * gruvin9x Author Bryan J.Rentoul (Gruvin) + * + * gruvin9x is based on code named er9x by + * Author - Erez Raviv , which is in turn + * based on th9x -> http://code.google.com/p/th9x/ + * + * rtc.cpp code take from (TODO. Re-locate and fix this credit.) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + + /*--------------------------------------------------------------------------*/ /* RTC controls */ diff --git a/src/rtc.h b/src/rtc.h index 66a911ee7..917f8b932 100644 --- a/src/rtc.h +++ b/src/rtc.h @@ -1,3 +1,23 @@ +/* + * gruvin9x Author Bryan J.Rentoul (Gruvin) + * + * gruvin9x is based on code named er9x by + * Author - Erez Raviv , which is in turn + * based on th9x -> http://code.google.com/p/th9x/ + * + * rtc.cpp code take from (TODO. Re-locate and fix this credit.) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + #ifndef RTC_H #define RTC_H diff --git a/src/simpgmspace.cpp b/src/simpgmspace.cpp index 011b2f788..624d414f7 100644 --- a/src/simpgmspace.cpp +++ b/src/simpgmspace.cpp @@ -88,7 +88,7 @@ void eeprom_read_block (void *pointer_ram, fclose(fp); } else { - memcpy(pointer_ram, &eeprom[(int)pointer_eeprom], size); + memcpy(pointer_ram, &eeprom[(uint64_t)pointer_eeprom], size); } } diff --git a/src/simpgmspace.h b/src/simpgmspace.h index 7642ab447..e86f715ec 100644 --- a/src/simpgmspace.h +++ b/src/simpgmspace.h @@ -81,5 +81,6 @@ void eeprom_read_block (void *pointer_ram, const void *pointer_eeprom, size_t size); +#undef offsetof #define offsetof(st, m) ((size_t) ( (char *)&((st *)(0))->m - (char *)0 )) #define wdt_reset() diff --git a/src/stamp-gruvin9x.h b/src/stamp-gruvin9x.h index 0f3308de8..054554317 100644 --- a/src/stamp-gruvin9x.h +++ b/src/stamp-gruvin9x.h @@ -1,6 +1,6 @@ //Automatically generated file (Makefile) - do not edit -#define DATE_STR "2011-09-13" -#define TIME_STR "19:07:15" +#define DATE_STR "2011-09-14" +#define TIME_STR "11:11:34" #define TAG_VERS 2-bsongis -#define SVN_VERS "gruvin9x-dev-r819" -#define BUILD_NUM 827 +#define SVN_VERS "open9x-r3" +#define BUILD_NUM 841 diff --git a/src/templates.cpp b/src/templates.cpp index e6c0d56e1..a53ae184e 100644 --- a/src/templates.cpp +++ b/src/templates.cpp @@ -1,7 +1,12 @@ /* - * gruvin9x Author Bryan J.Rentoul (Gruvin) + * Authors (alphabetical order) + * - Bertrand Songis + * - Bryan J. Rentoul (Gruvin) * - * templates.cpp original author - Erez Raviv + * gruvin9x is based on code named er9x by + * Author - Erez Raviv , which is in turn + * was based on the original (and ongoing) project by Thomas Husterer, + * th9x -- http://code.google.com/p/th9x/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -12,6 +17,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * + * + * * ============================================================ * Templates file * diff --git a/src/templates.h b/src/templates.h index 2e1a6d6d6..01f43758f 100644 --- a/src/templates.h +++ b/src/templates.h @@ -1,5 +1,12 @@ /* - * Author - Erez Raviv + * Authors (alphabetical order) + * - Bertrand Songis + * - Bryan J. Rentoul (Gruvin) + * + * gruvin9x is based on code named er9x by + * Author - Erez Raviv , which is in turn + * was based on the original (and ongoing) project by Thomas Husterer, + * th9x -- http://code.google.com/p/th9x/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -10,6 +17,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * + * * ============================================================ * Templates file * @@ -82,6 +90,12 @@ void clearMixes(); void clearCurves(); void applyTemplate(uint8_t idx); +#ifdef TEMPLATES +inline void applyDefaultTemplate() +{ + applyTemplate(0); +} +#endif #endif //TEMPLATES_H