Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 1770 → Rev 1771

/C-OSD/trunk/default/dist.bat
20,7 → 20,7
:: ****************************************************************************/
 
set OSDBUILDDATE=%DATE:~-4,4%%DATE:~-7,2%%DATE:~0,2%-%TIME:~0,2%%TIME:~3,2%
::set OSDBUILDDATE=20120723-1900
::set OSDBUILDDATE=20121102-1245
echo "Building: %OSDBUILDDATE%"
 
:: date /T
/C-OSD/trunk/CHANGE.LOG
18,6 → 18,10
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
****************************************************************************/
 
20121102-1245
*small init fix for display modes
*small change in ppm handling
20120723-1900
*expanded ampere wasted to 5digits in nc_mode_default
/C-OSD/trunk/c-osd.aws
1,0 → 0,0
<AVRWorkspace><IOSettings><CurrentRegisters/></IOSettings><part name="ATMEGA162"/><Files><File00000 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\main.c" Position="2294 149 2964 612" LineCol="146 0" State="Maximized"/><File00001 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\mk-data-structs.h" Position="2316 171 3000 626" LineCol="221 0" State="Maximized"/><File00002 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\max7456_software_spi.h" Position="2338 193 3022 648" LineCol="42 0" State="Maximized"/><File00003 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\max7456_software_spi.c" Position="2360 215 3044 670" LineCol="180 0" State="Maximized"/><File00004 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\usart1.c" Position="2382 237 3066 692" LineCol="224 0" State="Maximized"/><File00005 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\usart1.h" Position="2404 259 3088 714" LineCol="25 0" State="Maximized"/><File00006 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\characters.c" Position="2426 281 3110 736" LineCol="0 0" State="Maximized"/><File00007 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\main.h" Position="2448 303 3132 758" LineCol="39 23" State="Maximized"/><File00008 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_helpers.c" Position="2470 325 3154 780" LineCol="360 0" State="Maximized"/><File00009 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_helpers.h" Position="2492 347 3176 802" LineCol="0 0" State="Maximized"/><File00010 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_default.c" Position="2290 126 3184 810" LineCol="229 35" State="Maximized"/><File00011 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_default.c" Position="2316 171 3000 626" LineCol="12 0" State="Maximized"/><File00012 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\config.c" Position="2338 193 3022 648" LineCol="159 0" State="Maximized"/><File00013 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\config.h" Position="2360 215 3044 670" LineCol="0 0" State="Maximized"/><File00014 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\spi.c" Position="2382 237 3066 692" LineCol="0 0" State="Maximized"/><File00015 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\spi.h" Position="2404 259 3088 714" LineCol="0 0" State="Maximized"/><File00016 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\buttons.c" Position="2426 281 3110 736" LineCol="0 0" State="Maximized"/><File00017 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\buttons.h" Position="2448 303 3132 758" LineCol="0 0" State="Maximized"/><File00018 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\ppm.c" Position="2470 325 3154 780" LineCol="0 0" State="Maximized"/><File00019 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\ppm.h" Position="2492 347 3176 802" LineCol="0 0" State="Maximized"/><File00020 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_minimal.c" Position="2294 149 2978 604" LineCol="25 0" State="Maximized"/><File00021 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_default.h" Position="2316 171 3000 626" LineCol="25 0" State="Maximized"/><File00022 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_minimal.h" Position="2338 193 3022 648" LineCol="25 0" State="Maximized"/><File00023 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_default.h" Position="2360 215 3044 670" LineCol="0 0" State="Maximized"/><File00024 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\characters.h" Position="2382 237 3066 692" LineCol="0 0" State="Maximized"/><File00025 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_jopl.c" Position="2404 259 3088 714" LineCol="28 0" State="Maximized"/><File00026 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\default\Makefile" Position="2426 281 3110 736" LineCol="0 0" State="Maximized"/><File00027 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\usart0.c" Position="2448 303 3132 758" LineCol="0 0" State="Maximized"/><File00028 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\usart0.h" Position="2470 325 3154 780" LineCol="3 0" State="Maximized"/><File00029 Name="c:\WinAVR\avr\include\math.h" Position="2492 347 3176 802" LineCol="0 0" State="Maximized"/></Files></AVRWorkspace>
<AVRWorkspace><IOSettings><CurrentRegisters/></IOSettings><part name="ATMEGA162"/><Files><File00000 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\main.c" Position="470 126 1140 589" LineCol="146 0" State="Maximized"/><File00001 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\mk-data-structs.h" Position="492 148 1176 603" LineCol="221 0" State="Maximized"/><File00002 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\max7456_software_spi.h" Position="514 170 1198 625" LineCol="42 0" State="Maximized"/><File00003 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\max7456_software_spi.c" Position="536 192 1220 647" LineCol="180 0" State="Maximized"/><File00004 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\usart1.c" Position="558 214 1242 669" LineCol="224 0" State="Maximized"/><File00005 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\usart1.h" Position="580 236 1264 691" LineCol="25 0" State="Maximized"/><File00006 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\characters.c" Position="602 258 1286 713" LineCol="0 0" State="Maximized"/><File00007 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\main.h" Position="624 280 1308 735" LineCol="39 25" State="Maximized"/><File00008 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_helpers.c" Position="646 302 1330 757" LineCol="360 0" State="Maximized"/><File00009 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_helpers.h" Position="668 324 1352 779" LineCol="0 0" State="Maximized"/><File00010 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_default.c" Position="470 126 1154 581" LineCol="28 0" State="Maximized"/><File00011 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_default.c" Position="492 148 1176 603" LineCol="35 12" State="Maximized"/><File00012 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\config.c" Position="466 103 1358 788" LineCol="209 0" State="Maximized"/><File00013 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\config.h" Position="536 192 1220 647" LineCol="0 0" State="Maximized"/><File00014 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\spi.c" Position="558 214 1242 669" LineCol="0 0" State="Maximized"/><File00015 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\spi.h" Position="580 236 1264 691" LineCol="0 0" State="Maximized"/><File00016 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\buttons.c" Position="602 258 1286 713" LineCol="0 0" State="Maximized"/><File00017 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\buttons.h" Position="624 280 1308 735" LineCol="0 0" State="Maximized"/><File00018 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\ppm.c" Position="646 302 1330 757" LineCol="60 42" State="Maximized"/><File00019 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\ppm.h" Position="668 324 1352 779" LineCol="24 35" State="Maximized"/><File00020 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_minimal.c" Position="470 126 1154 581" LineCol="30 12" State="Maximized"/><File00021 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_default.h" Position="492 148 1176 603" LineCol="25 0" State="Maximized"/><File00022 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_minimal.h" Position="514 170 1198 625" LineCol="25 0" State="Maximized"/><File00023 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_default.h" Position="536 192 1220 647" LineCol="0 0" State="Maximized"/><File00024 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\characters.h" Position="558 214 1242 669" LineCol="0 0" State="Maximized"/><File00025 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_jopl.c" Position="580 236 1264 691" LineCol="161 28" State="Maximized"/><File00026 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\default\Makefile" Position="602 258 1286 713" LineCol="0 0" State="Maximized"/><File00027 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\usart0.c" Position="624 280 1308 735" LineCol="0 0" State="Maximized"/><File00028 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\usart0.h" Position="646 302 1330 757" LineCol="3 0" State="Maximized"/><File00029 Name="c:\WinAVR\avr\include\math.h" Position="668 324 1352 779" LineCol="0 0" State="Maximized"/></Files></AVRWorkspace>
/C-OSD/trunk/config.c
49,7 → 49,11
const char VM_PAL[] PROGMEM = "PAL ";
const char VM_NTSC[] PROGMEM = "NTSC";
 
