<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl-pl">
<link rel="self" type="application/atom+xml" href="https://forum.atnel.pl/feed.php?f=4&amp;t=12966&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2015-09-16T22:12:57+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=4&amp;t=12966&amp;mode</id>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2015-09-16T22:12:57+01:00</updated>
<published>2015-09-16T22:12:57+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=12966&amp;p=140015#p140015</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=12966&amp;p=140015#p140015"/>
<title type="html"><![CDATA[Re: Kompilacja kodu z obsługą fontów by Atnel - mnóstwo warn]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=12966&amp;p=140015#p140015"><![CDATA[
jak coś jeszcze ci zostanie to pytaj śmiało<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=54">mirekk36</a> — 16 wrz 2015, o 22:12</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[new_old_man]]></name></author>
<updated>2015-09-16T22:09:35+01:00</updated>
<published>2015-09-16T22:09:35+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=12966&amp;p=140014#p140014</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=12966&amp;p=140014#p140014"/>
<title type="html"><![CDATA[Re: Kompilacja kodu z obsługą fontów by Atnel - mnóstwo warn]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=12966&amp;p=140014#p140014"><![CDATA[
<div class="quotetitle">mirekk36 napisał(a):</div><div class="quotecontent"><br />Zobacz jak już bardzo dawno to opisałem:<br /><!-- m --><a class="postlink" href="http://mirekk36.blogspot.com/2012/08/ec" >http://mirekk36.blogspot.com/2012/08/ec</a><!-- m --> ... zytaj.html<br /></div><br /><br />Echhhh... no tak! Nawet kiedyś już to czytałem, ale wtedy nie miałem jeszcze GB i nie korzystałem z tego udogodnienia jakim są Atnelowskie fonty:)<br /><br /><div class="quotetitle">mirekk36 napisał(a):</div><div class="quotecontent"><br />Poza tym masz pewnie książkę jeszcze w starej wersji w miękkiej oprawie<br /></div><br />Mhmmmm<br /><br />Biorę się w takim razie do pracy. Dzięki za szybką odpowiedź!<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=10976">new_old_man</a> — 16 wrz 2015, o 22:09</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2015-09-16T22:02:36+01:00</updated>
<published>2015-09-16T22:02:36+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=12966&amp;p=140013#p140013</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=12966&amp;p=140013#p140013"/>
<title type="html"><![CDATA[Re: Kompilacja kodu z obsługą fontów by Atnel - mnóstwo warn]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=12966&amp;p=140013#p140013"><![CDATA[
<div class="quotetitle">new_old_man napisał(a):</div><div class="quotecontent"><br />Nie wiem czy to było dobre posunięcie, ale generalnie pomogło.<br /></div><br />Zobacz jak już bardzo dawno to opisałem:<br /><!-- m --><a class="postlink" href="http://mirekk36.blogspot.com/2012/08/eclipse-kopot-z-pstr-przeczytaj.html" >http://mirekk36.blogspot.com/2012/08/ec ... zytaj.html</a><!-- m --><br /><br />Poza tym masz pewnie książkę jeszcze w starej wersji w miękkiej oprawie, gdzie kody źródłowe były jeszcze pod staruszka WinAVR a nie pod nowy Atmel Toolchain, więc wiadomo że trzeba je poprawić sobie - nie ma wyjścia i nie ma też co wracać do staruszka WinAVR. ZDECYDOWANIE lepiej używać już najnowszego AtmelToolchain<br /><br />Spójrz jak powinien się zmienić najważniejszy typ struktrualny:<br /><br />[syntax=&quot;c&quot;]<br />typedef struct<br />{<br />uint8_t heightPixels;// height, in pages (8 pixels), of the font's characters<br />uint8_t startChar;// the first character in the font (e.g. in charInfo and data)<br />uint8_tinterspacePixels;// number of pixels of interspace between characters<br />uint8_tspacePixels;// number of pixels of space character<br />const FONT_CHAR_INFO*charInfo;// pointer to array of char information<br />const uint8_t*data;// pointer to generated array of character visual representation<br />const char*filename;// (Pointer) Font filename saved on SD card or 0 (null) otherwise<br /><br />} FONT_INFO;[/syntax]<br />zobacz, że i tu MUSI się pojawić const<br /><br />a tu definicje fontów<br />[syntax=&quot;c&quot;]<br /><br />// Font information for Tahoma 48pt<br />const FONT_INFO Tahoma48ptFontInfo PROGMEM =<br />{<br />    77,  // Character height<br />    '!',  //  Start character<br />    4,  //  number of pixels of interspace between characters<br />    16,  // number of pixels of space character<br />    0, // Character descriptor array<br />    0, // Character bitmap array<br />    &amp;FontNames[_Tahoma48pt][0] // (Pointer) Font filename saved on SD card or 0 (null) otherwise<br />};<br /><br />// Font data for Tahoma 8pt<br />extern const uint8_t Tahoma8ptBitmaps[];<br />extern const FONT_CHAR_INFO Tahoma8ptDescriptors[];<br />extern const FONT_INFO DefaultFontInfo;<br /><br />//******************** dalej<br />FONT_INFO currentFont;<br /><br />void setCurrentFont( const FONT_INFO * font ) {<br />currentFont.heightPixels = pgm_read_byte(&amp;font-&gt;heightPixels);<br />currentFont.startChar = pgm_read_byte(&amp;font-&gt;startChar);<br />currentFont.interspacePixels= pgm_read_byte(&amp;font-&gt;interspacePixels);<br />currentFont.spacePixels = pgm_read_byte(&amp;font-&gt;spacePixels);<br />currentFont.charInfo = (FONT_CHAR_INFO*)pgm_read_word(&amp;font-&gt;charInfo);<br />currentFont.data = (uint8_t*)pgm_read_word(&amp;font-&gt;data);<br />currentFont.filename = (char*)pgm_read_word(&amp;font-&gt;filename);<br />}<br /><br /><br />[/syntax]<br /><br />Jak widzisz musi zajść sporo zmian - nie wiem czy podałem wszystkie - musisz popracować - ew możesz sobie dokupić samo DVD od nowszego wydania GB, to wtedy będą kompletne przykłady już pod nowy Toolchain<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=54">mirekk36</a> — 16 wrz 2015, o 22:02</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[new_old_man]]></name></author>
<updated>2015-09-16T21:43:11+01:00</updated>
<published>2015-09-16T21:43:11+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=12966&amp;p=140011#p140011</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=12966&amp;p=140011#p140011"/>
<title type="html"><![CDATA[Kompilacja kodu z obsługą fontów by Atnel - mnóstwo warnów]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=12966&amp;p=140011#p140011"><![CDATA[
<div class="quotetitle"><b>Quote:</b></div><div class="quotecontent"><br />Warning1[N] 2943 : initializing 'FONT_CHAR_INFO *' with an expression of type 'const FONT_CHAR_INFO [11]' discards qualifiers<br /></div><br /><div class="quotetitle"><b>Quote:</b></div><div class="quotecontent"><br />Warning2[N] 2943 : passing 'const FONT_INFO *' to parameter of type 'FONT_INFO *' discards qualifiers<br /></div><br /><br />Kiedy pracowałem na starym toolchainie nie było z tym problemów. Ale toolchain Atmela wymaga,  by zmienne zapisane we flashu były &quot;const&quot; - bez tego sypią się nie ostrzeżenia, a wredne czerwone błędny. Podopisywałem więc &quot;const&quot; w plikach czcionek generowanych przez PixelFactory:<br />[syntax=c]const uint8_t Tahoma12ptBitmaps&#91;&#93; PROGMEM =[/syntax]<br />[syntax=c]const FONT_CHAR_INFO Tahoma12ptDescriptors&#91;&#93; PROGMEM =[/syntax]<br />[syntax=c]const FONT_INFO Tahoma12ptFontInfo PROGMEM =[/syntax]<br /><br />Nie wiem czy to było dobre posunięcie, ale generalnie pomogło. Poza tym, że teraz zamiast kilku errorów mam kilkanaście warningów.<br />A do tego jeszcze wiadomości typu:<br /><div class="quotetitle"><b>Quote:</b></div><div class="quotecontent"><br />Message6expected 'struct FONT_INFO *' but argument is of type 'const struct FONT_INFO *'<br /></div><br /><br />Jak się tego pozbyć?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=10976">new_old_man</a> — 16 wrz 2015, o 21:43</p><hr />
]]></content>
</entry>
</feed>