Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 809 → Rev 826

/C-OSD/trunk/CHANGE.LOG
18,79 → 18,86
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
****************************************************************************/
 
 
20101008-0945
*fixed EPi-Strom voltage-display when using FC-Ampere
 
20101007-1555
*added passive option: OSD will NOT request data after bootup
 
20100908-2335
*fixed height-offset causing different height values in OSD compared to MK-Tool when using baro-height (thx Neo360)
*fixed height-offset causing different height values in OSD compared to MK-Tool when using baro-height (thx Neo360)
 
20100822-2300
*removed debug-leftover in ppm.c (thx OktoMac)
*made number display-routines more stable when big numbers occur
*removed debug-leftover in ppm.c (thx OktoMac)
*made number display-routines more stable when big numbers occur
 
20100803-0355
*removed constantly requests for the NC Uart in NC mode which
caused problems when using OSD/MKTool at the same time
*removed constantly requests for the NC Uart in NC mode which
caused problems when using OSD/MKTool at the same time
 
20100730-1345
*added current setting display
*updated structs for FC 0.80 and NC 0.20 (old version will still work, just cosmetics)
*battery warn level now _can_ be taken from the FC-Settings
*corrected some defines so FC stuff is only in FC Builds and NC stuff only in NC builds
*added current setting display
*updated structs for FC 0.80 and NC 0.20 (old version will still work, just cosmetics)
*battery warn level now _can_ be taken from the FC-Settings
*corrected some defines so FC stuff is only in FC Builds and NC stuff only in NC builds
 
20100701-1745
*hopefully fixed altimeter-stats
*some basic antenna tracking insertion for others to test
*hopefully fixed altimeter-stats
*some basic antenna tracking insertion for others to test
 
20100613-2255
*corrected heigth-division-factor when using baro-height
*corrected heigth-division-factor when using baro-height
 
20100531-1530
*fixed bug in stats when max-distance > 999m
*fixed bug in stats when max-distance > 999m
 
20100501-1130
*distance to home now 4 digits for long distance flights
*max height and speed shown again in stats
*clear full screen before stats shown so the art-horizon does not bug us
*distance to home now 4 digits for long distance flights
*max height and speed shown again in stats
*clear full screen before stats shown so the art-horizon does not bug us
 
20100419-0020
*fixed bug causing PPM-based display on/off to fail
*fixed display of AGRESSiVA-horizion during motor run
*fixed bug causing PPM-based display on/off to fail
*fixed display of AGRESSiVA-horizion during motor run
 
20100412-2125
*added mph/ft (two new chars added, reflash characters if you need ft/mph)
*AGRESSiVA-horizion now switchable via menu
*reworked menu a bit
*switched from -O2 to -Os because of the added stuff
*added mph/ft (two new chars added, reflash characters if you need ft/mph)
*AGRESSiVA-horizion now switchable via menu
*reworked menu a bit
*switched from -O2 to -Os because of the added stuff
 
20100403-0115
*RC-RSSI now shown if available (RC_Quality is still fallback, still needs FC patch)
+AGRESSiVA-horizion to main trunk (NEW_ARTHORIZON 1 to test, needs new chars)
+chars needed for above mod to chars.mcm and chars.c
*RC-RSSI now shown if available (RC_Quality is still fallback, still needs FC patch)
+AGRESSiVA-horizion to main trunk (NEW_ARTHORIZON 1 to test, needs new chars)
+chars needed for above mod to chars.mcm and chars.c
 
20100218-2330
*hopefully fixed the laggy osd data problem
-send_data_mk has been striked out to save space
@nc-mode should be small enough for bootloader again ( Program: 14986 bytes (91.5% Full) )
*hopefully fixed the laggy osd data problem
-send_data_mk has been striked out to save space
@nc-mode should be small enough for bootloader again ( Program: 14986 bytes (91.5% Full) )
 
20100216-1430
*some menu stuff
*stats in nc_default do not disturb the bigvario anymore
*reduced code size from 16088 bytes (98.2% Full) 15436 bytes (94.2% Full)
*some menu stuff
*stats in nc_default do not disturb the bigvario anymore
*reduced code size from 16088 bytes (98.2% Full) 15436 bytes (94.2% Full)
 
20100214-1700
+mah wasted per flight (still counts up after landing, but space gets tight)
*init phase from 2000ms to 3000ms
*init only takes place after first "valid" UBat is received (<4V should case the Mega to reset anyways)
+mah wasted per flight (still counts up after landing, but space gets tight)
*init phase from 2000ms to 3000ms
*init only takes place after first "valid" UBat is received (<4V should case the Mega to reset anyways)
 
