Skip to content

Commit

Permalink
Making build compatible to D02 fw
Browse files Browse the repository at this point in the history
  • Loading branch information
DL2MF committed Oct 15, 2017
1 parent 021ff12 commit 6d62beb
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 6 deletions.
7 changes: 6 additions & 1 deletion applet/src/addl_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
#include "system_hrc5000.h" // set HRC5000 FM register during startup to config values
#include "app_menu.h"
//#include "codeplug.h"
#include "amenu_set_tg.h"

#if defined(FW_D13_020) || defined(FW_S13_020)
#include "amenu_set_tg.h"
#else
#warning old firmware
#endif

addl_config_t global_addl_config;

Expand Down
9 changes: 7 additions & 2 deletions applet/src/amenu_channels.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
#include "printf.h"
#include "spiflash.h" // md380_spiflash_read()
#include "codeplug.h" // codeplug memory addresses, struct- and array-sizes
#include "amenu_channels.h" // header for THIS module (to check prototypes,etc)
#include "amenu_codeplug.h"
#if defined(FW_D13_020) || defined(FW_S13_020)
#include "amenu_channels.h" // header for THIS module (to check prototypes,etc)
#include "amenu_codeplug.h"
#endif

#include "syslog.h"

channel_t selChan;
Expand All @@ -26,12 +29,14 @@ int selIndex = 0;
int numChannels = 0;
contact_t cont;

#if defined(FW_D13_020) || defined(FW_S13_020)
const am_stringtable_t am_stringtab_onoff[] =
{
{ 0, "Off" },
{ 1, "On" },
{ 0, NULL } // <- marks the end of a string table
};
#endif

/*
const am_tonetab_t am_tone_num[] =
Expand Down
18 changes: 16 additions & 2 deletions applet/src/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@
#include "irq_handlers.h" // boot_flags, BOOT_FLAG_DREW_STATUSLINE
#include "lcd_driver.h"
#include "codeplug.h"
#include "amenu_set_tg.h"

#if defined(FW_D13_020) || defined(FW_S13_020)
#include "amenu_set_tg.h"
#else
#warning old firmware
#endif

//#include "amenu_channels.h"
#include <stdlib.h>

Expand Down Expand Up @@ -101,7 +107,9 @@ void draw_txt(char* testStr, int x, int y, char font){
char c=0;
int maxLen=16;
uint16_t fg_color = 0, bg_color = 0;
#if defined(FW_D13_020) || defined(FW_S13_020)
Menu_GetColours(SEL_FLAG_NONE, &fg_color, &bg_color);
#endif
while( ((c=*testStr)!=0) && maxLen>0)
{ x = LCD_DrawCharAt( c, x, y, fg_color, bg_color, font);
//++i; // character index and limiting counter
Expand Down Expand Up @@ -236,7 +244,9 @@ void draw_rx_screen(unsigned int bg_color)
gfx_set_fg_color(0x000000);
gfx_select_font(gfx_font_small);

#if defined(FW_D13_020) || defined(FW_S13_020)
channel_info_t *ci = &current_channel_info; // 20170807 - DL2MF added info
#endif

user_t usr ;

Expand Down Expand Up @@ -513,7 +523,7 @@ void draw_alt_statusline()
gfx_select_font(gfx_font_norm);
}


#if defined(FW_D13_020) || defined(FW_S13_020)
void draw_adhoc_statusline()
{
// int x = RX_POPUP_X_START + 36; // 36=standard position aligned with channel info
Expand Down Expand Up @@ -813,6 +823,10 @@ void draw_adhoc_statusline()
gfx_set_bg_color(0xff0000);
gfx_select_font(gfx_font_norm);
}
#endif




void draw_datetime_row_hook()
{
Expand Down
7 changes: 6 additions & 1 deletion applet/src/gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@
// Needed for LED functions. Cut dependency.
#include "stm32f4_discovery.h"
#include "stm32f4xx_conf.h" // again, added because ST didn't put it here ?
#include "amenu_set_tg.h"

#if defined(FW_D13_020) || defined(FW_S13_020)
#include "amenu_set_tg.h"
#else
#warning old firmware
#endif


uint8_t GFX_backlight_on=0; // DL4YHF 2017-01-07 : 0="off" (low intensity), 1="on" (high intensity)
Expand Down

0 comments on commit 6d62beb

Please sign in to comment.