Skip to content

Commit

Permalink
Changed "Symbols" to "Icons"
Browse files Browse the repository at this point in the history
Added more #defines for features
  • Loading branch information
awolf78 authored and awolf78 committed Apr 9, 2017
1 parent 90af565 commit 11dcfdb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
5 changes: 4 additions & 1 deletion KISS_OSD/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
#define BEERMUG
#define CUSTOM_TPA
#define CROSSHAIR

#define PROP_ICON
#define MAH_ICON
#define WATTMETER_ICON
#define SHOW_KISS_LOGO



Expand Down
19 changes: 13 additions & 6 deletions KISS_OSD/KISS_OSD.ino
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,8 @@ static uint8_t activeMenuItem = 0;
static uint8_t stopWatch = 0x94;
static char batterySymbol[] = { 0x83, 0x88, 0x88, 0x89, 0x00 };
static char wattMeterSymbol[] = { 0xD7, 0xD8, 0x00 };
static char moustacheSymbol[] = { 0x7F, 0x80, 0x81, 0x82, 0x00 };
static uint8_t moustacheStarted = 0;
static bool angleXpositive = true;
static bool angleYpositive = true;
/*static bool angleXpositive = true;
static bool angleYpositive = true;*/
static uint8_t krSymbol[4] = { 0x9C, 0x9C, 0x9C, 0x9C };
static unsigned long krTime[4] = { 0, 0, 0, 0 };
volatile bool timer1sec = false;
Expand Down Expand Up @@ -778,6 +776,7 @@ void loop(){

if(AuxChanVals[settings.m_DVchannel] > DV_PPMs[DISPLAY_COMB_CURRENT])
{
#ifdef WATTMETER_ICON
if(settings.m_wattMeter > 0 && settings.m_displaySymbols == 1)
{
const int16_t wattPercentage = 20; //95% of max
Expand Down Expand Up @@ -857,6 +856,7 @@ void loop(){
}
}
else
#endif
{
OSD.printInt16(settings.m_OSDItems[AMPS][0], settings.m_OSDItems[AMPS][1], current, 1, "a", 2, AMPSp);
}
Expand All @@ -868,7 +868,8 @@ void loop(){
}

if(AuxChanVals[settings.m_DVchannel] > DV_PPMs[DISPLAY_MA_CONSUMPTION])
{
{
#ifdef MAH_ICON
if(settings.m_displaySymbols == 1)
{
uint8_t batCount = (LipoMAH+previousMAH) / settings.m_batSlice;
Expand All @@ -891,6 +892,7 @@ void loop(){
OSD.print(batterySymbol);
}
else
#endif
{
OSD.printInt16(settings.m_OSDItems[MAH][0], settings.m_OSDItems[MAH][1], LipoMAH+previousMAH, 0, "mah", 0, MAHp);
}
Expand All @@ -907,6 +909,7 @@ void loop(){

if(AuxChanVals[settings.m_DVchannel] > DV_PPMs[DISPLAY_ESC_KRPM])
{
#ifdef PROP_ICON
static char KR[4];
if(settings.m_displaySymbols == 1 && settings.m_props == 1)
{
Expand Down Expand Up @@ -945,6 +948,7 @@ void loop(){
OSD.print(KR[3]);
}
else
#endif
{
static char KR2[3];
KR2[0] = 'k';
Expand Down Expand Up @@ -1081,7 +1085,7 @@ void loop(){
cleanScreen();
}


#ifdef SHOW_KISS_LOGO
if(!logoDone && armed == 0 && !menuActive && !armedOnce)
{
uint8_t logoCol = 11;
Expand Down Expand Up @@ -1126,6 +1130,9 @@ void loop(){
cleanScreen();
}
}
#else
logoDone = true;
#endif

if(symbolOnOffChanged)
{
Expand Down
2 changes: 1 addition & 1 deletion KISS_OSD/Menu.ino
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ void* MainMenu()
static const char FILTER_STR[] PROGMEM = "filters";
static const char BATTERY_PAGE_STR[] PROGMEM = "battery";
static const char VTX_PAGE_STR[] PROGMEM = "vtx";
static const char SYMBOLS_SIZE_STR[] PROGMEM = "symbols : ";
static const char SYMBOLS_SIZE_STR[] PROGMEM = "icons : ";
static const char AIR_TIMER_STR[] PROGMEM = "air timer: ";
#ifdef CROSSHAIR
static const char CROSSHAIR_STR[] PROGMEM = "crosshair: ";
Expand Down
2 changes: 1 addition & 1 deletion KISS_OSD_CONFIG/Menu_Config.ino
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ void* DisplayMenu()
static const char DV_CHANNEL_STR[] PROGMEM = "dv channel : ";
static const char TEMP_UNIT_STR[] PROGMEM = "temp. unit : ";
static const char FONT_SIZE_STR[] PROGMEM = "font size : ";
static const char SYMBOLS_SIZE_STR[] PROGMEM = "symbols : ";
static const char SYMBOLS_SIZE_STR[] PROGMEM = "icons : ";
static const char GOGGLE_STR[] PROGMEM = "goggle : ";
static const char BEERMUG_STR[] PROGMEM = "watt meter : ";
static const char PROPS_STR[] PROGMEM = "props : ";
Expand Down

0 comments on commit 11dcfdb

Please sign in to comment.