20100212-2310
*adapted MK-datastructs to NC 0.18c
*added choice for current display measured by FC
*adapted MK-datastructs to NC 0.18c
*added choice for current display measured by FC
 
20091109-1100
+fc-only mode by Josef "jopl" Plasil (MK3Mag on FC and no NC)
*usart1 routine to filter out unwanted datasets (also big thanks to jopl)
+fc-only mode by Josef "jopl" Plasil (MK3Mag on FC and no NC)
*usart1 routine to filter out unwanted datasets (also big thanks to jopl)
 
20091102-2205
+nc/fc software version display in bootup
*changed checkbytes because of previously removed EEPROM data
+nc/fc software version display in bootup
*changed checkbytes because of previously removed EEPROM data
 
20091030-2222
*synced NaviStruct to NC Code v0.17e
100,21 → 107,21
*fixed the flags (hopefully) for C-Strom and stuff
 
20090706-2000
*hopefully fixed the new 10th number showing functions
+support for GPS height instead of Baro
*hopefully fixed the new 10th number showing functions
+support for GPS height instead of Baro
 
20090703-0005
*write-number-functions changed, using itoa now, saves space, should be faster
*inline added for basic max7456-spi_send because saves procedure call (^= time)
*write-number-functions changed, using itoa now, saves space, should be faster
*inline added for basic max7456-spi_send because saves procedure call (^= time)
 
20090627-1415
*ALL characters now in Progmem, from now on there will be only ONE char-file!
 
20090612-2100
*spi transfer now struct driven (needs C-Strom 20090612-2100 now!!!)
*lesser spi update rate (caused problems on some strom-slaves)
*voltage gets transfered via spi as well
*menu to switch display of 2nd voltage measured by C-Strom on and off
*spi transfer now struct driven (needs C-Strom 20090612-2100 now!!!)
*lesser spi update rate (caused problems on some strom-slaves)
*voltage gets transfered via spi as well
*menu to switch display of 2nd voltage measured by C-Strom on and off
 
20090604-1350
*bugfix for stats
139,13 → 146,13
+pal/ntsc changable in menu (applied immedeately!)
 
20090519-2245
*mah corrected
+config gets saved now (menu item!)
*source moved a bit
*mah corrected
+config gets saved now (menu item!)
*source moved a bit
 
20090519-0115
+mah currently wasted
*some small changes
+mah currently wasted
*some small changes
 
20090517-2345
*modded the real alpha stuff i have been talking about below
162,39 → 169,39
+build date is displayed during init to know which version you are runing
 
20090513-1040
*some code movement
+artificial horizon for FC-ONLY mode
*some code movement
+artificial horizon for FC-ONLY mode
 
20090512-2100
+some FCONLY basics (set FCONLY to 1 in main.h to use it)
+some FCONLY basics (set FCONLY to 1 in main.h to use it)
 
20090511-2345
*battery voltages now calculated according to CELL_VOLT_MIN CELL_VOLT_MAX and CELL_NUM
*CELL_NUM -1 causes a rough auto detection of cell number
-UBAT_WRN and UBAT_MAX are now deprecated
*battery voltages now calculated according to CELL_VOLT_MIN CELL_VOLT_MAX and CELL_NUM
*CELL_NUM -1 causes a rough auto detection of cell number
-UBAT_WRN and UBAT_MAX are now deprecated
 
20090427-2315
+write_gps_pos(...) (needs to be tested)
+gps position is shown in stats screen for testing purpose
+write_gps_pos(...) (needs to be tested)
+gps position is shown in stats screen for testing purpose
 
20090427-2131
*stats are only collected while engines running (shaddi)
*stats are only collected while engines running (shaddi)
 
20090427-2102
*fixed maximum distance in stats (shaddi)
*fixed maximum distance in stats (shaddi)
 
20090427-2050
*clear() now faster
*fixed calculation of max speed in stats (shaddi)
*littel typo in artificial horizon (thx joko)
*stats are only shown AFTER flight (more specific, after motors had been on at least once)
+indication icon for serial link (requires new character 198)
+indication icon for manual controll (stick > stick threshold)
(Character set 192 needs to be reflashed since new icon is in it)
*clear() now faster
*fixed calculation of max speed in stats (shaddi)
*littel typo in artificial horizon (thx joko)
*stats are only shown AFTER flight (more specific, after motors had been on at least once)
+indication icon for serial link (requires new character 198)
+indication icon for manual controll (stick > stick threshold)
(Character set 192 needs to be reflashed since new icon is in it)
 
20090420-0205
*reset-bug fixed
*moved code a bit
*reset-bug fixed
*moved code a bit
 
20090419-2145
*reset-bug workaround in usart1.c: usart1_DisableTXD and usart1_EnableTXD
238,10 → 245,10
*fixed height bug (uint vs int)
 
