/C-OSD/trunk/CHANGE.LOG |
---|
1,4 → 1,4 |
/**************************************************************************** |
/**************************************************************************** |
* Copyright (C) 2009-2011 by Claas Anders "CaScAdE" Rathje * |
* admiralcascade@gmail.com * |
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ * |
18,6 → 18,11 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
****************************************************************************/ |
20110307-1845 |
*added debug output option for MAX7456 emulation |
*moved horizon one line higher when displaying GPS-Coordinates |
*fixed small glitch in menu |
20110202-1323 |
*added big speed indicator (credits to: uwerner) |
*added possibility to show GPS-Coordinates during flight |
/C-OSD/trunk/config.c |
---|
317,7 → 317,7 |
* some sort of clicking response in the menu |
*/ |
void config_menu_doclick(uint8_t chosen) { |
write_ascii_string_pgm(MENU_LEFT, chosen + MENU_TOP - 6, PSTR("DONE ")); |
write_ascii_string_pgm(MENU_LEFT, chosen + MENU_TOP - 7, PSTR("DONE ")); |
_delay_ms(500); |
config_menu_drawings(chosen); |
} |
/C-OSD/trunk/main.c |
---|
303,10 → 303,17 |
// init usart |
usart1_init(); |
#ifdef SERIALDEBUGDRAW |
#define USART0ENABLE 1 |
#endif |
#ifdef ANTENNATRACKTEST |
#define USART0ENABLE 1 |
#endif |
#ifdef ANTENNATRACKTEST |
#ifdef USART0ENABLE |
usart0_init(); |
usart0_puts("\x1B[2J\x1B[H"); |
usart0_puts("Welcome\r\n"); |
#endif |
// keep serial port clean |
/C-OSD/trunk/main.h |
---|
78,6 → 78,9 |
// ### Antenna Tracking |
//#define ANTENNATRACKTEST 1 |
// ### serial output of stuff sent to MAX7456 |
//#define SERIALDEBUGDRAW 1 |
/* ########################################################################## |
* FLAGS usable during runtime that get saved |
* ##########################################################################*/ |
/C-OSD/trunk/max7456_software_spi.c |
---|
25,6 → 25,7 |
#include <string.h> |
#include <stdlib.h> |
#include "max7456_software_spi.h" |
#include "usart0.h" |
char conv_array[7]; // general array for number -> char conversation |
70,6 → 71,15 |
// end sending |
MAX_CS_HIGH |
#ifdef SERIALDEBUGDRAW |
uint8_t c = address + byte; |
usart0_puts("#3"); |
usart0_putc(address); |
usart0_putc(byte); |
usart0_putc(c); |
usart0_puts("\n"); |
#endif |
} |
/** |
/C-OSD/trunk/osd_ncmode_default.c |
---|
146,6 → 146,14 |
write_ndigit_number_u(23, top_line + 1, naviData.HomePositionDeviation.Distance / 10, 4, 0); |
} |
// show coords only when configure AND stats are off OR stats are on and motors are off |
if ((COSD_FLAGS_CONFIG & COSD_FLAG_SHOW_COORDS) |
&& ((naviData.FCFlags & FCFLAG_MOTOR_RUN) |
|| !((COSD_FLAGS_RUNTIME & COSD_WASFLYING) && (COSD_FLAGS_MODES & COSD_FLAG_STATS)))) { |
write_gps_pos(15, bottom_line - 2, naviData.CurrentPosition.Longitude); |
write_gps_pos(15, bottom_line - 1, naviData.CurrentPosition.Latitude); |
} |
// center |
if (naviData.FCFlags & FCFLAG_MOTOR_RUN) { // should be engines running |
if (!(old_MKFlags & FCFLAG_MOTOR_RUN)) { // motors just started, clear middle |
170,6 → 178,10 |
if ((COSD_FLAGS_RUNTIME & COSD_FLAG_STROMREC) || (COSD_FLAGS_MODES & COSD_FLAG_FCCURRENT)) { |
horizon_bottom--; |
} |
if (COSD_FLAGS_CONFIG & COSD_FLAG_SHOW_COORDS) { |
horizon_bottom--; |
} |
if (COSD_FLAGS_MODES & COSD_FLAG_AGGRHORIZON) { |
draw_agressiva_artificial_horizon(top_line + 2, horizon_bottom, naviData.AngleNick, naviData.AngleRoll); |
} else { |
200,14 → 212,8 |
} |
} |
// show coords only when configure AND stats are off OR stats are on and motors are off |
if ((COSD_FLAGS_CONFIG & COSD_FLAG_SHOW_COORDS) |
&& ((naviData.FCFlags & FCFLAG_MOTOR_RUN) |
|| !((COSD_FLAGS_RUNTIME & COSD_WASFLYING) && (COSD_FLAGS_MODES & COSD_FLAG_STATS)))) { |
write_gps_pos(15, bottom_line - 2, naviData.CurrentPosition.Longitude); |
write_gps_pos(15, bottom_line - 1, naviData.CurrentPosition.Latitude); |
} |
if (COSD_FLAGS_MODES & COSD_FLAG_BIGVARIO) { |
draw_big_variometer(27, 8, naviData.Variometer); |
} |
/C-OSD/trunk/usart0.c |
---|
24,9 → 24,18 |
#include <util/delay.h> |
#include "usart0.h" |
#ifdef ANTENNATRACKTEST |
#ifdef SERIALDEBUGDRAW |
#define USART0ENABLE 1 |
#endif |
#ifdef ANTENNATRACKTEST |
#define USART0ENABLE 1 |
#endif |
#ifdef USART0ENABLE |
#if !(ALLCHARSDEBUG|(WRITECHARS != -1)) |
46,6 → 55,10 |
//asynchronous 8N1 |
UCSR0C = (1 << URSEL0) | (3 << UCSZ00); |
DDRD |= (1 << DDD1); // set TXD pin as output |
PORTD &= ~(1 << PORTD1); // disable pullup on TXD pin |
} |
101,4 → 114,4 |
#endif |
#endif // ANTENNATRACKTEST |
#endif // USART0ENABLE |
/C-OSD/trunk/usart0.h |
---|
18,8 → 18,15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
****************************************************************************/ |
#ifdef ANTENNATRACKTEST |
#ifdef SERIALDEBUGDRAW |
#define USART0ENABLE 1 |
#endif |
#ifdef ANTENNATRACKTEST |
#define USART0ENABLE 1 |
#endif |
#ifdef USART0ENABLE |
#ifndef _USART0_H |
#define _USART0_H |
31,22 → 38,22 |
void usart0_init(); |
/** |
* send a single <character> through usart1 |
*/ |
void usart0_putc(unsigned char character); |
/** |
* send a <string> throught usart0 |
*/ |
void usart0_puts(char *s); |
/** |
* send a PGM<string> throught usart1 |
*/ |
void usart0_puts_pgm(const char* string); |
/** |
* send a single <character> through usart1 |
*/ |
void usart0_putc(unsigned char character); |
/** |
* send a <string> throught usart0 |
*/ |
void usart0_puts(char *s); |
/** |
* send a PGM<string> throught usart1 |
*/ |
void usart0_puts_pgm(const char* string); |
#endif |
#endif // ANTENNATRACKTEST |