diff --git a/src/Makefile b/src/Makefile index 2b7c4d5b0..477d0fb4a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -453,7 +453,7 @@ ifeq ($(PCB), GRUVIN9X) TRGT = avr- MCU = atmega2560 OPT = 2 - CPPDEFS += -DF_CPU=$(F_CPU)UL -DPCBGRUVIN9X -DEEPROM_VARIANT=0 -DAUDIO -DHAPTIC + CPPDEFS += -DF_CPU=$(F_CPU)UL -DPCBGRUVIN9X -DCPUM2560 -DEEPROM_VARIANT=0 -DAUDIO -DHAPTIC SDCARD = NO BUZZER = NO THR_TRACE = YES @@ -492,27 +492,22 @@ ifeq ($(PCB), MEGA2560) TRGT = avr- MCU = atmega2560 OPT = 2 - CPPDEFS = -DF_CPU=$(F_CPU)UL -DPCBGRUVIN9X -DEEPROM_VARIANT=0 -DAUDIO -DHAPTIC - SDCARD = NO + CPPDEFS = -DF_CPU=$(F_CPU)UL -DPCBMEGA2560 -DCPUM2560 -DEEPROM_VARIANT=0 -DAUDIO -DRTCLOCK + SDCARD = YES THR_TRACE = YES - EXTRAINCDIRS = targets/gruvin9x targets/stock FatFs FatFs/option + EXTRAINCDIRS = targets/mega2560 targets/stock FatFs FatFs/option BOARDSRC = targets/mega2560/board_mega2560.cpp EXTRABOARDSRC = targets/mega2560/lcd_driver_ST7565R.cpp EEPROMSRC = eeprom_common.cpp eeprom_rlc.cpp PULSESSRC = protocols/pulses_avr.cpp - CPPSRC += audio_avr.cpp haptic.cpp + CPPSRC += audio_avr.cpp ifeq ($(SDCARD), YES) + EXTRABOARDSRC += FatFs/ff.c FatFs/fattime.c FatFs/option/ccsbcs.c targets/gruvin9x/diskio.cpp CPPDEFS += -DRTCLOCK - CPPSRC += rtc.cpp targets/gruvin9x/rtc_driver.cpp - EXTRABOARDSRC += FatFs/ff.c FatFs/fattime.c FatFs/option/ccsbcs.c targets/gruvin9x/diskio.cpp + CPPSRC += rtc.cpp targets/mega2560/rtc_driver.cpp endif - - ifeq ($(VOICE), YES) - CPPSRC += targets/gruvin9x/somo14d.cpp - CPPDEFS += -DVOICE - endif - + # Enable extra rotary encoders (Gruvin9x board only) # Values = YES, NO ROTARY_ENCODERS = 2 diff --git a/src/eeprom_rlc.cpp b/src/eeprom_rlc.cpp index dae5401d6..6aff84c94 100644 --- a/src/eeprom_rlc.cpp +++ b/src/eeprom_rlc.cpp @@ -59,7 +59,7 @@ inline void eeprom_write_byte() EEAR = eeprom_pointer; EEDR = *eeprom_buffer_data; // TODO add some define here -#if defined (PCBGRUVIN9X) || defined(CPUM2561) +#if defined (CPUM2560) || defined(CPUM2561) EECR |= 1<=0; i--) { - if (flags & CONDENSED && i<=1) break; + if ((flags & CONDENSED) && i<=1) break; uint8_t b1=0, b2=0; if (i>1) { b1 = pgm_read_byte(q++); /*top byte*/ diff --git a/src/myeeprom.h b/src/myeeprom.h index 7661b2f04..ef3a4ea4e 100644 --- a/src/myeeprom.h +++ b/src/myeeprom.h @@ -55,9 +55,7 @@ #define EEPROM_VER 215 #elif defined(PCBSKY9X) #define EEPROM_VER 215 -#elif defined(PCBGRUVIN9X) - #define EEPROM_VER 214 -#elif defined(CPUM2561) +#elif defined(CPUM2560) || defined(CPUM2561) #define EEPROM_VER 214 #elif defined(CPUM128) #define EEPROM_VER 215 @@ -77,15 +75,7 @@ #define MAX_EXPOS 32 #define NUM_CSW 32 // number of custom switches #define NUM_CFN 32 // number of functions assigned to switches -#elif defined(PCBGRUVIN9X) - #define MAX_MODELS 30 - #define NUM_CHNOUT 16 // number of real output channels CH1-CH16 - #define MAX_PHASES 6 - #define MAX_MIXERS 32 - #define MAX_EXPOS 16 - #define NUM_CSW 15 // number of custom switches - #define NUM_CFN 24 // number of functions assigned to switches -#elif defined(CPUM2561) +#elif defined(CPUM2560) || defined(CPUM2561) #define MAX_MODELS 30 #define NUM_CHNOUT 16 // number of real output channels CH1-CH16 #define MAX_PHASES 6 @@ -356,7 +346,7 @@ PACK(typedef struct t_ExpoData { char name[LEN_EXPOMIX_NAME]; int8_t curveParam; }) ExpoData; -#elif defined(PCBGRUVIN9X) || defined(CPUM2561) +#elif defined(CPUM2560) || defined(CPUM2561) PACK(typedef struct t_ExpoData { uint8_t mode:2; // 0=end, 1=pos, 2=neg, 3=both uint8_t chn:2; @@ -481,7 +471,7 @@ PACK( union u_int8int16_t { #define DELAY_MAX 15 /* 7.5 seconds */ #define SLOW_MAX 15 /* 7.5 seconds */ -#if defined(PCBGRUVIN9X) || defined(CPUM2561) +#if defined(CPUM2560) || defined(CPUM2561) PACK(typedef struct t_MixData { uint8_t destCh:4; // 0, 1..NUM_CHNOUT uint8_t curveMode:1; // O=curve, 1=differential @@ -972,7 +962,7 @@ PACK(typedef struct t_SwashRingData { // Swash Ring data #define NUM_ROTARY_ENCODERS (2+NUM_ROTARY_ENCODERS_EXTRA) #define ROTARY_ENCODER_ARRAY int16_t rotaryEncoders[2]; #define ROTARY_ENCODER_ARRAY_EXTRA int16_t rotaryEncodersExtra[MAX_PHASES][NUM_ROTARY_ENCODERS_EXTRA]; -#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS <= 2 +#elif defined(CPUM2560) && ROTARY_ENCODERS <= 2 #define NUM_ROTARY_ENCODERS_EXTRA 0 #define NUM_ROTARY_ENCODERS 2 #define ROTARY_ENCODER_ARRAY int16_t rotaryEncoders[2]; @@ -1119,7 +1109,7 @@ enum MixSources { #if defined(PCBSKY9X) MIXSRC_REa, -#elif defined(PCBGRUVIN9X) +#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560) MIXSRC_REa, MIXSRC_REb, #if ROTARY_ENCODERS > 2 @@ -1208,7 +1198,7 @@ enum MixSources { #define TMRMODE_THR_REL 3 #define TMRMODE_THR_TRG 4 -#if defined(PCBGRUVIN9X) || defined(CPUARM) +#if defined(CPUARM) || defined(CPUM2560) PACK(typedef struct t_TimerData { int8_t mode; // timer trigger source -> off, abs, stk, stk%, sw/!sw, !m_sw/!m_sw uint16_t start:12; @@ -1292,10 +1282,10 @@ enum FailsafeModes { #define TELEMETRY_DATA #endif -#if defined(PCBGRUVIN9X) || defined(CPUARM) -#define BeepANACenter uint16_t +#if defined(CPUARM) || defined(PCBGRUVIN9X) || defined(PCBMEGA2560) + #define BeepANACenter uint16_t #else -#define BeepANACenter uint8_t + #define BeepANACenter uint8_t #endif PACK(typedef struct t_ModelHeader { diff --git a/src/opentx.cpp b/src/opentx.cpp index befb8eb95..6f02ebd2f 100644 --- a/src/opentx.cpp +++ b/src/opentx.cpp @@ -856,7 +856,7 @@ getvalue_t getValue(uint8_t i) /*srcRaw is shifted +1!*/ if (i> 5 ; if (Current_analogue > Current_max) Current_max = Current_analogue ; -#elif defined(PCBGRUVIN9X) && !defined(SIMU) +#elif defined(CPUM2560) && !defined(SIMU) // For PCB V4, use our own 1.2V, external reference (connected to ADC3) ADCSRB &= ~(1< e_power_trainer) break; #endif @@ -4568,7 +4539,7 @@ int main(void) } #endif -#if defined(PCBGRUVIN9X) +#if defined(CPUM2560) // Time to switch off lcd_clear(); displayPopup(STR_SHUTDOWN); diff --git a/src/opentx.h b/src/opentx.h index d2be4fa84..e11d42ee0 100644 --- a/src/opentx.h +++ b/src/opentx.h @@ -74,7 +74,7 @@ #define IF_BATTGRAPH(x) #endif -#if defined(CPUARM) || defined(PCBGRUVIN9X) +#if defined(CPUARM) || defined(CPUM2560) #define IF_PERSISTENT_TIMERS(x) x, #else #define IF_PERSISTENT_TIMERS(x) @@ -247,6 +247,8 @@ #include "targets/sky9x/board_sky9x.h" #elif defined(PCBGRUVIN9X) #include "targets/gruvin9x/board_gruvin9x.h" +#elif defined(PCBMEGA2560) + #include "targets/mega2560/board_mega2560.h" #else #include "targets/stock/board_stock.h" #endif @@ -843,7 +845,7 @@ extern void setTrimValue(uint8_t phase, uint8_t idx, int16_t trim); void incRotaryEncoder(uint8_t idx, int8_t inc); #endif -#if defined(PCBGRUVIN9X) +#if defined(PCBGRUVIN9X) || defined(PCBMEGA2560) #define ROTARY_ENCODER_GRANULARITY (1) #elif defined(CPUARM) #define ROTARY_ENCODER_GRANULARITY (2 << g_eeGeneral.rotarySteps) @@ -1074,7 +1076,7 @@ inline void resumeMixerCalculations() #define resumeMixerCalculations() #endif -#if defined(CPUARM) || defined(PCBGRUVIN9X) +#if defined(CPUARM) || defined(CPUM2560) void saveTimers(); #else #define saveTimers() diff --git a/src/protocols/pulses_avr.cpp b/src/protocols/pulses_avr.cpp index 86cb8ddbc..771cddd5b 100644 --- a/src/protocols/pulses_avr.cpp +++ b/src/protocols/pulses_avr.cpp @@ -750,7 +750,7 @@ void setupPulses() TCCR1B = 0; // Stop counter TCNT1 = 0; -#if defined(PCBGRUVIN9X) || defined(CPUM2561) +#if defined(CPUM2560) || defined(CPUM2561) TIMSK1 &= ~0x2F; // All Timer1 interrupts off TIMSK1 &= ~(1<> 8 ; - address *= (GPIOB_BASE-GPIOA_BASE) ; - address += GPIOA_BASE ; - pgpio = (GPIO_TypeDef* ) address ; - - /* -------------------------Configure the port pins---------------- */ - /*-- GPIO Mode Configuration --*/ - for (thispin = 0x0001, pos = 0; thispin < 0x10000; thispin <<= 1, pos +=1 ) - { - if ( pins & thispin) - { - pgpio->MODER &= ~(GPIO_MODER_MODER0 << (pos * 2)) ; - pgpio->MODER |= (config & PIN_MODE_MASK) << (pos * 2) ; - - if ( ( (config & PIN_MODE_MASK ) == PIN_OUTPUT) || ( (config & PIN_MODE_MASK) == PIN_PERIPHERAL) ) - { - /* Speed mode configuration */ - pgpio->OSPEEDR &= ~GPIO_OSPEEDER_OSPEEDR0 << (pos * 2) ; - pgpio->OSPEEDR |= ((config & PIN_SPEED_MASK) >> 13 ) << (pos * 2) ; - - /* Output mode configuration*/ - pgpio->OTYPER &= ~((GPIO_OTYPER_OT_0) << ((uint16_t)pos)) ; - if ( config & PIN_ODRAIN ) - { - pgpio->OTYPER |= (GPIO_OTYPER_OT_0) << pos ; - } - } - /* Pull-up Pull down resistor configuration*/ - pgpio->PUPDR &= ~(GPIO_PUPDR_PUPDR0 << ((uint16_t)pos * 2)); - pgpio->PUPDR |= ((config & PIN_PULL_MASK) >> 2) << (pos * 2) ; - - pgpio->AFR[pos >> 3] &= ~(0x000F << (pos & 7)) ; - pgpio->AFR[pos >> 3] |= ((config & PIN_PERI_MASK) >> 4) << (pos & 7) ; - } - } -} -#endif - - - - -#ifndef SIMU -inline void boardInit() -{ - ADMUX=ADC_VREF_TYPE; - ADCSRA=0x85; // ADC enabled, pre-scaler division=32 (no interrupt, no auto-triggering) - ADCSRB=(1< 2 - EIMSK = (3< 2 - //configure uart1 here - DDRD &= ~(1 << 2); - PORTD &= ~(1 << 2); - #define EXTRA_ROTARY_ENCODERS_USART_BAUD 9600UL - UBRR1 = F_CPU/(16*EXTRA_ROTARY_ENCODERS_USART_BAUD)-1; - //9 bit mode - UCSR1C = (1< 2 - -uint8_t vpotToChange = 0; -uint8_t vpot_mod_state = 0; - -ISR(USART1_RX_vect) -{ - //receive data from extension board - //bit 9 = 1 mean encoder number, following byte with bit 9 = 0 is increment value - /* Get status and 9th bit, then data */ - /* from buffer */ - uint16_t resh = UCSR1B; - uint16_t resl = UDR1; - uint16_t res = 0; - - /* Filter the 9th bit, then return */ - resh = (resh >> 1) & 0x01; - res = ((resh << 8) | resl); - if((res == 0x180) | (res == 0x1C0)){ //button REb filter - keys[BTN_REa].input((res & 0x1C0) == 0x1C0, BTN_REa); - } else if((res & 0x100) == 0x100){ //rotary filter - vpotToChange = res & 0xEF; - vpot_mod_state = 1; - } - else { - if(vpot_mod_state & (vpotToChange < NUM_ROTARY_ENCODERS)) - { - int8_t vpot_inc = res & 0xFF; - if(vpot_inc){ - incRotaryEncoder(vpotToChange, vpot_inc); - } - vpot_mod_state = 0; - } - } -} -#endif -#endif // !SIMU - -uint8_t pwrCheck() -{ -#if !defined(SIMU) && !defined(REV0) - if ((PING & 0b00000010) && (~PINL & 0b01000000)) - return e_power_off; -#endif - return e_power_on; -} - -void pwrOff() -{ -#ifndef REV0 - PORTL = 0x7f; -#endif -} - -#if ROTARY_ENCODERS <= 2 -#define ROTENC_DOWN() ((~PIND & 0x20) || (~PIND & 0x10)) -#else -#define ROTENC_DOWN() (0) -#endif - -FORCEINLINE uint8_t keyDown() -{ - return ((~PINL) & 0x3F) || ROTENC_DOWN(); -} - -bool switchState(EnumKeys enuk) -{ - uint8_t result = 0 ; - - if (enuk < (int)DIM(keys)) - return keys[enuk].state() ? 1 : 0; - - switch(enuk){ - case SW_ELE: - result = PINC & (1< 0); - break; -#endif - - case SW_GEA: - result = PING & (1<> 3; - - for (int i=1; i<7; i++) - { - //INP_B_KEY_MEN 1 .. INP_B_KEY_LFT 6 - keys[enuk].input(in & (1< + * - Andreas Weitl + * - Bertrand Songis + * - Bryan J. Rentoul (Gruvin) + * - Cameron Weeks + * - Erez Raviv + * - Gabriel Birkus + * - Jean-Pierre Parisy + * - Karl Szmutny + * - Michael Blandford + * - Michal Hlavinka + * - Pat Mackenzie + * - Philip Moss + * - Rob Thomson + * - Romolo Manfredini + * - Thomas Husterer + * + * opentx is based on code named + * gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/, + * er9x by Erez Raviv: http://code.google.com/p/er9x/, + * and 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. + * + */ + +#include "../../opentx.h" + +#ifndef SIMU +inline void boardInit() // Done 2013.10.09 : trims, keyboard, LCD, ID1+2 SW warning PORTF-3 (1.2V ADC_ref) +{ + // Set up I/O port data directions and initial states + DDRA = 0b11111111; PORTA = 0b00000000; // LCD data + DDRB = 0b11000111; PORTB = 0b00111111; // 7:SPKR, 6:PPM_OUT, 5:TrainSW, 4:xxxxx, SDCARD[3:MISO 2:MOSI 1:SCK 0:CS] + DDRC = 0b11111100; PORTC = 0b00000011; // LCD[7,6,5,4,3], 2:BackLight, 1:ID2_Sw, 0:ID1_Sw + DDRD = 0b11000000; PORTD = 0b11111100; // 7:VIB, 6:LED BL, 5:RENC2_PUSH, 4:RENC1_PUSH, 3:RENC2_B, 2:RENC2_A, 1:I2C_SDA, 0:I2C_SCL + DDRE = 0b00001010; PORTE = 0b11110100; // 7:PPM_IN, 6: RENC1_B, 5:RENC1_A, 4:USB_DNEG, 3:BUZZER, 2:USB_DPOS, 1:TELEM_TX, 0:TELEM_RX(pull-up off) +//DDRF = 0b00000000; PORTF = 0b00000000; // 7-4:JTAG, 3:ADC_REF_1.2V input, 2-0:ADC_SPARE_2-0 + DDRF = 0b00000000; PORTF = 0b11111111; // 7-0:Trim switch inputs + + DDRG = 0b00010000; PORTG = 0b00111111; // 7-6:N/A, 5:GearSW, 4: Sim_Ctrl[out], 3:xxxxx, 2:TCut_Sw, 1:RF_Power[in], 0: RudDr_Sw + DDRH = 0b10111000; PORTH = 0b11010111; // [7:0 DSM/PPM TX-caddy control. 1=PPM, 0=DSM ] + // [6:SOMO14D-BUSY 5:SOMO14D-DATA 4:SOMO14D-CLK 3:SOMO14D-RESET] + // [2:VIB_OPTION -- setting to input for now] + // [1:TxD 0:RxD Spare serial port] +//DDRJ = 0b00000000; PORTJ = 0b11111111; // 7-0:Trim switch inputs + DDRK = 0b00000000; PORTK = 0b00000000; // Analogic input (no pull-ups) + DDRL = 0b10000000; PORTL = 0b11111111; // 7: Hold_PWR_On (1=On, default Off), 6:Jack_Presence_TTL, 5-0: Keyboard inputs + + ADMUX=ADC_VREF_TYPE; + ADCSRA=0x85; // ADC enabled, pre-scaler division=32 (no interrupt, no auto-triggering) + ADCSRB=(1< 0); + break; +#endif + + case SW_GEA: + result = PING & (1<> 3; + + for (int i=1; i<7; i++) + { + //INP_B_KEY_MEN 1 .. INP_B_KEY_LFT 6 + keys[enuk].input(in & (1< + * - Andreas Weitl + * - Bertrand Songis + * - Bryan J. Rentoul (Gruvin) + * - Cameron Weeks + * - Erez Raviv + * - Gabriel Birkus + * - Jean-Pierre Parisy + * - Karl Szmutny + * - Michael Blandford + * - Michal Hlavinka + * - Pat Mackenzie + * - Philip Moss + * - Rob Thomson + * - Romolo Manfredini + * - Thomas Husterer + * + * opentx is based on code named + * gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/, + * er9x by Erez Raviv: http://code.google.com/p/er9x/, + * and 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. + * + */ -#include "io_mega2560.h" +#ifndef board_mega2560_h +#define board_mega2560_h -#define TIMER_16KHZ_VECT TIMER2_OVF_vect -#define COUNTER_16KHZ TCNT2 -#define TIMER_10MS_VECT TIMER2_COMPA_vect -#define TIMER_10MS_COMPVAL OCR2A -#define PAUSE_10MS_INTERRUPT() TIMSK2 &= ~(1< + * - Andreas Weitl + * - Bertrand Songis + * - Bryan J. Rentoul (Gruvin) + * - Cameron Weeks + * - Erez Raviv + * - Gabriel Birkus + * - Jean-Pierre Parisy + * - Karl Szmutny + * - Michael Blandford + * - Michal Hlavinka + * - Pat Mackenzie + * - Philip Moss + * - Rob Thomson + * - Romolo Manfredini + * - Thomas Husterer + * + * opentx is based on code named + * gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/, + * er9x by Erez Raviv: http://code.google.com/p/er9x/, + * and 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. + * + */ + + +/*--------------------------------------------------------------------------*/ +/* RTC controls */ + +#include "../opentx.h" +#include "../FatFs/integer.h" + +typedef struct { + WORD year; /* 2000..2099 */ + BYTE month; /* 1..12 */ + BYTE mday; /* 1.. 31 */ + BYTE wday; /* 1..7 */ + BYTE hour; /* 0..23 */ + BYTE min; /* 0..59 */ + BYTE sec; /* 0..59 */ +} RTC; + +void rtc_gettime(struct gtm * utm) +{ + RTC rtc = {0,0,0,0,0,0,0}; + + // TODO g9x_rtc_gettime(&rtc); + + utm->tm_year = rtc.year - 1900; + utm->tm_mon = rtc.month - 1; + utm->tm_mday = rtc.mday; + utm->tm_hour = rtc.hour; + utm->tm_min = rtc.min; + utm->tm_sec = rtc.sec; + utm->tm_wday = rtc.wday - 1; +} + +void rtcSetTime(struct gtm * t) +{ + g_rtcTime = gmktime(t); // update local timestamp and get wday calculated + g_ms100 = 0; // start of next second begins now + +#if 0 + RTC rtc; + rtc.year = t->tm_year + 1900; + rtc.month = t->tm_mon + 1; + rtc.mday = t->tm_mday; + rtc.hour = t->tm_hour; + rtc.min = t->tm_min; + rtc.sec = t->tm_sec; + rtc.wday = t->tm_wday + 1; + g9x_rtcSetTime(&rtc); +#endif +} + +void rtcInit (void) +{ + // TODO + + struct gtm utm; + rtc_gettime(&utm); + g_rtcTime = gmktime(&utm); +} + diff --git a/src/translations.cpp b/src/translations.cpp index e08b90922..1a72104d0 100644 --- a/src/translations.cpp +++ b/src/translations.cpp @@ -94,7 +94,7 @@ const pm_char STR_OPEN9X[] PROGMEM = ISTR(VSWITCHES) ISTR(VSRCRAW) ISTR(VTMRMODES) -#if defined(PCBGRUVIN9X) || defined(CPUARM) +#if defined(CPUM2560) || defined(CPUARM) ISTR(DATETIME) #endif #if defined(CPUARM) @@ -269,7 +269,7 @@ const pm_char STR_EEPROMOVERFLOW[] PROGMEM = TR_EEPROMOVERFLOW; const pm_char STR_TRIMS2OFFSETS[] PROGMEM = TR_TRIMS2OFFSETS; const pm_char STR_MENURADIOSETUP[] PROGMEM = TR_MENURADIOSETUP; -#if defined(PCBGRUVIN9X) || defined(CPUARM) +#if defined(CPUM2560) || defined(CPUARM) const pm_char STR_MENUDATEANDTIME[] PROGMEM = TR_MENUDATEANDTIME; #endif @@ -332,7 +332,7 @@ const pm_char STR_LATITUDE[] PROGMEM = TR_LATITUDE; const pm_char STR_LONGITUDE[] PROGMEM = TR_LONGITUDE; #endif -#if defined(CPUARM) || defined(PCBGRUVIN9X) +#if defined(CPUM2560) || defined(PCBGRUVIN9X) const pm_char STR_SHUTDOWN[] PROGMEM = TR_SHUTDOWN; #endif diff --git a/src/translations.h b/src/translations.h index 16100f90c..f8e4bc79c 100644 --- a/src/translations.h +++ b/src/translations.h @@ -143,7 +143,7 @@ extern const pm_char STR_OPEN9X[]; #define OFS_VSRCRAW (OFS_VSWITCHES + sizeof(TR_VSWITCHES)) #define OFS_VTMRMODES (OFS_VSRCRAW + sizeof(TR_VSRCRAW)) #define OFS_DATETIME (OFS_VTMRMODES + sizeof(TR_VTMRMODES)) -#if defined(PCBGRUVIN9X) || defined(CPUARM) +#if defined(CPUM2560) || defined(CPUARM) #define OFS_VLCD (OFS_DATETIME + sizeof(TR_DATETIME)) #else #define OFS_VLCD (OFS_DATETIME) @@ -244,7 +244,7 @@ extern const pm_char STR_OPEN9X[]; #define STR_VRENCODERS (STR_OPEN9X + OFS_VRENCODERS) #endif -#if defined(PCBGRUVIN9X) || defined(CPUARM) +#if defined(CPUM2560) || defined(CPUARM) #define STR_DATETIME (STR_OPEN9X + OFS_DATETIME) #endif @@ -469,7 +469,7 @@ extern const pm_char STR_LATITUDE[]; extern const pm_char STR_LONGITUDE[]; #endif -#if defined(CPUARM) || defined(PCBGRUVIN9X) +#if defined(CPUARM) || defined(CPUM2560) extern const pm_char STR_SHUTDOWN[]; #endif