const displaymode_t * mode;
#if FCONLY
const displaymode_t * mode = fcdisplaymodes;
#else
const displaymode_t * mode = ncdisplaymodes;
#endif
 
/**
* read data saved in eeprom, print out message if <verbose> is set
93,7 → 97,7
write_ascii_string_pgm(3, 2, PSTR("boot"));
draw_logo(11, 1);
 
write_ascii_string_pgm(2, 5, PSTR(BUILDDATE));
write_ascii_string_pgm(2, 5, PSTR(BUILDOSDBUILDDATE));
 
get_eeprom(1);
 
105,6 → 109,15
}
 
 
 
write_ascii_string_pgm(2, 7, PSTR("Setting :"));
write_ascii_string_pgm(2, 8, PSTR("Battery:")); // Guessing Number of Cells
write_ascii_string_pgm(13, 8, PSTR("Cells")); // Number of Cells
write_ascii_string_pgm(2, 9, PSTR("Warn:")); // Warn Voltage
write_ascii_string_pgm(14, 9, PSTR("Max:")); // Max Voltage
 
#if FCONLY
write_ascii_string_pgm(2, 4, PSTR("FC only Mode"));
#else
122,13 → 135,10
 
paramset_serial setting;
setting = *((paramset_serial*)pRxData);
 
write_ascii_string_pgm(2, 7, PSTR("Setting :"));
write_ndigit_number_u(10, 7, setting.SettingsIndex, 1, 1);
write_ascii_string_len(13, 7, setting.param.Name, 12);
 
uint8_t cells = 0;
write_ascii_string_pgm(2, 8, PSTR("Battery:")); // Guessing Number of Cells
if (CELL_NUM == -1) {
#define MAX_CELL_VOLTAGE 43 // max cell volatage for LiPO
 
152,10 → 162,7
max_voltage = cells * CELL_VOLT_MAX;
 
write_ndigit_number_u(11, 8, cells, 1, 0);
write_ascii_string_pgm(13, 8, PSTR("Cells")); // Number of Cells
write_ascii_string_pgm(2, 9, PSTR("Warn:")); // Warn Voltage
write_ndigit_number_s_10th(8, 9, min_voltage, 3, 0);
write_ascii_string_pgm(14, 9, PSTR("Max:")); // Max Voltage
write_ndigit_number_s_10th(20, 9, max_voltage, 3, 0);
 
 
/C-OSD/trunk/main.h
36,8 → 36,8
/* ##########################################################################
* Debugging and general purpose definitions
* ##########################################################################*/
#ifndef BUILDDATE
#define BUILDDATE "DEV "__DATE__ // build date, this is testing...
#ifndef BUILDOSDBUILDDATE
#define BUILDOSDBUILDDATE "DEV "__DATE__ // build date, this is testing...
#endif
 
