Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 518 → Rev 519

/C-OSD/trunk/CHANGE.LOG
18,6 → 18,10
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
****************************************************************************/
 
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)
 
20090627-1415
*ALL characters now in Progmem, from now on there will be only ONE char-file!
 
/C-OSD/trunk/c-osd.aws
1,0 → 0,0
<AVRWorkspace><IOSettings><CurrentRegisters><USART1><register register="UBRR1L" group="USART1" display="1" locked="0"/></USART1><USART1><register register="UCSR1B" group="USART1" display="1" locked="0"/></USART1><USART1><register register="UCSR1A" group="USART1" display="1" locked="0"/></USART1><USART1><register register="UDR" group="USART1" display="1" locked="0"/></USART1><CPU><register register="OSCCAL" group="CPU" display="1" locked="0"/></CPU><JTAG><register register="OCDR" group="JTAG" display="1" locked="0"/></JTAG><PORTE><register register="PINE" group="PORTE" display="1" locked="0"/></PORTE><PORTE><register register="DDRE" group="PORTE" display="1" locked="0"/></PORTE><PORTE><register register="PORTE" group="PORTE" display="1" locked="0"/></PORTE><ANALOG_COMPARATOR><register register="ACSR" group="ANALOG_COMPARATOR" display="1" locked="0"/></ANALOG_COMPARATOR><USART0><register register="UBRR0L" group="USART0" display="1" locked="0"/></USART0><USART0><register register="UCSR0B" group="USART0" display="1" locked="0"/></USART0><USART0><register register="UCSR0A" group="USART0" display="1" locked="0"/></USART0><USART0><register register="UDR0" group="USART0" display="1" locked="0"/></USART0><SPI><register register="SPCR" group="SPI" display="1" locked="0"/></SPI><SPI><register register="SPSR" group="SPI" display="1" locked="0"/></SPI><SPI><register register="SPDR" group="SPI" display="1" locked="0"/></SPI><PORTD><register register="PIND" group="PORTD" display="1" locked="0"/></PORTD><PORTD><register register="DDRD" group="PORTD" display="1" locked="0"/></PORTD><PORTD><register register="PORTD" group="PORTD" display="1" locked="0"/></PORTD><PORTC><register register="PINC" group="PORTC" display="1" locked="0"/></PORTC><PORTC><register register="DDRC" group="PORTC" display="1" locked="0"/></PORTC><PORTC><register register="PORTC" group="PORTC" display="1" locked="0"/></PORTC><PORTB><register register="PINB" group="PORTB" display="1" locked="0"/></PORTB><PORTB><register register="DDRB" group="PORTB" display="1" locked="0"/></PORTB><PORTB><register register="PORTB" group="PORTB" display="1" locked="0"/></PORTB><PORTA><register register="PINA" group="PORTA" display="1" locked="0"/></PORTA><PORTA><register register="DDRA" group="PORTA" display="1" locked="0"/></PORTA><PORTA><register register="PORTA" group="PORTA" display="1" locked="0"/></PORTA><EEPROM><register register="EECR" group="EEPROM" display="1" locked="0"/></EEPROM><EEPROM><register register="EEDR" group="EEPROM" display="1" locked="0"/></EEPROM><EEPROM><register register="EEAR" group="EEPROM" display="1" locked="0"/></EEPROM><USART0><register register="UBRR0H" group="USART0" display="1" locked="0"/></USART0><USART0><register register="UCSR0C" group="USART0" display="1" locked="0"/></USART0><WATCHDOG><register register="WDTCR" group="WATCHDOG" display="1" locked="0"/></WATCHDOG><TIMER_COUNTER_2><register register="OCR2" group="TIMER_COUNTER_2" display="1" locked="0"/></TIMER_COUNTER_2><TIMER_COUNTER_2><register register="TCNT2" group="TIMER_COUNTER_2" display="1" locked="0"/></TIMER_COUNTER_2><TIMER_COUNTER_1><register register="ICR1" group="TIMER_COUNTER_1" display="1" locked="0"/></TIMER_COUNTER_1><TIMER_COUNTER_2><register register="ASSR" group="TIMER_COUNTER_2" display="1" locked="0"/></TIMER_COUNTER_2><TIMER_COUNTER_2><register register="TCCR2" group="TIMER_COUNTER_2" display="1" locked="0"/></TIMER_COUNTER_2><TIMER_COUNTER_1><register register="OCR1B" group="TIMER_COUNTER_1" display="1" locked="0"/></TIMER_COUNTER_1><TIMER_COUNTER_1><register register="OCR1A" group="TIMER_COUNTER_1" display="1" locked="0"/></TIMER_COUNTER_1><TIMER_COUNTER_1><register register="TCNT1" group="TIMER_COUNTER_1" display="1" locked="0"/></TIMER_COUNTER_1><TIMER_COUNTER_1><register register="TCCR1B" group="TIMER_COUNTER_1" display="1" locked="0"/></TIMER_COUNTER_1><TIMER_COUNTER_1><register register="TCCR1A" group="TIMER_COUNTER_1" display="1" locked="0"/></TIMER_COUNTER_1><CPU><register register="SFIOR" group="CPU" display="1" locked="0"/></CPU><TIMER_COUNTER_0><register register="OCR0" group="TIMER_COUNTER_0" display="1" locked="0"/></TIMER_COUNTER_0><TIMER_COUNTER_0><register register="TCNT0" group="TIMER_COUNTER_0" display="1" locked="0"/></TIMER_COUNTER_0><TIMER_COUNTER_0><register register="TCCR0" group="TIMER_COUNTER_0" display="1" locked="0"/></TIMER_COUNTER_0><CPU><register register="MCUCSR" group="CPU" display="1" locked="0"/></CPU><JTAG><register register="MCUCSR" group="JTAG" display="1" locked="0"/></JTAG><CPU><register register="MCUCR" group="CPU" display="1" locked="0"/></CPU><EXTERNAL_INTERRUPT><register register="MCUCR" group="EXTERNAL_INTERRUPT" display="1" locked="0"/></EXTERNAL_INTERRUPT><CPU><register register="EMCUCR" group="CPU" display="1" locked="0"/></CPU><EXTERNAL_INTERRUPT><register register="EMCUCR" group="EXTERNAL_INTERRUPT" display="1" locked="0"/></EXTERNAL_INTERRUPT><BOOT_LOAD><register register="SPMCR" group="BOOT_LOAD" display="1" locked="0"/></BOOT_LOAD><TIMER_COUNTER_0><register register="TIFR" group="TIMER_COUNTER_0" display="1" locked="0"/></TIMER_COUNTER_0><TIMER_COUNTER_1><register register="TIFR" group="TIMER_COUNTER_1" display="1" locked="0"/></TIMER_COUNTER_1><TIMER_COUNTER_2><register register="TIFR" group="TIMER_COUNTER_2" display="1" locked="0"/></TIMER_COUNTER_2><TIMER_COUNTER_0><register register="TIMSK" group="TIMER_COUNTER_0" display="1" locked="0"/></TIMER_COUNTER_0><TIMER_COUNTER_1><register register="TIMSK" group="TIMER_COUNTER_1" display="1" locked="0"/></TIMER_COUNTER_1><TIMER_COUNTER_2><register register="TIMSK" group="TIMER_COUNTER_2" display="1" locked="0"/></TIMER_COUNTER_2><EXTERNAL_INTERRUPT><register register="GIFR" group="EXTERNAL_INTERRUPT" display="1" locked="0"/></EXTERNAL_INTERRUPT><EXTERNAL_INTERRUPT><register register="GICR" group="EXTERNAL_INTERRUPT" display="1" locked="0"/></EXTERNAL_INTERRUPT><USART1><register register="UBRR1H" group="USART1" display="1" locked="0"/></USART1><USART1><register register="UCSR1C" group="USART1" display="1" locked="0"/></USART1><CPU><register register="SP" group="CPU" display="1" locked="0"/></CPU><CPU><register register="SREG" group="CPU" display="1" locked="0"/></CPU><CPU><register register="CLKPR" group="CPU" display="1" locked="0"/></CPU><EXTERNAL_INTERRUPT><register register="PCMSK0" group="EXTERNAL_INTERRUPT" display="1" locked="0"/></EXTERNAL_INTERRUPT><EXTERNAL_INTERRUPT><register register="PCMSK1" group="EXTERNAL_INTERRUPT" display="1" locked="0"/></EXTERNAL_INTERRUPT><TIMER_COUNTER_3><register register="ETIFR" group="TIMER_COUNTER_3" display="1" locked="0"/></TIMER_COUNTER_3><TIMER_COUNTER_3><register register="ETIMSK" group="TIMER_COUNTER_3" display="1" locked="0"/></TIMER_COUNTER_3><TIMER_COUNTER_3><register register="ICR3" group="TIMER_COUNTER_3" display="1" locked="0"/></TIMER_COUNTER_3><TIMER_COUNTER_3><register register="OCR3B" group="TIMER_COUNTER_3" display="1" locked="0"/></TIMER_COUNTER_3><TIMER_COUNTER_3><register register="OCR3A" group="TIMER_COUNTER_3" display="1" locked="0"/></TIMER_COUNTER_3><TIMER_COUNTER_3><register register="TCNT3" group="TIMER_COUNTER_3" display="1" locked="0"/></TIMER_COUNTER_3><TIMER_COUNTER_3><register register="TCCR3B" group="TIMER_COUNTER_3" display="1" locked="0"/></TIMER_COUNTER_3><TIMER_COUNTER_3><register register="TCCR3A" group="TIMER_COUNTER_3" display="1" locked="0"/></TIMER_COUNTER_3></CurrentRegisters></IOSettings><part name="ATMEGA162"/><Files><File00000 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\main.c" Position="772 112 1598 640" LineCol="258 6" State="Maximized"/><File00001 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\mk-data-structs.h" Position="794 134 1612 632" LineCol="44 0" State="Maximized"/><File00002 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\max7456_software_spi.h" Position="816 156 1634 654" LineCol="48 0" State="Maximized"/><File00003 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\max7456_software_spi.c" Position="838 178 1656 676" LineCol="23 1" State="Maximized"/><File00004 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\usart1.c" Position="860 200 1678 698" LineCol="47 25" State="Maximized"/><File00005 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\usart1.h" Position="882 222 1700 720" LineCol="24 0" State="Maximized"/><File00006 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\characters.c" Position="904 244 1722 742" LineCol="293 64" State="Maximized"/><File00007 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\main.h" Position="768 89 1840 760" LineCol="33 21" State="Maximized"/><File00008 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_helpers.c" Position="948 288 1766 786" LineCol="197 0" State="Maximized"/><File00009 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_helpers.h" Position="970 310 1788 808" LineCol="20 0" State="Maximized"/><File00010 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_default.c" Position="992 332 1810 830" LineCol="127 57" State="Maximized"/><File00011 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_default.c" Position="1014 354 1832 852" LineCol="25 5" State="Maximized"/><File00012 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\config.c" Position="772 112 1590 610" LineCol="151 12" State="Maximized"/><File00013 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\config.h" Position="794 134 1612 632" LineCol="23 0" State="Maximized"/><File00014 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\spi.c" Position="816 156 1634 654" LineCol="19 0" State="Maximized"/><File00015 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\spi.h" Position="838 178 1656 676" LineCol="26 0" State="Maximized"/><File00016 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\buttons.c" Position="860 200 1678 698" LineCol="0 0" State="Maximized"/><File00017 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\buttons.h" Position="882 222 1700 720" LineCol="0 0" State="Maximized"/><File00018 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\ppm.c" Position="904 244 1722 742" LineCol="19 0" State="Maximized"/><File00019 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\ppm.h" Position="926 266 1744 764" LineCol="18 0" State="Maximized"/><File00020 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_minimal.c" Position="948 288 1766 786" LineCol="25 0" State="Maximized"/><File00021 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_default.h" Position="970 310 1788 808" LineCol="20 0" State="Maximized"/><File00022 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_minimal.h" Position="992 332 1810 830" LineCol="20 0" State="Maximized"/><File00023 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_default.h" Position="1014 354 1832 852" LineCol="20 0" State="Maximized"/><File00024 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\characters.h" Position="816 156 1660 649" LineCol="22 3" State="Maximized"/></Files></AVRWorkspace>
<AVRWorkspace><IOSettings><CurrentRegisters><USART1><register register="UBRR1L" group="USART1" display="1" locked="0"/></USART1><USART1><register register="UCSR1B" group="USART1" display="1" locked="0"/></USART1><USART1><register register="UCSR1A" group="USART1" display="1" locked="0"/></USART1><USART1><register register="UDR" group="USART1" display="1" locked="0"/></USART1><CPU><register register="OSCCAL" group="CPU" display="1" locked="0"/></CPU><JTAG><register register="OCDR" group="JTAG" display="1" locked="0"/></JTAG><PORTE><register register="PINE" group="PORTE" display="1" locked="0"/></PORTE><PORTE><register register="DDRE" group="PORTE" display="1" locked="0"/></PORTE><PORTE><register register="PORTE" group="PORTE" display="1" locked="0"/></PORTE><ANALOG_COMPARATOR><register register="ACSR" group="ANALOG_COMPARATOR" display="1" locked="0"/></ANALOG_COMPARATOR><USART0><register register="UBRR0L" group="USART0" display="1" locked="0"/></USART0><USART0><register register="UCSR0B" group="USART0" display="1" locked="0"/></USART0><USART0><register register="UCSR0A" group="USART0" display="1" locked="0"/></USART0><USART0><register register="UDR0" group="USART0" display="1" locked="0"/></USART0><SPI><register register="SPCR" group="SPI" display="1" locked="0"/></SPI><SPI><register register="SPSR" group="SPI" display="1" locked="0"/></SPI><SPI><register register="SPDR" group="SPI" display="1" locked="0"/></SPI><PORTD><register register="PIND" group="PORTD" display="1" locked="0"/></PORTD><PORTD><register register="DDRD" group="PORTD" display="1" locked="0"/></PORTD><PORTD><register register="PORTD" group="PORTD" display="1" locked="0"/></PORTD><PORTC><register register="PINC" group="PORTC" display="1" locked="0"/></PORTC><PORTC><register register="DDRC" group="PORTC" display="1" locked="0"/></PORTC><PORTC><register register="PORTC" group="PORTC" display="1" locked="0"/></PORTC><PORTB><register register="PINB" group="PORTB" display="1" locked="0"/></PORTB><PORTB><register register="DDRB" group="PORTB" display="1" locked="0"/></PORTB><PORTB><register register="PORTB" group="PORTB" display="1" locked="0"/></PORTB><PORTA><register register="PINA" group="PORTA" display="1" locked="0"/></PORTA><PORTA><register register="DDRA" group="PORTA" display="1" locked="0"/></PORTA><PORTA><register register="PORTA" group="PORTA" display="1" locked="0"/></PORTA><EEPROM><register register="EECR" group="EEPROM" display="1" locked="0"/></EEPROM><EEPROM><register register="EEDR" group="EEPROM" display="1" locked="0"/></EEPROM><EEPROM><register register="EEAR" group="EEPROM" display="1" locked="0"/></EEPROM><USART0><register register="UBRR0H" group="USART0" display="1" locked="0"/></USART0><USART0><register register="UCSR0C" group="USART0" display="1" locked="0"/></USART0><WATCHDOG><register register="WDTCR" group="WATCHDOG" display="1" locked="0"/></WATCHDOG><TIMER_COUNTER_2><register register="OCR2" group="TIMER_COUNTER_2" display="1" locked="0"/></TIMER_COUNTER_2><TIMER_COUNTER_2><register register="TCNT2" group="TIMER_COUNTER_2" display="1" locked="0"/></TIMER_COUNTER_2><TIMER_COUNTER_1><register register="ICR1" group="TIMER_COUNTER_1" display="1" locked="0"/></TIMER_COUNTER_1><TIMER_COUNTER_2><register register="ASSR" group="TIMER_COUNTER_2" display="1" locked="0"/></TIMER_COUNTER_2><TIMER_COUNTER_2><register register="TCCR2" group="TIMER_COUNTER_2" display="1" locked="0"/></TIMER_COUNTER_2><TIMER_COUNTER_1><register register="OCR1B" group="TIMER_COUNTER_1" display="1" locked="0"/></TIMER_COUNTER_1><TIMER_COUNTER_1><register register="OCR1A" group="TIMER_COUNTER_1" display="1" locked="0"/></TIMER_COUNTER_1><TIMER_COUNTER_1><register register="TCNT1" group="TIMER_COUNTER_1" display="1" locked="0"/></TIMER_COUNTER_1><TIMER_COUNTER_1><register register="TCCR1B" group="TIMER_COUNTER_1" display="1" locked="0"/></TIMER_COUNTER_1><TIMER_COUNTER_1><register register="TCCR1A" group="TIMER_COUNTER_1" display="1" locked="0"/></TIMER_COUNTER_1><CPU><register register="SFIOR" group="CPU" display="1" locked="0"/></CPU><TIMER_COUNTER_0><register register="OCR0" group="TIMER_COUNTER_0" display="1" locked="0"/></TIMER_COUNTER_0><TIMER_COUNTER_0><register register="TCNT0" group="TIMER_COUNTER_0" display="1" locked="0"/></TIMER_COUNTER_0><TIMER_COUNTER_0><register register="TCCR0" group="TIMER_COUNTER_0" display="1" locked="0"/></TIMER_COUNTER_0><CPU><register register="MCUCSR" group="CPU" display="1" locked="0"/></CPU><JTAG><register register="MCUCSR" group="JTAG" display="1" locked="0"/></JTAG><CPU><register register="MCUCR" group="CPU" display="1" locked="0"/></CPU><EXTERNAL_INTERRUPT><register register="MCUCR" group="EXTERNAL_INTERRUPT" display="1" locked="0"/></EXTERNAL_INTERRUPT><CPU><register register="EMCUCR" group="CPU" display="1" locked="0"/></CPU><EXTERNAL_INTERRUPT><register register="EMCUCR" group="EXTERNAL_INTERRUPT" display="1" locked="0"/></EXTERNAL_INTERRUPT><BOOT_LOAD><register register="SPMCR" group="BOOT_LOAD" display="1" locked="0"/></BOOT_LOAD><TIMER_COUNTER_0><register register="TIFR" group="TIMER_COUNTER_0" display="1" locked="0"/></TIMER_COUNTER_0><TIMER_COUNTER_1><register register="TIFR" group="TIMER_COUNTER_1" display="1" locked="0"/></TIMER_COUNTER_1><TIMER_COUNTER_2><register register="TIFR" group="TIMER_COUNTER_2" display="1" locked="0"/></TIMER_COUNTER_2><TIMER_COUNTER_0><register register="TIMSK" group="TIMER_COUNTER_0" display="1" locked="0"/></TIMER_COUNTER_0><TIMER_COUNTER_1><register register="TIMSK" group="TIMER_COUNTER_1" display="1" locked="0"/></TIMER_COUNTER_1><TIMER_COUNTER_2><register register="TIMSK" group="TIMER_COUNTER_2" display="1" locked="0"/></TIMER_COUNTER_2><EXTERNAL_INTERRUPT><register register="GIFR" group="EXTERNAL_INTERRUPT" display="1" locked="0"/></EXTERNAL_INTERRUPT><EXTERNAL_INTERRUPT><register register="GICR" group="EXTERNAL_INTERRUPT" display="1" locked="0"/></EXTERNAL_INTERRUPT><USART1><register register="UBRR1H" group="USART1" display="1" locked="0"/></USART1><USART1><register register="UCSR1C" group="USART1" display="1" locked="0"/></USART1><CPU><register register="SP" group="CPU" display="1" locked="0"/></CPU><CPU><register register="SREG" group="CPU" display="1" locked="0"/></CPU><CPU><register register="CLKPR" group="CPU" display="1" locked="0"/></CPU><EXTERNAL_INTERRUPT><register register="PCMSK0" group="EXTERNAL_INTERRUPT" display="1" locked="0"/></EXTERNAL_INTERRUPT><EXTERNAL_INTERRUPT><register register="PCMSK1" group="EXTERNAL_INTERRUPT" display="1" locked="0"/></EXTERNAL_INTERRUPT><TIMER_COUNTER_3><register register="ETIFR" group="TIMER_COUNTER_3" display="1" locked="0"/></TIMER_COUNTER_3><TIMER_COUNTER_3><register register="ETIMSK" group="TIMER_COUNTER_3" display="1" locked="0"/></TIMER_COUNTER_3><TIMER_COUNTER_3><register register="ICR3" group="TIMER_COUNTER_3" display="1" locked="0"/></TIMER_COUNTER_3><TIMER_COUNTER_3><register register="OCR3B" group="TIMER_COUNTER_3" display="1" locked="0"/></TIMER_COUNTER_3><TIMER_COUNTER_3><register register="OCR3A" group="TIMER_COUNTER_3" display="1" locked="0"/></TIMER_COUNTER_3><TIMER_COUNTER_3><register register="TCNT3" group="TIMER_COUNTER_3" display="1" locked="0"/></TIMER_COUNTER_3><TIMER_COUNTER_3><register register="TCCR3B" group="TIMER_COUNTER_3" display="1" locked="0"/></TIMER_COUNTER_3><TIMER_COUNTER_3><register register="TCCR3A" group="TIMER_COUNTER_3" display="1" locked="0"/></TIMER_COUNTER_3></CurrentRegisters></IOSettings><part name="ATMEGA162"/><Files><File00000 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\main.c" Position="839 128 1687 578" LineCol="312 0" State="Maximized"/><File00001 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\mk-data-structs.h" Position="861 150 1723 592" LineCol="48 0" State="Maximized"/><File00002 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\max7456_software_spi.h" Position="883 172 1745 614" LineCol="113 0" State="Maximized"/><File00003 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\max7456_software_spi.c" Position="905 194 1767 636" LineCol="276 0" State="Maximized"/><File00004 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\usart1.c" Position="927 216 1789 658" LineCol="47 0" State="Maximized"/><File00005 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\usart1.h" Position="949 238 1811 680" LineCol="24 0" State="Maximized"/><File00006 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\characters.c" Position="971 260 1833 702" LineCol="5938 0" State="Maximized"/><File00007 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\main.h" Position="993 282 1855 724" LineCol="55 0" State="Maximized"/><File00008 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_helpers.c" Position="1015 304 1877 746" LineCol="197 0" State="Maximized"/><File00009 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_helpers.h" Position="1037 326 1899 768" LineCol="20 0" State="Maximized"/><File00010 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_default.c" Position="839 128 1701 570" LineCol="77 0" State="Maximized"/><File00011 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_default.c" Position="861 150 1723 592" LineCol="29 0" State="Maximized"/><File00012 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\config.c" Position="835 105 1907 776" LineCol="132 0" State="Maximized"/><File00013 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\config.h" Position="905 194 1767 636" LineCol="23 0" State="Maximized"/><File00014 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\spi.c" Position="927 216 1789 658" LineCol="19 0" State="Maximized"/><File00015 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\spi.h" Position="949 238 1811 680" LineCol="26 0" State="Maximized"/><File00016 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\buttons.c" Position="971 260 1833 702" LineCol="0 0" State="Maximized"/><File00017 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\buttons.h" Position="993 282 1855 724" LineCol="0 0" State="Maximized"/><File00018 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\ppm.c" Position="1015 304 1877 746" LineCol="19 0" State="Maximized"/><File00019 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\ppm.h" Position="1037 326 1899 768" LineCol="18 0" State="Maximized"/><File00020 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_minimal.c" Position="839 128 1701 570" LineCol="138 0" State="Maximized"/><File00021 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_default.h" Position="861 150 1723 592" LineCol="20 0" State="Maximized"/><File00022 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_minimal.h" Position="883 172 1745 614" LineCol="20 0" State="Maximized"/><File00023 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_default.h" Position="905 194 1767 636" LineCol="20 0" State="Maximized"/><File00024 Name="G:\Eigene Dateien\C-Projects\C-OSD\trunk\characters.h" Position="927 216 1789 658" LineCol="22 0" State="Maximized"/></Files></AVRWorkspace>
/C-OSD/trunk/config.c
89,7 → 89,7
#endif
COSD_FLAGS = eeprom_read_byte(&ee_COSD_FLAGS);
COSD_DISPLAYMODE = eeprom_read_byte(&ee_COSD_DISPLAYMODE);
//if (verbose) write_ndigit_number_u(23, 11, COSD_DISPLAYMODE, 10, 0);
//if (verbose) write_ndigit_number_u(23, 11, COSD_DISPLAYMODE, 2, 0);
} else {
#if !(ALLCHARSDEBUG|(WRITECHARS != -1))
if (verbose) write_ascii_string_pgm(2, 9, ee_msg[1]); // Loading data
142,10 → 142,10
write_ndigit_number_u(21, 5, cellnum, 1, 0);
write_ascii_string_pgm(2, 6, init_point[5]); // Warn Voltage
//write_ascii_string(2, 6, "Warn Voltage :");
write_ndigit_number_s_10th(20, 6, min_voltage, 100, 0);
write_ndigit_number_s_10th(20, 6, min_voltage, 3, 0);
write_ascii_string_pgm(2, 7, init_point[6]); // Max Voltage
//write_ascii_string(2, 7, "Max Voltage :");
write_ndigit_number_s_10th(20, 7, max_voltage, 100, 0);
write_ndigit_number_s_10th(20, 7, max_voltage, 3, 0);
 
get_eeprom(1);
 
224,7 → 224,7
} else {
write_ascii_string_pgm(23, 8, OFF);
}
//write_ndigit_number_u(23, 10, COSD_DISPLAYMODE, 10, 0);
//write_ndigit_number_u(23, 10, COSD_DISPLAYMODE, 2, 0);
write_ascii_string_pgm(18, 10, (const char *) (pgm_read_word(&(mode->desc))));
}
/C-OSD/trunk/max7456_software_spi.c
19,8 → 19,11
****************************************************************************/
 