20090407-2100
+added request of OSD data, disrequest of debug data and uptime reset to menu
-removed the uptime-reset binding from S2
+pgm space for some strings to save _normal_ data space
*some code movement
+added request of OSD data, disrequest of debug data and uptime reset to menu
-removed the uptime-reset binding from S2
+pgm space for some strings to save _normal_ data space
*some code movement
 
20090406-0130
*MK-Datastruct updated to work with NaviCtrl 0.15c firmware
260,7 → 267,7
 
20090401-1741 (shaddi)
+ More precise Veriometer. Uses more more characters to show the speed of the movement
(Character-Set 232 needs to be flashed!)
(Character-Set 232 needs to be flashed!)
 
20090331-1549
+ simple config menu during runtime, press S1 to jump in, S2 to cyle and S1 to accept choice
/C-OSD/trunk/config.c
150,6 → 150,9
usart1_request_blocking('V', PSTR(REQUEST_FC_VERSION));
#else
usart1_request_nc_uart();
_delay_ms(200);
usart1_request_nc_uart();
//usart1_request_mk_data(1, 'v', 0);
write_ascii_string_pgm(2, 11, PSTR("NC VERSION: ........"));
usart1_request_blocking('V', PSTR(REQUEST_NC_VERSION));
185,6 → 188,9
clear();
// update flags to paint display again because of clear
COSD_FLAGS_RUNTIME &= ~COSD_ICONS_WRITTEN;
 
// we got data
COSD_FLAGS_RUNTIME |= COSD_DATARECEIVED;
}
 
/* ##########################################################################
267,7 → 273,12
write_ascii_string_pgm(MENU_MIDDLE, ++line, PSTR("Big Vario"));
onoff(MENU_MIDDLE + 10, line, COSD_FLAGS_MODES & COSD_FLAG_BIGVARIO);
 
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);*/
 
// bottom
write_ascii_string_pgm(MENU_LEFT, 9, PSTR("Reset uptime"));
 