#define ALLCHARSDEBUG 0 // set to 1 and flash firmware to see all chars
/C-OSD/trunk/osd_fcmode_default.c
31,8 → 31,9
#ifndef ACT_RSSI_FROM_LCD
rc_quality = debugData.Analog[10];
#endif
 
if (COSD_FLAGS_MODES & COSD_FLAG_HUD) {
if (!(COSD_FLAGS_MODES & COSD_FLAG_HUD)) {
clear();
} else {
// write icons at init or after menu/mode-switch
if (!(COSD_FLAGS_RUNTIME & COSD_ICONS_WRITTEN)) {
write_char_xy(10, top_line, 0xCA); // RC-transmitter
/C-OSD/trunk/osd_fcmode_jopl.c
33,7 → 33,9
static int16_t Vario = 0;
 
int osd_fcmode_jopl() {
if (COSD_FLAGS_MODES & COSD_FLAG_HUD) {
if (!(COSD_FLAGS_MODES & COSD_FLAG_HUD)) {
clear();
} else {
// write icons at init or after menu/mode-switch
if (!(COSD_FLAGS_RUNTIME & COSD_ICONS_WRITTEN)) {
write_char_xy(10, top_line, 0xCA); // RC-transmitter
/C-OSD/trunk/osd_ncmode_default.c
26,7 → 26,9
#if (!(ALLCHARSDEBUG || (WRITECHARS != -1)) && !FCONLY)
 
int osd_ncmode_default() {
if (COSD_FLAGS_MODES & COSD_FLAG_HUD) {
if (!(COSD_FLAGS_MODES & COSD_FLAG_HUD)) {
clear();
} else {
// write icons at init or after menu/mode-switch
if (!(COSD_FLAGS_RUNTIME & COSD_ICONS_WRITTEN)) {
if (COSD_FLAGS_CONFIG & COSD_FLAG_FEET) {
/C-OSD/trunk/osd_ncmode_minimal.c
26,8 → 26,9
#if (!(ALLCHARSDEBUG || (WRITECHARS != -1)) && !FCONLY)
 
int osd_ncmode_minimal() {
 
if (COSD_FLAGS_MODES & COSD_FLAG_HUD) {
if (!(COSD_FLAGS_MODES & COSD_FLAG_HUD)) {
clear();
} else {
// write icons at init or after menu/mode-switch
if (!(COSD_FLAGS_RUNTIME & COSD_ICONS_WRITTEN)) {
write_char_xy(4, top_line, 0xCB); // km/h
/C-OSD/trunk/ppm.c
59,18 → 59,14
}
COSD_FLAGS_MODES |= COSD_FLAG_HUD;
} else { // we do not want hud
if (COSD_FLAGS_MODES & COSD_FLAG_HUD) {
clear();
}
COSD_FLAGS_MODES &= ~COSD_FLAG_HUD;
}
}
EMCUCR |= (1 << ISC2); // next one is rising
}
//write_ndigit_number_u(2, 5, ppm, 1000, 0); // debug
//write_ndigit_number_u(2, 6, valid_ppm_to_go, 100, 0); // debug
//write_ndigit_number_u(2, 7, COSD_FLAGS_CONFIG, 100, 0); // debug
PORTC ^= (1 << PC3);
//PORTC ^= (1 << PC3); // LED4_TOGGLE // debug
//uptime = ppm;
}
 
/C-OSD/trunk/ppm.h
22,6 → 22,7
#define _PPM_H
 
extern uint8_t COSD_FLAGS, COSD_FLAGS2;
extern volatile uint16_t old_timer1, ppm;
 
/**
* init ppm, including timer1 for measurement