#include <avr/io.h>
 
#include <util/delay.h>
#include <avr/pgmspace.h>
#include <string.h>
#include <stdlib.h>
#include "main.h"
#include "max7456_software_spi.h"
 
30,8 → 33,11
 
/**
* Send a byte through SPI
* inline because it increases the codesize currenlty 'only' by 110byte but saves
* the context-change on every char and attribute which is at least done twice
* (address and data byte), a significant speed-bost we do not want to miss :)
*/
void spi_send(uint8_t byte) {
inline void spi_send(uint8_t byte) {
for (int8_t i = 7; i >= 0; i--) {
if (((byte >> i) & 1)) {
MAX_SDIN_HIGH
204,151 → 210,78
}
 
/**
* Write only some digits of a unsigned <number> at <x>/<y> to MAX7456 display memory
* <num> represents the largest multiple of 10 that will still be displayable as
* the first digit, so num = 10 will be 0-99 and so on
* Write a unsigned <number> at <x>/<y> to MAX7456 display memory
* <length> represents the length to rightbound the number
* <pad> = 1 will cause blank spaced to be filled up with zeros e.g. 007 instead of 7
*/
void write_ndigit_number_u(uint8_t x, uint8_t y, uint16_t number, int16_t num, uint8_t pad) {
// if number is largar than 99[..]9 we must decrease it
while (number >= (num * 10)) {
number -= num * 10;
}
 
uint8_t started = 0;
 
while (num > 0) {
uint8_t b = number / num;
if (b > 0 || started || num == 1) {
write_ascii_char((x++)+(y * 30), '0' + b);
started = 1;
} else {
if (pad) write_ascii_char((x++)+(y * 30), '0');
else write_ascii_char((x++)+(y * 30), 0);
}
number -= b * num;
 
num /= 10;
}
void write_ndigit_number_u(uint8_t x, uint8_t y, uint16_t number, int16_t length, uint8_t pad) {
char s[7];
itoa(number, s, 10 );
for (uint8_t i = 0; i < length - strlen(s); i++) {
if (pad) write_char((x++)+(y * 30), 10);
else write_ascii_char((x++)+(y * 30), 0);
}
write_ascii_string(x, y, s);
}
 
/**
* Write only some digits of a signed <number> at <x>/<y> to MAX7456 display memory
* <num> represents the largest multiple of 10 that will still be displayable as
* the first digit, so num = 10 will be 0-99 and so on
* Write a signed <number> at <x>/<y> to MAX7456 display memory
* <length> represents the length to rightbound the number
* <pad> = 1 will cause blank spaced to be filled up with zeros e.g. 007 instead of 7
*/
void write_ndigit_number_s(uint8_t x, uint8_t y, int16_t number, int16_t num, uint8_t pad) {
if (((uint16_t) number) > 32767) {
number = number - 65536;
num *= -1;
 
// if number is smaller than -99[..]9 we must increase it
while (number <= (num * 10)) {
number -= num * 10;
}
 
uint8_t started = 0;
 
while (num < 0) {
uint8_t b = number / num;
if (pad) write_ascii_char((x)+(y * 30), '0');
if (b > 0 || started || num == 1) {
if (!started) write_char((x - 1)+(y * 30), 0x49);
write_ascii_char((x++)+(y * 30), '0' + b);
started = 1;
} else {
write_ascii_char((x++)+(y * 30), 0);
}
number -= b * num;
 
num /= 10;
}
} else {
write_char((x)+(y * 30), 0);
write_ndigit_number_u(x, y, number, num, pad);
}
void write_ndigit_number_s(uint8_t x, uint8_t y, int16_t number, int16_t length, uint8_t pad) {
char s[7];
itoa(number, s, 10 );
for (uint8_t i = 0; i < length - strlen(s); i++) {
if (pad) write_char((x++)+(y * 30), 10);
else write_ascii_char((x++)+(y * 30), 0);
}
write_ascii_string(x, y, s);
}
 
/**
* Write only some digits of a unsigned <number> at <x>/<y> to MAX7456 display memory
* as /10th of the value
* <num> represents the largest multiple of 10 that will still be displayable as
* the first digit, so num = 10 will be 0-99 and so on
* Write a unsigned <number> at <x>/<y> to MAX7456 display memory as /10th of value
* <length> represents the length to rightbound the number
* <pad> = 1 will cause blank spaced to be filled up with zeros e.g. 007 instead of 7
*/
void write_ndigit_number_u_10th(uint8_t x, uint8_t y, uint16_t number, int16_t num, uint8_t pad) {
// if number is largar than 99[..]9 we must decrease it
while (number >= (num * 10)) {
number -= num * 10;
}
 
uint8_t started = 0;
while (num > 0) {
uint8_t b = number / num;
if (b > 0 || started || num == 1) {
if ((num / 10) == 0) {
if (!started) write_ascii_char((x - 1)+(y * 30), '0');
write_char((x++)+(y * 30), 65); // decimal point
}
write_ascii_char((x++)+(y * 30), '0' + b);
started = 1;
} else {
if (pad) write_ascii_char((x++)+(y * 30), '0');
else write_ascii_char((x++)+(y * 30), ' ');
}
number -= b * num;
 
num /= 10;
}
void write_ndigit_number_u_10th(uint8_t x, uint8_t y, uint16_t number, int16_t length, uint8_t pad) {
char s[7];
itoa(number, s, 10 );
for (uint8_t i = 0; i < length - strlen(s); i++) {
if (pad) write_char((x++)+(y * 30), 10);
else write_ascii_char((x++)+(y * 30), 0);
}
char rest = s[strlen(s)-1];
s[strlen(s)-1] = 0;
if (number < 10) write_char((x-1)+(y * 30), 10); // zero
else write_ascii_string(x, y, s);
x += strlen(s);
write_char((x++)+(y * 30), 65); // decimal point
write_ascii_char((x++)+(y * 30), rest); // after dot
}
 
/**
* Write only some digits of a signed <number> at <x>/<y> to MAX7456 display memory
* as /10th of the value
* <num> represents the largest multiple of 10 that will still be displayable as
* the first digit, so num = 10 will be 0-99 and so on
* Write a signed <number> at <x>/<y> to MAX7456 display memory as /10th of value
* <length> represents the length to rightbound the number
* <pad> = 1 will cause blank spaced to be filled up with zeros e.g. 007 instead of 7
*/
void write_ndigit_number_s_10th(uint8_t x, uint8_t y, int16_t number, int16_t num, uint8_t pad) {
if (((uint16_t) number) > 32767) {
number = number - 65536;
num *= -1;
 
// if number is smaller than -99[..]9 we must increase it
while (number <= (num * 10)) {
number -= num * 10;
}
 
uint8_t started = 0;
 
while (num < 0) {
uint8_t b = number / num;
if (pad) write_ascii_char((x)+(y * 30), '0');
if (b > 0 || started || num == 1) {
if ((num / 10) == 0) {
if (!started) {
write_ascii_char((x - 2)+(y * 30), '-');
write_ascii_char((x - 1)+(y * 30), '0');
}
write_char((x++)+(y * 30), 65); // decimal point
} else if (!started) {
write_char((x - 1)+(y * 30), 0x49); // minus
}
write_ascii_char((x++)+(y * 30), '0' + b);
started = 1;
} else {
write_ascii_char((x++)+(y * 30), 0);
}
number -= b * num;
 
num /= 10;
}
} else {
write_char((x)+(y * 30), 0);
write_ndigit_number_u_10th(x, y, number, num, pad);
}
void write_ndigit_number_s_10th(uint8_t x, uint8_t y, int16_t number, int16_t length, uint8_t pad) {
char s[7];
itoa(number, s, 10 );
for (uint8_t i = 0; i < length - strlen(s); i++) {
if (pad) write_char((x++)+(y * 30), 10);
else write_char((x++)+(y * 30), 0);
}
char rest = s[strlen(s)-1];
s[strlen(s)-1] = 0;
if (number < 10) write_char((x)+(y * 30), 10); // zero
else {
write_ascii_string(x, y, s);
}
x += strlen(s);
write_char((x++)+(y * 30), 65); // decimal point
write_ascii_char((x++)+(y * 30), rest); // after dot
}
 
/**
357,9 → 290,9
void write_time(uint8_t x, uint8_t y, uint16_t seconds) {
uint16_t min = seconds / 60;
seconds -= min * 60;
write_ndigit_number_u(x, y, min, 100, 0);
write_ndigit_number_u(x, y, min, 3, 0);
write_char_xy(x + 3, y, 68);
write_ndigit_number_u(x + 4, y, seconds, 10, 1);
write_ndigit_number_u(x + 4, y, seconds, 2, 1);
}
 
/**
373,12 → 306,12
} else {
write_char_xy(x++, y, 0); // clear ('+' would be nice, maybe later)
}
write_ndigit_number_u(x, y, (uint16_t) (position / (int32_t) 10000000), 100, 1);
write_ndigit_number_u(x, y, (uint16_t) (position / (int32_t) 10000000), 3, 1);
write_char_xy(x + 3, y, 65); // decimal point
position = position - ((position / (int32_t) 10000000) * (int32_t) 10000000);
write_ndigit_number_u(x + 4, y, (uint16_t) (position / (int32_t) 1000), 1000, 1);
write_ndigit_number_u(x + 4, y, (uint16_t) (position / (int32_t) 1000), 4, 1);
position = position - ((uint16_t) (position / (int32_t) 1000) * (int32_t) 1000);
write_ndigit_number_u(x + 8, y, (uint16_t) position, 100, 1);
write_ndigit_number_u(x + 8, y, (uint16_t) position, 3, 1);
write_char_xy(x + 11, y, 0xD0); // degree symbol
}
 
/C-OSD/trunk/max7456_software_spi.h
90,36 → 90,30
void write_string_pgm_down(uint8_t, uint8_t, const char*, uint8_t);
 
/**
* Write only some digits of a unsigned <number> at <x>/<y> to MAX7456 display memory
* <num> represents the largest multiple of 10 that will still be displayable as
* the first digit, so num = 10 will be 0-99 and so on
* Write a unsigned <number> at <x>/<y> to MAX7456 display memory
* <length> represents the length to rightbound the number
* <pad> = 1 will cause blank spaced to be filled up with zeros e.g. 007 instead of 7
*/
void write_ndigit_number_u(uint8_t, uint8_t, uint16_t, int16_t, uint8_t);
 
/**
* Write only some digits of a signed <number> at <x>/<y> to MAX7456 display memory
* <num> represents the largest multiple of 10 that will still be displayable as
* the first digit, so num = 10 will be 0-99 and so on
* Write a signed <number> at <x>/<y> to MAX7456 display memory
* <length> represents the length to rightbound the number
* <pad> = 1 will cause blank spaced to be filled up with zeros e.g. 007 instead of 7
*/
void write_ndigit_number_s(uint8_t, uint8_t, int16_t, int16_t, uint8_t);
 
/**
* Write only some digits of a unsigned <number> at <x>/<y> to MAX7456 display memory
* as /10th of the value
* <num> represents the largest multiple of 10 that will still be displayable as
* the first digit, so num = 10 will be 0-99 and so on
* <pad> = 1 will cause blank spaced to be filled up with zeros e.g. 00.7 instead of .7
* Write a unsigned <number> at <x>/<y> to MAX7456 display memory as /10th of value
* <length> represents the length to rightbound the number
* <pad> = 1 will cause blank spaced to be filled up with zeros e.g. 007 instead of 7
*/
void write_ndigit_number_u_10th(uint8_t, uint8_t, uint16_t, int16_t, uint8_t);
 
/**
* Write only some digits of a signed <number> at <x>/<y> to MAX7456 display memory
* as /10th of the value
* <num> represents the largest multiple of 10 that will still be displayable as
* the first digit, so num = 10 will be 0-99 and so on
* <pad> = 1 will cause blank spaced to be filled up with zeros e.g. 00.7 instead of .7
* Write a signed <number> at <x>/<y> to MAX7456 display memory as /10th of value
* <length> represents the length to rightbound the number
* <pad> = 1 will cause blank spaced to be filled up with zeros e.g. 007 instead of 7
*/
void write_ndigit_number_s_10th(uint8_t, uint8_t, int16_t, int16_t, uint8_t);
 
/C-OSD/trunk/osd_fcmode_default.c
42,7 → 42,7
COSD_FLAGS2 |= COSD_ICONS_WRITTEN;
}
 
write_ndigit_number_u(7, top_line, debugData.Analog[10], 100, 0);
write_ndigit_number_u(7, top_line, debugData.Analog[10], 3, 0);
if (debugData.Analog[10] <= RCLVL_WRN && last_RC_Quality > RCLVL_WRN) {
for (uint8_t x = 0; x < 4; x++)
write_char_att_xy(7 + x, top_line, BLINK);
53,10 → 53,10
if (debugData.Analog[5] > 300 || debugData.Analog[5] < -300) {
// above 10m only write full meters
write_ndigit_number_s(23, top_line, debugData.Analog[5] / 30, 1000, 0);
write_ndigit_number_s(23, top_line, debugData.Analog[5] / 30, 4, 0);
} else {
// up to 10m write meters.dm
write_ndigit_number_s_10th(23, top_line, debugData.Analog[5] / 3, 100, 0);
write_ndigit_number_s_10th(23, top_line, debugData.Analog[5] / 3, 3, 0);
}
if (debugData.Analog[5] > max_Altimeter) max_Altimeter = debugData.Analog[5];
 
66,16 → 66,16
 
// pre-bottom line
if (COSD_FLAGS2 & COSD_FLAG_STROMREC) {
//write_ndigit_number_s(3, bottom_line - 1, ampere, 1000, 0);
write_ndigit_number_u_10th(3, bottom_line - 1, ampere / 10, 100, 0);
write_ndigit_number_s(10, bottom_line - 1, ampere_wasted / 10, 1000, 0);
//write_ndigit_number_s(3, bottom_line - 1, ampere, 4, 0);
write_ndigit_number_u_10th(3, bottom_line - 1, ampere / 10, 3, 0);
write_ndigit_number_s(10, bottom_line - 1, ampere_wasted / 10, 4, 0);
if (COSD_FLAGS & COSD_FLAG_STROMVOLT) {
write_ndigit_number_u_10th(17, bottom_line - 1, s_volt, 100, 0);
write_ndigit_number_u_10th(17, bottom_line - 1, s_volt, 3, 0);
}
}
 
draw_battery(2, bottom_line, min_voltage, debugData.Analog[9], max_voltage);
write_ndigit_number_u_10th(3, bottom_line, debugData.Analog[9], 100, 0);
write_ndigit_number_u_10th(3, bottom_line, debugData.Analog[9], 3, 0);
if (debugData.Analog[9] <= min_voltage && last_UBat > min_voltage) {
for (uint8_t x = 2; x < 8; x++)
write_char_att_xy(x, bottom_line, BLINK);
/C-OSD/trunk/osd_ncmode_default.c
52,9 → 52,9
}
 
// first line
write_ndigit_number_u(2, top_line, (uint16_t) (((uint32_t) naviData.GroundSpeed * (uint32_t) 9) / (uint32_t) 250), 100, 0);
write_ndigit_number_u(2, top_line, (uint16_t) (((uint32_t) naviData.GroundSpeed * (uint32_t) 9) / (uint32_t) 250), 3, 0);
 
write_ndigit_number_u(7, top_line, naviData.RC_Quality, 100, 0);
write_ndigit_number_u(7, top_line, naviData.RC_Quality, 3, 0);
if (naviData.RC_Quality <= RCLVL_WRN && last_RC_Quality > RCLVL_WRN) {
for (uint8_t x = 0; x < 4; x++)
write_char_att_xy(7 + x, top_line, BLINK);
70,7 → 70,7
write_char_xy(11, top_line, 0xC6); // PC icon
}
 
write_ndigit_number_u(13, top_line, naviData.CompassHeading, 100, 0);
write_ndigit_number_u(13, top_line, naviData.CompassHeading, 3, 0);
 
write_ascii_string_pgm(17, top_line, (const char *) (pgm_read_word ( &(directions[heading_conv(naviData.CompassHeading)]))));
 
79,13 → 79,16
//note:lephisto:according to several sources it's /30
if (naviData.Altimeter > 300 || naviData.Altimeter < -300) {
// above 10m only write full meters
write_ndigit_number_s(23, top_line, naviData.Altimeter / 30, 1000, 0);
write_ndigit_number_s(23, top_line, naviData.Altimeter / 30, 4, 0);
} else {
// up to 10m write meters.dm
//write_number_u_10th(21, top_line, naviData.Altimeter / 3);
write_ndigit_number_s_10th(23, top_line, naviData.Altimeter / 3, 100, 0);
write_ndigit_number_s_10th(23, top_line, naviData.Altimeter / 3, 3, 0);
}
 
// GPS HIGHT
//write_ndigit_number_s(23, top_line-1, (int16_t) (naviData.CurrentPosition.Altitude / 1000), 4, 0);
 
// seccond line
draw_compass(11, top_line + 1, naviData.CompassHeading);
 
95,7 → 98,7
// finer resolution, 0xa0 is first character and we add the index 0 <= index < 16
write_char_xy(21, top_line + 1, 0xa0 + heading_fine_conv(heading_home));
 
write_ndigit_number_u(24, top_line + 1, naviData.HomePositionDeviation.Distance / 10, 100, 0);
write_ndigit_number_u(24, top_line + 1, naviData.HomePositionDeviation.Distance / 10, 3, 0);
 
// center
if (naviData.MKFlags & FLAG_MOTOR_RUN) { // should be engines running
118,20 → 121,20
if ((COSD_FLAGS2 & COSD_WASFLYING) && (COSD_FLAGS & COSD_FLAG_STATS)) {
uint8_t line = 3;
write_ascii_string_pgm(2, line, (const char *) (pgm_read_word(&(stats_item_pointers[0])))); // max Altitude
write_ndigit_number_s(18, line, max_Altimeter / 30, 1000, 0);
write_ndigit_number_s(18, line, max_Altimeter / 30, 4, 0);
write_char_xy(22, line, 204); // small meters m
write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[1])))); // max Speed
write_ndigit_number_u(19, line, (uint16_t) (((uint32_t) max_GroundSpeed * (uint32_t) 9) / (uint32_t) 250), 100, 0);
write_ndigit_number_u(19, line, (uint16_t) (((uint32_t) max_GroundSpeed * (uint32_t) 9) / (uint32_t) 250), 3, 0);
write_char_xy(22, line, 203); // km/h
write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[2])))); // max Distance
write_ndigit_number_u(19, line, max_Distance / 10, 100, 0);
write_ndigit_number_u(19, line, max_Distance / 10, 3, 0);
write_char_xy(22, line, 204); // small meters m
write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[3])))); // min voltage
write_ndigit_number_u_10th(18, line, min_UBat, 100, 0);
write_ndigit_number_u_10th(18, line, min_UBat, 3, 0);
write_char_xy(22, line, 0x9E); // small V
if (COSD_FLAGS2 & COSD_FLAG_STROMREC) {
write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[7])))); // ampere
write_ndigit_number_u_10th(18, line, max_ampere / 10, 100, 0);
write_ndigit_number_u_10th(18, line, max_ampere / 10, 3, 0);
write_char_xy(22, line, 0x9F); // small A
}
write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[4])))); // max time
155,17 → 158,17
 
