Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Commit

Permalink
added new symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
SAMUD committed Mar 1, 2017
1 parent 545533a commit d1da420
Show file tree
Hide file tree
Showing 10 changed files with 2,419 additions and 2,445 deletions.
Binary file modified KISS_OSD/Debug/KISS_OSD.cpp.o
Binary file not shown.
Binary file modified KISS_OSD/Debug/KISS_OSD.elf
Binary file not shown.
2,364 changes: 1,178 additions & 1,186 deletions KISS_OSD/Debug/KISS_OSD.hex

Large diffs are not rendered by default.

Binary file modified KISS_OSD/Debug/KISS_OSD.ino.elf
Binary file not shown.
2,364 changes: 1,178 additions & 1,186 deletions KISS_OSD/Debug/KISS_OSD.ino.hex

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions KISS_OSD/Debug/board.buildinfo
Original file line number Diff line number Diff line change
Expand Up @@ -329,41 +329,41 @@ vm.build.verbose_build_properties=false
build.source.path=C:\Users\sdaur\Documents\GitHub\KISS-OSD\KISS_OSD\KISS_OSD.ino
build.path=D:\Win10\Temp\VMBuilds\KISS_OSD\pro_16MHzatmega328
PreProcessor.HeaderCount=1
PreProcessor.PrototypeCount=28
PreProcessor.PrototypeCount=29
vm.last.preproc.file.0.file=KISS_OSD.ino
vm.last.preproc.file.0.offset=1
vm.last.preproc.file.0.length=5135
vm.last.preproc.file.0.linecount=190
vm.last.preproc.file.0.length=4441
vm.last.preproc.file.0.linecount=163
vm.last.preproc.file.0.linestart=0
vm.last.preproc.file.0.lineend=190
vm.last.preproc.file.0.lineend=163
vm.last.preproc.file.0.prefix_lines=0
vm.last.preproc.file.1.file=EEPROM_Handling.ino
vm.last.preproc.file.1.offset=191
vm.last.preproc.file.1.offset=164
vm.last.preproc.file.1.length=3021
vm.last.preproc.file.1.linecount=94
vm.last.preproc.file.1.linestart=190
vm.last.preproc.file.1.lineend=284
vm.last.preproc.file.1.linestart=163
vm.last.preproc.file.1.lineend=257
vm.last.preproc.file.1.prefix_lines=0
vm.last.preproc.file.2.file=Functions_algo.ino
vm.last.preproc.file.2.offset=285
vm.last.preproc.file.2.length=21109
vm.last.preproc.file.2.linecount=654
vm.last.preproc.file.2.linestart=284
vm.last.preproc.file.2.lineend=938
vm.last.preproc.file.2.offset=258
vm.last.preproc.file.2.length=21589
vm.last.preproc.file.2.linecount=675
vm.last.preproc.file.2.linestart=257
vm.last.preproc.file.2.lineend=932
vm.last.preproc.file.2.prefix_lines=0
vm.last.preproc.file.3.file=GlobalVar.h
vm.last.preproc.file.3.offset=0
vm.last.preproc.file.3.length=5490
vm.last.preproc.file.3.linecount=180
vm.last.preproc.file.3.linestart=938
vm.last.preproc.file.3.lineend=1118
vm.last.preproc.file.3.length=5323
vm.last.preproc.file.3.linecount=172
vm.last.preproc.file.3.linestart=932
vm.last.preproc.file.3.lineend=1104
vm.last.preproc.file.3.prefix_lines=0
vm.last.preproc.file.4.file=Menue.ino
vm.last.preproc.file.4.offset=939
vm.last.preproc.file.4.offset=933
vm.last.preproc.file.4.length=16780
vm.last.preproc.file.4.linecount=672
vm.last.preproc.file.4.linestart=1118
vm.last.preproc.file.4.lineend=1790
vm.last.preproc.file.4.linestart=1104
vm.last.preproc.file.4.lineend=1776
vm.last.preproc.file.4.prefix_lines=0
sketch_path=C:\Users\sdaur\Documents\GitHub\KISS-OSD\KISS_OSD
vm.sketch_source_path=D:\Win10\Temp\VMBuilds\KISS_OSD\pro_16MHzatmega328
Expand All @@ -372,7 +372,7 @@ build.project_name=KISS_OSD.ino
runtime.vm.ide.platforms.path=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\bcmk3pdw.ga2\Micro Platforms
build.variant.path=C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs
archive_file=core.a
extra.time.local=69663573
extra.time.local=71488879
tools.ctags.path={runtime.tools.ctags.path}
tools.ctags.cmd.path={path}/ctags
tools.ctags.pattern="{cmd.path}" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "{source_file}"
Expand Down
49 changes: 35 additions & 14 deletions KISS_OSD/Functions_algo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void getSerialData()
{


#define STARTCOUNT 2

while (Serial.available()) serialBuf[recBytes++] = Serial.read();
if (recBytes == 1 && serialBuf[0] != 5)recBytes = 0; // check for start byte, reset if its wrong
if (recBytes == 2) minBytes = serialBuf[1] + STARTCOUNT + 1; // got the transmission length
Expand Down Expand Up @@ -256,21 +256,18 @@ void DisplayOSD()
if (reducedModeDisplay != lastMode)
{
lastMode = reducedModeDisplay;
for (i = 0; i<20; i++)
{
OSD.setCursor(0, i);
OSD.print(clean);
}
OSD.clear();
while(OSD.clearIsBusy())
while (!OSD.notInVSync());
}

if (reducedModeDisplay == 0 && Settings.DispRCThrottle1 || reducedModeDisplay == 1 && Settings.DispRCThrottle2 || reducedModeDisplay == 2 && Settings.DispRCThrottle3)
{
OSD.setCursor(0, 0);
OSD.print(F("THROT:"));
OSD.write(SYM_THR);
ClearTempCharConverted();
TempCharPosition = print_int16(StickChanVals[0] / 10, TempCharConverted, 0, 1);
TempCharConverted[TempCharPosition++] = '%';
TempCharConverted[TempCharPosition++] = SYM_PERC;
OSD.print(TempCharConverted);
ESCmarginTop = 1;
}
Expand Down Expand Up @@ -420,29 +417,29 @@ void DisplayOSD()
//temp1
ClearTempCharConverted();
TempCharPosition = print_int16(ESCTemps[0], TempCharConverted, 0, 1);
TempCharConverted[TempCharPosition++] = 'C';
TempCharConverted[TempCharPosition++] = SYM_TEMP_C;
OSD.setCursor(0, TMPmargin + ESCmarginTop);
OSD.print(TempCharConverted);

//temp2
ClearTempCharConverted();
TempCharPosition = print_int16(ESCTemps[1], TempCharConverted, 0, 1);
TempCharConverted[TempCharPosition++] = 'C';
OSD.setCursor(-TempCharPosition - 1, TMPmargin + ESCmarginTop);
TempCharConverted[TempCharPosition++] = SYM_TEMP_C;
OSD.setCursor(-TempCharPosition, TMPmargin + ESCmarginTop);
OSD.print(TempCharConverted);

//temp4
ClearTempCharConverted();
TempCharPosition = print_int16(ESCTemps[3], TempCharConverted, 0, 1);
TempCharConverted[TempCharPosition++] = 'C';
TempCharConverted[TempCharPosition++] = SYM_TEMP_C;
OSD.setCursor(0, -(1 + TMPmargin + ESCmarginBot));
OSD.print(TempCharConverted);

//temp3
ClearTempCharConverted();
TempCharPosition = print_int16(ESCTemps[2], TempCharConverted, 0, 1);
TempCharConverted[TempCharPosition++] = 'C';
OSD.setCursor(-TempCharPosition - 1, -(1 + TMPmargin + ESCmarginBot));
TempCharConverted[TempCharPosition++] = SYM_TEMP_C;
OSD.setCursor(-TempCharPosition, -(1 + TMPmargin + ESCmarginBot));
OSD.print(TempCharConverted);

}
Expand Down Expand Up @@ -651,4 +648,28 @@ void ClearTempCharConverted()
{
TempCharConverted[i] = ' ';
}
}

