/C-OSD/trunk/CHANGE.LOG |
---|
18,6 → 18,11 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
****************************************************************************/ |
20101218-2030 |
*added _brackets_ to mark a scope when using a second camera |
(might help to remember what the second camera is filming) |
@To see real corners, flash the new character-set included in this release! |
20101116-2110 |
*increased buffer so the new config struct really fits (fixes garbage after setting name) |
*fixed GPS-blink on startup |
/C-OSD/trunk/c-osd.mcm |
---|
15103,81 → 15103,81 |
01010101 |
01010101 |
01010101 |
01010101 |
01010101 |
01010101 |
01000000 |
00000000 |
00000000 |
00101010 |
10101010 |
10101010 |
10101000 |
00100000 |
00000000 |
00001000 |
00100010 |
00010100 |
10001000 |
00100010 |
00010010 |
10001000 |
00100010 |
00001010 |
10001000 |
00100010 |
00101010 |
10001000 |
00100010 |
10101010 |
10001000 |
00100010 |
10101010 |
10001000 |
00100010 |
00101010 |
10001000 |
00100010 |
00001010 |
10001000 |
00100010 |
00010010 |
10001000 |
00100010 |
00010100 |
10001000 |
00100000 |
00000000 |
00001000 |
00101010 |
10101010 |
10101010 |
01000000 |
00000000 |
00000000 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
01010000 |
00100001 |
01010101 |
01010101 |
01001010 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00000001 |
01010101 |
01010101 |
01010101 |
01010101 |
01010101 |
01010101 |
01010101 |
01010101 |
01010101 |
01010101 |
01010101 |
01010101 |
00000000 |
00000000 |
00000001 |
00101010 |
10101010 |
10101000 |
00000000 |
00000000 |
00001000 |
01010101 |
01010101 |
01001000 |
01010101 |
01010101 |
15214,12 → 15214,13 |
01001000 |
01010101 |
01010101 |
01001010 |
01001000 |
01010101 |
01010101 |
01010000 |
01001000 |
01010101 |
01010101 |
01000000 |
01010101 |
01010101 |
01010101 |
15230,58 → 15231,60 |
01010101 |
01010101 |
01010101 |
00000001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100001 |
01010101 |
01010101 |
00100000 |
00000000 |
00000000 |
00000000 |
00101010 |
10101010 |
10101010 |
10101010 |
10101000 |
01000000 |
00000000 |
00000000 |
00000000 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
10101010 |
00000000 |
00000000 |
00000000 |
10101010 |
10101010 |
10101010 |
00000000 |
00000000 |
00000000 |
01010101 |
01010101 |
01010101 |
15294,58 → 15297,58 |
01010101 |
01010101 |
01010101 |
01000000 |
01010101 |
01010101 |
01001000 |
01010101 |
01010101 |
01001000 |
01010101 |
01010101 |
01001000 |
01010101 |
01010101 |
01001000 |
01010101 |
01010101 |
01001000 |
01010101 |
01010101 |
01001000 |
01010101 |
01010101 |
01001000 |
01010101 |
01010101 |
01001000 |
01010101 |
01010101 |
01001000 |
01010101 |
01010101 |
01001000 |
01010101 |
01010101 |
01001000 |
01010101 |
01010101 |
01001000 |
01010101 |
01010101 |
01001000 |
01010101 |
01010101 |
01001000 |
00000000 |
00000000 |
00000000 |
00001000 |
00101010 |
10101010 |
10101010 |
10101010 |
10101000 |
00000000 |
00000000 |
00000000 |
10101010 |
10101010 |
10000101 |
10101010 |
10101010 |
10000101 |
10101010 |
10101010 |
10000101 |
10101010 |
10101010 |
10000101 |
10101010 |
10101010 |
10000101 |
10101010 |
10101010 |
10000101 |
10101010 |
10101010 |
10000101 |
10101010 |
10101010 |
10000101 |
10101010 |
10101010 |
10000101 |
10101010 |
10101010 |
10000101 |
00000000 |
00000000 |
00000000 |
10101010 |
10101010 |
10101010 |
00000000 |
00000000 |
00000000 |
00000001 |
01010101 |
01010101 |
01010101 |
15359,9 → 15362,6 |
01010101 |
01010101 |
01010101 |
01010101 |
01010101 |
01010101 |
00000000 |
00000000 |
00000000 |
/C-OSD/trunk/characters.c |
---|
33,7 → 33,7 |
*/ |
// chars 0 - 255 with 54 byte per char |
// orginal filename: c-osd.mcm |
// Mon, 12 Apr 2010 19:12:55 +0200 |
// Sat, 18 Dec 2010 19:59:48 +0100 |
5465,32 → 5465,32 |
const char chr235[] PROGMEM = {0x55, 0x28, 0x55, 0x54, 0xaa, 0x15, 0x52, 0xaa, 0x85, 0x4a, 0xaa, 0xa1, 0x2a, 0xaa, 0xa8, 0x40, 0x28, 0x01, 0x55, 0x28, 0x55, 0x00, 0x28, 0x00, 0x2a, 0xaa, 0xa8, 0x2a, 0xaa, 0xa8, 0x00, 0x00, 0x00, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55}; |
// 0 ------------ |
// 1 -########### |
// 2 # |
// 3 # ######## # |
// 4 # # #--# # # |
// 5 # # #-# # # |
// 6 # # ## # # |
// 7 # # # # # |
// 8 # # # # |
// 9 # # # # |
// 10 # # # # # |
// 11 # # ## # # |
// 12 # # #-# # # |
// 13 # # #--# # # |
// 14 # ######## # |
// 15 # |
// 16 -########### |
// 17 ------------ |
// 0 -########### |
// 1 # # |
// 2 # ########## |
// 3 # #--------- |
// 4 # #--------- |
// 5 # #--------- |
// 6 # #--------- |
// 7 # #--------- |
// 8 # #--------- |
// 9 # #--------- |
// 10 # #--------- |
// 11 # #--------- |
// 12 # #--------- |
// 13 # #--------- |
// 14 # #--------- |
// 15 # #--------- |
// 16 # #--------- |
// 17 ###--------- |
// 000000000011 |
// 012345678901 |
const char chr236[] PROGMEM = {0x55, 0x55, 0x55, 0x40, 0x00, 0x00, 0x2a, 0xaa, 0xaa, 0x20, 0x00, 0x08, 0x22, 0x14, 0x88, 0x22, 0x12, 0x88, 0x22, 0x0a, 0x88, 0x22, 0x2a, 0x88, 0x22, 0xaa, 0x88, 0x22, 0xaa, 0x88, 0x22, 0x2a, 0x88, 0x22, 0x0a, 0x88, 0x22, 0x12, 0x88, 0x22, 0x14, 0x88, 0x20, 0x00, 0x08, 0x2a, 0xaa, 0xaa, 0x40, 0x00, 0x00, 0x55, 0x55, 0x55}; |
const char chr236[] PROGMEM = {0x40, 0x00, 0x00, 0x2a, 0xaa, 0xa8, 0x20, 0x00, 0x00, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x01, 0x55, 0x55}; |
// 0 ------------ |
// 1 ----------## |
// 2 ---------# |
// 0 ###########- |
// 1 # # |
// 2 ########## # |
// 3 ---------# # |
// 4 ---------# # |
// 5 ---------# # |
5503,58 → 5503,58 |
// 12 ---------# # |
// 13 ---------# # |
// 14 ---------# # |
// 15 ---------# |
// 16 ----------## |
// 17 ------------ |
// 15 ---------# # |
// 16 ---------# # |
// 17 ---------### |
// 000000000011 |
// 012345678901 |
const char chr237[] PROGMEM = {0x55, 0x55, 0x55, 0x55, 0x55, 0x50, 0x55, 0x55, 0x4a, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x4a, 0x55, 0x55, 0x50, 0x55, 0x55, 0x55}; |
const char chr237[] PROGMEM = {0x00, 0x00, 0x01, 0x2a, 0xaa, 0xa8, 0x00, 0x00, 0x08, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x40}; |
// 0 ------------ |
// 1 ############ |
// 2 |
// 3 ############ |
// 4 |
// 5 |
// 6 |
// 7 |
// 8 |
// 9 |
// 10 |
// 11 |
// 12 |
// 13 |
// 14 ############ |
// 15 |
// 16 ############ |
// 17 ------------ |
// 0 ###--------- |
// 1 # #--------- |
// 2 # #--------- |
// 3 # #--------- |
// 4 # #--------- |
// 5 # #--------- |
// 6 # #--------- |
// 7 # #--------- |
// 8 # #--------- |
// 9 # #--------- |
// 10 # #--------- |
// 11 # #--------- |
// 12 # #--------- |
// 13 # #--------- |
// 14 # #--------- |
// 15 # ########## |
// 16 # # |
// 17 -########### |
// 000000000011 |
// 012345678901 |
const char chr238[] PROGMEM = {0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x55, 0x55, 0x55}; |
const char chr238[] PROGMEM = {0x01, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x21, 0x55, 0x55, 0x20, 0x00, 0x00, 0x2a, 0xaa, 0xa8, 0x40, 0x00, 0x00}; |
// 0 ------------ |
// 1 ############ |
// 2 |
// 3 ############ |
// 4 #-- |
// 5 #-- |
// 6 #-- |
// 7 #-- |
// 8 #-- |
// 9 #-- |
// 10 #-- |
// 11 #-- |
// 12 #-- |
// 13 #-- |
// 14 ############ |
// 15 |
// 16 ############ |
// 17 ------------ |
// 0 ---------### |
// 1 ---------# # |
// 2 ---------# # |
// 3 ---------# # |
// 4 ---------# # |
// 5 ---------# # |
// 6 ---------# # |
// 7 ---------# # |
// 8 ---------# # |
// 9 ---------# # |
// 10 ---------# # |
// 11 ---------# # |
// 12 ---------# # |
// 13 ---------# # |
// 14 ---------# # |
// 15 ########## # |
// 16 # # |
// 17 ###########- |
// 000000000011 |
// 012345678901 |
const char chr239[] PROGMEM = {0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x85, 0xaa, 0xaa, 0x85, 0xaa, 0xaa, 0x85, 0xaa, 0xaa, 0x85, 0xaa, 0xaa, 0x85, 0xaa, 0xaa, 0x85, 0xaa, 0xaa, 0x85, 0xaa, 0xaa, 0x85, 0xaa, 0xaa, 0x85, 0xaa, 0xaa, 0x85, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x55, 0x55, 0x55}; |
const char chr239[] PROGMEM = {0x55, 0x55, 0x40, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x55, 0x55, 0x48, 0x00, 0x00, 0x08, 0x2a, 0xaa, 0xa8, 0x00, 0x00, 0x01}; |
// 0 ------------ |
/C-OSD/trunk/config.c |
---|
28,6 → 28,7 |
#include "config.h" |
#include "buttons.h" |
#include "usart1.h" |
#include "osd_helpers.h" |
#if !(ALLCHARSDEBUG|(WRITECHARS != -1)) |
36,6 → 37,12 |
uint8_t EEMEM ee_COSD_FLAGS_MODES = 0; |
uint8_t EEMEM ee_COSD_FLAGS_CONFIG = 0; |
uint8_t EEMEM ee_COSD_DISPLAYMODE = 0; |
uint8_t EEMEM ee_COSD_SCOPE [8] = { |
5, 5, |
25, 5, |
5, 10, |
25, 10 |
}; |
// video modes |
const char VM_PAL[] PROGMEM = "PAL "; |
57,6 → 64,9 |
COSD_FLAGS_CONFIG = eeprom_read_byte(&ee_COSD_FLAGS_CONFIG); |
COSD_DISPLAYMODE = eeprom_read_byte(&ee_COSD_DISPLAYMODE); |
//if (verbose) write_ndigit_number_u(23, 11, COSD_DISPLAYMODE, 2, 0); |
for (int i = 0; i < 8; i++) { |
scope[i] = eeprom_read_byte(&ee_COSD_SCOPE[i]); |
} |
} else { |
if (verbose) write_ascii_string_pgm(2, 2, ee_msg[1]); // Loading data |
} |
71,7 → 81,10 |
eeprom_write_byte(&ee_COSD_FLAGS_MODES, COSD_FLAGS_MODES); |
eeprom_write_byte(&ee_COSD_FLAGS_CONFIG, COSD_FLAGS_CONFIG); |
eeprom_write_byte(&ee_COSD_DISPLAYMODE, COSD_DISPLAYMODE); |
for (int i = 0; i < 8; i++) { |
eeprom_write_byte(&ee_COSD_SCOPE[i], scope[i]); |
} |
} |
/** |
* auto config some stuff on startup, currently only battery cells |
215,7 → 228,7 |
static uint8_t old_y = 0; |
uint8_t x = MENU_LEFT, y = MENU_TOP, line = MENU_TOP; |
if (chosen > 5 && chosen < 12) { // right |
if (chosen > 5 && chosen < 13) { // right |
x = MENU_MIDDLE; |
y = chosen - 6 + MENU_TOP; |
} else if (chosen < 7) { |
276,9 → 289,12 |
write_ascii_string_pgm(MENU_MIDDLE, ++line, PSTR("Passive")); |
onoff(MENU_MIDDLE + 10, line, COSD_FLAGS_CONFIG & COSD_FLAG_PASSIVE); |
/*write_ascii_string_pgm(MENU_MIDDLE, ++line, PSTR("?????")); |
onoff(MENU_MIDDLE + 10, line, COSD_FLAGS_CONFIG & COSD_FLAG_PASSIVE);*/ |
write_ascii_string_pgm(MENU_MIDDLE, ++line, PSTR("Cam Scope")); |
onoff(MENU_MIDDLE + 10, line, COSD_FLAGS_CONFIG & COSD_FLAG_SHOW_SCOPE); |
write_ascii_string_pgm(MENU_MIDDLE, ++line, PSTR("Move Scope")); |
// bottom |
write_ascii_string_pgm(MENU_LEFT, 9, PSTR("Reset uptime")); |
301,6 → 317,28 |
} |
/** |
* move around the four scope edges |
*/ |
void move_scope() { |
uint8_t mode = 0; |
clear(); |
draw_scope(); |
_delay_ms(500); |
while (mode < 8) { |
if (s2_pressed()) { // next |
mode++; |
_delay_ms(500); |
} else if (s1_pressed()) { |
scope[mode] = (scope[mode] + 1) % (mode % 2 == 0 ? 30 : bottom_line); |
clear(); |
draw_scope(); |
_delay_ms(100); |
} |
} |
clear(); |
} |
/** |
* a simple config menu tryout |
*/ |
void config_menu(void) { |
322,7 → 360,7 |
while (inmenu) { |
if (s2_pressed()) { |
chosen = (chosen + 1) % 17; |
if (chosen == 11) chosen = 13; // SKIP unused menu space for now |
//if (chosen == 12) chosen = 13; // SKIP unused menu space for now |
config_menu_drawings(chosen); |
_delay_ms(500); |
} else if (s1_pressed()) { |
372,6 → 410,12 |
case 10: // passive |
COSD_FLAGS_CONFIG ^= COSD_FLAG_PASSIVE; |
break; |
case 11: // scope |
COSD_FLAGS_CONFIG ^= COSD_FLAG_SHOW_SCOPE; |
break; |
case 12: // move scope |
move_scope(); |
break; |
case 13: // reset uptime |
uptime = 0; |
config_menu_doclick(chosen); |
/C-OSD/trunk/config.h |
---|
22,8 → 22,8 |
#define _CONFIG_H |
#define CHECKBYTE1 64 |
#define CHECKBYTE2 46 |
#define CHECKBYTE1 230 |
#define CHECKBYTE2 32 |
#define MENU_LEFT 1 |
#define MENU_MIDDLE 15 |
36,6 → 36,8 |
extern volatile uint16_t uptime; |
extern uint8_t scope[8]; |
/** |
* read data saved in eeprom, print out message if <verbose> is set |
*/ |
/C-OSD/trunk/default/dist.bat |
---|
19,7 → 19,7 |
:: * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
:: ****************************************************************************/ |
set DATE=20101116-2110 |
set DATE=20101218-2030 |
:: date /T |
/C-OSD/trunk/main.c |
---|
84,6 → 84,13 |
uint8_t min_voltage = 0; |
uint8_t max_voltage = 0; |
uint8_t scope[8] = { |
5, 5, |
25, 5, |
5, 10, |
25, 10 |
}; |
// Flags |
uint8_t COSD_FLAGS_MODES = 0, COSD_FLAGS_CONFIG = 0, COSD_FLAGS_RUNTIME = 0, COSD_DISPLAYMODE = 0; |
/C-OSD/trunk/main.h |
---|
96,6 → 96,7 |
#define COSD_FLAG_FCMODE 4 |
#define COSD_FLAG_FEET 8 |
#define COSD_FLAG_PASSIVE 16 |
#define COSD_FLAG_SHOW_SCOPE 32 |
/* ########################################################################## |
* FLAGS only usable during runtime (not saved) |
178,6 → 179,9 |
uint8_t min_voltage; |
uint8_t max_voltage; |
// scope for 2nd camera field of view |
uint8_t scope[8]; |
// Flags |
uint8_t COSD_FLAGS_MODES, COSD_FLAGS_CONFIG, COSD_FLAGS_RUNTIME, COSD_DISPLAYMODE; |
/C-OSD/trunk/osd_helpers.c |
---|
182,6 → 182,7 |
write_string_pgm_down(x, y - 2, (const char *)(pgm_read_word(&(vario_pnt[index]))), 5); |
} |
/* ########################################################################## |
* NEW artificial horizon By AGRESSiVA --=-- COPTERTRONiC |
* ##########################################################################*/ |
315,5 → 316,20 |
old_af_y = nicky; |
} |
/** |
* draw scope of a second camera |
*/ |
void draw_scope() { |
/* |
write_char_xy(scope[0], scope[1], 0xEC); |
write_char_xy(scope[2], scope[3], 0xED); |
write_char_xy(scope[4], scope[5], 0xEE); |
write_char_xy(scope[6], scope[7], 0xEF); |
*/ |
// save 20 byte :) |
for (int i = 0; i < 4; i++) { |
write_char_xy(scope[i * 2], scope[(i * 2) + 1], 0xEC + i); |
} |
} |
#endif |
/C-OSD/trunk/osd_helpers.h |
---|
73,5 → 73,8 |
void draw_agressiva_artificial_horizon(uint8_t, uint8_t, int16_t, int16_t); |
/** |
* draw scope of a second camera |
*/ |
void draw_scope(); |
#endif |
/C-OSD/trunk/osd_ncmode_default.c |
---|
292,7 → 292,13 |
} else { // (naviData.NCFlags & NC_FLAG_FREE) |
write_char_xy(27, bottom_line, 201); // sat2 (free) |
} |
// after all, draw scope |
if (COSD_FLAGS_CONFIG & COSD_FLAG_SHOW_SCOPE) { |
draw_scope(); |
} |
} |
//write_number_s(8, 5, RxDataLen); |
//write_number_s(16, 5, setsReceived++); |