311,7 → 322,7
while (inmenu) {
if (s2_pressed()) {
chosen = (chosen + 1) % 17;
if (chosen == 10) chosen = 13; // SKIP unused menu space for now
if (chosen == 11) chosen = 13; // SKIP unused menu space for now
config_menu_drawings(chosen);
_delay_ms(500);
} else if (s1_pressed()) {
358,6 → 369,9
case 9: // big vario
COSD_FLAGS_MODES ^= COSD_FLAG_BIGVARIO;
break;
case 10: // passive
COSD_FLAGS_CONFIG ^= COSD_FLAG_PASSIVE;
break;
case 13: // reset uptime
uptime = 0;
config_menu_doclick(chosen);
/C-OSD/trunk/default/dist.bat
19,7 → 19,7
:: * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
:: ****************************************************************************/
 
set DATE=20100908-2335
set DATE=20101008-0945
 
:: date /T
 
/C-OSD/trunk/main.c
101,12 → 101,12
 
// store stats description in progmem to save space
const char stats_item_0[] PROGMEM = "max Altitude:";
const char stats_item_1[] PROGMEM = "max Speed :";
const char stats_item_1[] PROGMEM = "max Speed :";
const char stats_item_2[] PROGMEM = "max Distance:";
const char stats_item_3[] PROGMEM = "min Voltage :";
const char stats_item_4[] PROGMEM = "max Time :";
const char stats_item_5[] PROGMEM = "longitude :";
const char stats_item_6[] PROGMEM = "latitude :";
const char stats_item_4[] PROGMEM = "max Time:";
const char stats_item_5[] PROGMEM = "longitude :";
const char stats_item_6[] PROGMEM = "latitude:";
const char stats_item_7[] PROGMEM = "max current :";
const char *stats_item_pointers[8] PROGMEM = {stats_item_0, stats_item_1, stats_item_2,
stats_item_3, stats_item_4, stats_item_5, stats_item_6, stats_item_7};
137,7 → 137,7
* ##########################################################################*/
const char str_1[] PROGMEM = "default";
const char str_2[] PROGMEM = "minimal";
const char str_3[] PROGMEM = " jopl";
const char str_3[] PROGMEM = " jopl";
 
#if FCONLY
const displaymode_t fcdisplaymodes[] PROGMEM = {
233,7 → 233,7
 
 
// set up Atmega162 Ports
DDRA |= ((1 << PA1) | (1 << PA2) | (1 << PA3) | (1 << PA5)); // PA1 output (/CS) | PA2 output (SDIN) | PA3 output (SCLK) | PA5 output (RESET)
DDRA |= ((1 << PA1) | (1 << PA2) | (1 << PA3) | (1 << PA5)); // PA1 output (/CS) | PA2 output (SDIN) |PA3 output (SCLK) | PA5 output (RESET)
MAX_CS_HIGH
MAX_SDIN_LOW
MAX_SCLK_LOW
245,7 → 245,7
LED3_OFF
LED4_OFF
 
DDRC &= ~((1 << PC4) | (1 << PC5)); // PC4 input (MODE) | PC5 input (SET)
DDRC &= ~((1 << PC4) | (1 << PC5)); // PC4 input(MODE) | PC5 input(SET)
PORTC |= ((1 << PC4) | (1 << PC5)); // pullup
 
// reset the MAX7456 to be sure any undefined states do no harm
327,9 → 327,9
sei();
 
 
//write_ascii_string(2, 7, " CaScAdE ");
//write_ascii_string(2, 8, "is TESTING his open source");
//write_ascii_string(2, 9, " EPi OSD Firmware");
//write_ascii_string(2,7, " CaScAdE");
//write_ascii_string(2,8, "is TESTING his open source");
//write_ascii_string(2,9, "EPi OSD Firmware");
 
// we are ready
LED3_ON
338,8 → 338,9
// clear serial screen
//usart1_puts("\x1B[2J\x1B[H");
 
COSD_FLAGS_RUNTIME &= ~COSD_DATARECEIVED;
#if !FCONLY
usart1_request_nc_uart();
usart1_request_nc_uart();
#endif
 
while (1) {
405,7 → 406,7
 
// ONLY FOR TESTING
#ifdef ANTENNATRACKTEST
#include <stdlib.h>
#include <stdlib.h>
//#include <float.h>
//#include <math.h>
 
443,7 → 444,10
if (s1_pressed()) {
config_menu();
}
if (seconds_since_last_data > 0) {
// reqest data untill there has been some answer
if (!(COSD_FLAGS_RUNTIME & COSD_DATARECEIVED) ||
// or while not in passive mode
(seconds_since_last_data > 0 && !(COSD_FLAGS_CONFIG & COSD_FLAG_PASSIVE))) {
usart1_EnableTXD();
//usart1_puts_pgm(PSTR("zu alt\r\n"));
#if FCONLY
/C-OSD/trunk/main.h
54,7 → 54,7
#define FCONLY 0 // set to 1 if you do NOT have a NaviCtrl and the OSD is
#endif // connected to the FC directly
 
#define HUD 1 // set to 0 to disable HUD by default
#define HUD 1 // set to 0 to disable HUD by default
#define ARTHORIZON 0 // set to 1 to enable roll&nick artificial horizon by default
#define BIGVARIO 0 // set to 1 to enable the big vario bar on right side
#define STATS 1 // set to 1 to enable statistics during motor off by default
95,6 → 95,7
#define COSD_FLAG_GPSHEIGHT 2
#define COSD_FLAG_FCMODE 4
#define COSD_FLAG_FEET 8
#define COSD_FLAG_PASSIVE 16
 
/* ##########################################################################
* FLAGS only usable during runtime (not saved)
102,6 → 103,7
#define COSD_FLAG_STROMREC 1
#define COSD_ICONS_WRITTEN 2
#define COSD_WASFLYING 4
#define COSD_DATARECEIVED 8
 
/* ##########################################################################
* LED controll
/C-OSD/trunk/osd_ncmode_default.c
245,14 → 245,14
//write_ndigit_number_s(3, bottom_line - 1, ampere, 4, 0);
write_ndigit_number_u_10th(2, bottom_line - 1, ampere / 10, 4, 0);
write_ndigit_number_s(10, bottom_line - 1, ampere_wasted / 10, 4, 0);
if (COSD_FLAGS_MODES & COSD_FLAG_STROMVOLT) {
write_ndigit_number_u_10th(17, bottom_line - 1, s_volt, 3, 0);
}
 
} else if (COSD_FLAGS_MODES & COSD_FLAG_FCCURRENT) {
write_ndigit_number_u_10th(2, bottom_line - 1, naviData.Current, 4, 0);
write_ndigit_number_u(10, bottom_line - 1, naviData.UsedCapacity, 4, 0);
}
 
if ((COSD_FLAGS_RUNTIME & COSD_FLAG_STROMREC) && COSD_FLAGS_MODES & COSD_FLAG_STROMVOLT) {
write_ndigit_number_u_10th(17, bottom_line - 1, s_volt, 3, 0);
}
//DEBUGwrite_ndigit_number_u(1, 5, COSD_FLAGS_MODES, 3, 0);
 
// bottom line
/C-OSD/trunk/usart1.c
227,7 → 227,7
wait = 0;
while (rxd_buffer_locked == 0 && wait < 150) {
wait++;
_delay_ms(10);
_delay_ms(50);
}
}
Decode64();