void WaitForKissFc()
{
OSD.setCursor(9, 0);
OSD.print(F("SAMUD OSD"));
OSD.setCursor(6, 1);
OSD.print(F("CUSTOM KISS OSD"));
OSD.setCursor(5, 2);
OSD.print(F("ENJOY YOUR FLIGHT"));
OSD.setCursor(0, 13);
OSD.print(F("USING "));
if (OSD.videoSystem() == 1)
OSD.print(F("PAL"));
else if (OSD.videoSystem() == 2)
OSD.print(F("NTSC"));
OSD.setCursor(0, 14);
OSD.print(F("WAITING FOR KISS FC... "));
for (int i = 0; i < 10; i++)
{
wdt_reset();
delay(1000);
}
OSD.clear();
}
12 changes: 2 additions & 10 deletions KISS_OSD/GlobalVar.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,11 @@
#define DStandbyCurrent 1000 //*
//*************************************************


const byte osdChipSelect = 6;
const byte masterOutSlaveIn = MOSI;
const byte masterInSlaveOut = MISO;
const byte slaveClock = SCK;
const byte osdReset = 2;
#define osdChipSelect 6
#define STARTCOUNT 2

MAX7456 OSD(osdChipSelect);

static char clean[30];

//static uint8_t firstloop = 0;
static uint8_t BatteryCells = 0; //stores the number of cells recognized in the first run
static boolean VoltageAlarm = false; //works with the const defined in the beginning | Filters Voltage drops to avoid erratic voltage alarms
Expand Down Expand Up @@ -111,8 +105,6 @@ static uint8_t lastMode = 0;
static uint8_t TempCharPosition;
static char TempCharConverted[8];