// pre-bottom line
if (COSD_FLAGS2 & COSD_FLAG_STROMREC) {
//write_ndigit_number_s(3, bottom_line - 1, ampere, 1000, 0);
write_ndigit_number_u_10th(3, bottom_line - 1, ampere / 10, 100, 0);
write_ndigit_number_s(10, bottom_line - 1, ampere_wasted / 10, 1000, 0);
//write_ndigit_number_s(3, bottom_line - 1, ampere, 4, 0);
write_ndigit_number_u_10th(3, bottom_line - 1, ampere / 10, 3, 0);
write_ndigit_number_s(10, bottom_line - 1, ampere_wasted / 10, 4, 0);
if (COSD_FLAGS & COSD_FLAG_STROMVOLT) {
write_ndigit_number_u_10th(17, bottom_line - 1, s_volt, 100, 0);
write_ndigit_number_u_10th(17, bottom_line - 1, s_volt, 3, 0);
}
}
 
// bottom line
draw_battery(2, bottom_line, min_voltage, naviData.UBat, max_voltage);
write_ndigit_number_u_10th(3, bottom_line, naviData.UBat, 100, 0);
write_ndigit_number_u_10th(3, bottom_line, naviData.UBat, 3, 0);
if (naviData.UBat <= min_voltage && last_UBat > min_voltage) {
for (uint8_t x = 2; x < 8; x++)
write_char_att_xy(x, bottom_line, BLINK);
177,7 → 180,7
write_time(8, bottom_line, uptime);
write_time(15, bottom_line, naviData.FlyingTime);
 
write_ndigit_number_u(24, bottom_line, naviData.SatsInUse, 10, 0);
write_ndigit_number_u(24, bottom_line, naviData.SatsInUse, 2, 0);
 
if (naviData.NCFlags & NC_FLAG_MANUAL_CONTROL) {
write_char_xy(23, bottom_line, 0xB3); // rc transmitter
/C-OSD/trunk/osd_ncmode_minimal.c
42,9 → 42,9
}
 
// first line
write_ndigit_number_u(1, top_line, (uint16_t) (((uint32_t) naviData.GroundSpeed * (uint32_t) 9) / (uint32_t) 250), 100, 0);
write_ndigit_number_u(1, top_line, (uint16_t) (((uint32_t) naviData.GroundSpeed * (uint32_t) 9) / (uint32_t) 250), 3, 0);
 
write_ndigit_number_u(12, top_line, naviData.HomePositionDeviation.Distance / 10, 100, 0);
write_ndigit_number_u(12, top_line, naviData.HomePositionDeviation.Distance / 10, 3, 0);
 
uint16_t heading_home = (naviData.HomePositionDeviation.Bearing + 360 - naviData.CompassHeading) % 360;
write_char_xy(17, top_line, 0xa0 + heading_fine_conv(heading_home));
51,10 → 51,10
 
if (naviData.Altimeter > 300 || naviData.Altimeter < -300) {
// above 10m only write full meters
write_ndigit_number_s(22, top_line, naviData.Altimeter / 30, 1000, 0);
write_ndigit_number_s(22, top_line, naviData.Altimeter / 30, 4, 0);
} else {
// up to 10m write meters.dm
write_ndigit_number_s_10th(22, top_line, naviData.Altimeter / 3, 100, 0);
write_ndigit_number_s_10th(22, top_line, naviData.Altimeter / 3, 3, 0);
}
 
draw_variometer(27, top_line, naviData.Variometer);
81,20 → 81,20
if ((COSD_FLAGS2 & COSD_WASFLYING) && (COSD_FLAGS & COSD_FLAG_STATS)) {
uint8_t line = 3;
write_ascii_string_pgm(2, line, (const char *) (pgm_read_word(&(stats_item_pointers[0])))); // max Altitude
write_ndigit_number_s(18, line, max_Altimeter / 30, 1000, 0);
write_ndigit_number_s(18, line, max_Altimeter / 30, 4, 0);
write_char_xy(22, line, 204); // small meters m
write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[1])))); // max Speed
write_ndigit_number_u(19, line, (uint16_t) (((uint32_t) max_GroundSpeed * (uint32_t) 9) / (uint32_t) 250), 100, 0);
write_ndigit_number_u(19, line, (uint16_t) (((uint32_t) max_GroundSpeed * (uint32_t) 9) / (uint32_t) 250), 3, 0);
write_char_xy(22, line, 203); // km/h
write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[2])))); // max Distance
write_ndigit_number_u(19, line, max_Distance / 10, 100, 0);
write_ndigit_number_u(19, line, max_Distance / 10, 3, 0);
write_char_xy(22, line, 204); // small meters m
write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[3])))); // min voltage
write_ndigit_number_u_10th(18, line, min_UBat, 100, 0);
write_ndigit_number_u_10th(18, line, min_UBat, 3, 0);
write_char_xy(22, line, 0x9E); // small V
if (COSD_FLAGS2 & COSD_FLAG_STROMREC) {
write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[7])))); // ampere
write_ndigit_number_u_10th(18, line, max_ampere / 10, 100, 0);
write_ndigit_number_u_10th(18, line, max_ampere / 10, 3, 0);
write_char_xy(22, line, 0x9F); // small A
}
write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[4])))); // max time
118,14 → 118,14
 