static char Time[10];

static uint32_t LastLoopTime;

static uint32_t tmpVoltage = 0;
Expand Down
34 changes: 5 additions & 29 deletions KISS_OSD/KISS_OSD.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ KISS FC OSD
by Samuel Daurat ([email protected])
based on the code by Felix Niessen ([email protected])
*/
# define OSDVersion "5.4"
# define OSDVersion "5.5"
#define DMemoryVersion 6
/*
*****************************************************************************************************
Expand Down Expand Up @@ -103,15 +103,10 @@ void setup() {

OSD.display(); //enable OSD output

//clean used area
uint8_t i = 0;
for (i = 0; i<30; i++) clean[i] = ' ';

while (!OSD.notInVSync());
for (i = 0; i<20; i++)
{
OSD.setCursor(0, i);
OSD.print(clean);
}
OSD.clear();
while(OSD.clearIsBusy())

//set blinktime
OSD.setBlinkingTime(2); //0-3
Expand All @@ -120,26 +115,7 @@ void setup() {
//set the Offset
OSD.setTextOffset(Settings.OffsetX, Settings.OffsetY);

OSD.setCursor(9, 0);
OSD.print(F("SAMUD OSD"));
OSD.setCursor(6, 1);
OSD.print(F("CUSTOM KISS OSD"));
OSD.setCursor(5, 2);
OSD.print(F("ENJOY YOUR FLIGHT"));
OSD.setCursor(0, 13);
OSD.print(F("USING "));
if(OSD.videoSystem() == 1)
OSD.print(F("PAL"));
else if(OSD.videoSystem() == 2)
OSD.print(F("NTSC"));
OSD.setCursor(0, 14);
OSD.print(F("WAITING FOR KISS FC... "));
for (int i = 0; i < 10; i++)
{
wdt_reset();
delay(1000);
}
OSD.clear();
WaitForKissFc();

Serial.begin(115200);

Expand Down
1 change: 1 addition & 0 deletions KISS_OSD/symbols.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
// Throttle Position (%)
#define SYM_THR 0XC8
#define SYM_THR1 0XC9
#define SYM_PERC 0X25

// RSSI
#define SYM_RSSI 0XBA
Expand Down

0 comments on commit d1da420

Please sign in to comment.