// pre-bottom line
if (COSD_FLAGS2 & COSD_FLAG_STROMREC) {
//write_ndigit_number_s(3, bottom_line - 1, ampere, 1000, 0);
write_ndigit_number_u_10th(3, bottom_line - 1, ampere / 10, 100, 0);
write_ndigit_number_s(10, bottom_line - 1, ampere_wasted / 10, 1000, 0);
//write_ndigit_number_s(3, bottom_line - 1, ampere, 4, 0);
write_ndigit_number_u_10th(3, bottom_line - 1, ampere / 10, 3, 0);
write_ndigit_number_s(10, bottom_line - 1, ampere_wasted / 10, 4, 0);
}
 
// bottom line
draw_battery(2, bottom_line, min_voltage, naviData.UBat, max_voltage);
write_ndigit_number_u_10th(3, bottom_line, naviData.UBat, 100, 0);
write_ndigit_number_u_10th(3, bottom_line, naviData.UBat, 3, 0);
if (naviData.UBat <= min_voltage && last_UBat > min_voltage) {
for (uint8_t x = 2; x < 8; x++)
write_char_att_xy(x, bottom_line, BLINK);
136,7 → 136,7
 
write_time(11, bottom_line, naviData.FlyingTime);
 
write_ndigit_number_u(24, bottom_line, naviData.SatsInUse, 10, 0);
write_ndigit_number_u(24, bottom_line, naviData.SatsInUse, 2, 0);
 
if (naviData.NCFlags & NC_FLAG_CH) {
write_char_xy(27, bottom_line, 231); // gps ch