<?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=18127&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2017-04-11T18:47:02+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=4&amp;t=18127&amp;mode</id>
<entry>
<author><name><![CDATA[wchpikus]]></name></author>
<updated>2017-04-11T14:59:28+01:00</updated>
<published>2017-04-11T14:59:28+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186896#p186896</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186896#p186896"/>
<title type="html"><![CDATA[Re: pytanie o czyszczenie bufora]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186896#p186896"><![CDATA[
Wlasnie cos nie dziala w przerwaniu..<br />A moze przesunac dane w buforze?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3859">wchpikus</a> — 11 kwi 2017, o 14:59</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Wirnick]]></name></author>
<updated>2017-04-11T14:52:13+01:00</updated>
<published>2017-04-11T14:52:13+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186895#p186895</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186895#p186895"/>
<title type="html"><![CDATA[Re: pytanie o czyszczenie bufora]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186895#p186895"><![CDATA[
Potrafisz &quot;wyciąć&quot; '\r', to i dowolną ASCII np. char ' '(spacja) lub kod formatowania tekstu.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=9272">Wirnick</a> — 11 kwi 2017, o 14:52</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[wchpikus]]></name></author>
<updated>2017-04-11T18:47:02+01:00</updated>
<published>2017-04-11T14:45:49+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186894#p186894</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186894#p186894"/>
<title type="html"><![CDATA[Re: pytanie o czyszczenie bufora]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186894#p186894"><![CDATA[
po danych przychodzacych...po hex i po znaczniku (fladze)..<br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 1 minucie ]</span></strong><br /><br />Musze odfiltowac date, jakie przychodza, teraz jest bez spacji, potzrebuje spacje..<br />.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3859">wchpikus</a> — 11 kwi 2017, o 14:45</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Jarecki]]></name></author>
<updated>2017-04-11T14:35:29+01:00</updated>
<published>2017-04-11T14:35:29+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186893#p186893</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186893#p186893"/>
<title type="html"><![CDATA[Re: pytanie o czyszczenie bufora]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186893#p186893"><![CDATA[
A na jakiej zasadzie ma działać wybór kiedy spacja jest potrzebna a kiedy nie? <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /> znaczy się skąd funkcja, która filtruje ma wiedzieć że teraz ma filtrować a za chwile nie? <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=2511">Jarecki</a> — 11 kwi 2017, o 14:35</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[wchpikus]]></name></author>
<updated>2017-04-11T14:32:20+01:00</updated>
<published>2017-04-11T14:32:20+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186892#p186892</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186892#p186892"/>
<title type="html"><![CDATA[Re: pytanie o czyszczenie bufora]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186892#p186892"><![CDATA[
Spacja w niektórych danych odebranych jest niepotrzebna i wprowadza błędy  i potrzeba ja wyciąć, a w niektórych danych potrzebna..<img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><br />Nie mam wpływu na format danych wejsciowych<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3859">wchpikus</a> — 11 kwi 2017, o 14:32</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Jarecki]]></name></author>
<updated>2017-04-11T14:23:07+01:00</updated>
<published>2017-04-11T14:23:07+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186891#p186891</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186891#p186891"/>
<title type="html"><![CDATA[Re: pytanie o czyszczenie bufora]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186891#p186891"><![CDATA[
<div class="quotetitle">wchpikus napisał(a):</div><div class="quotecontent"><br />kompiluje sie ok, tylko...<br />bufor ladowany jest w przerwaniu...nie wiem czy to poprawne.<br /></div><br /><br />Procedury obsługi przerwania powinny być możliwie najkrótsze a wpakowanie bufora.... no nie wiem <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><br /><br />może zobacz tak:<br /><br />[syntax=c]char command_in&#91;50&#93;;<br /><br />void clear_buffor( char *wsk){<br />uint8_t command_in_length = strlen(&amp;wsk);<br />for(uint8_t i = 0; i &lt; command_in_length;i++){<br /><br />*(wsk + i) = (uint8_t)0;<br />}<br />}<br /><br />clear_buffor(command_in);[/syntax]<br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 6 minutach ]</span></strong><br /><br /><div class="quotetitle">wchpikus napisał(a):</div><div class="quotecontent"><br />potrzebuje z danych odebranych filtrowac &quot;spacje&quot;.<br /></div><br /><br />Nie bardzo rozumiem? <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=2511">Jarecki</a> — 11 kwi 2017, o 14:23</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[wchpikus]]></name></author>
<updated>2017-04-11T14:24:37+01:00</updated>
<published>2017-04-11T14:10:34+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186890#p186890</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186890#p186890"/>
<title type="html"><![CDATA[Re: pytanie o czyszczenie bufora]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186890#p186890"><![CDATA[
tpo dodaniu to mam:<br />../Functions/functions.c:34:2: warning: passing argument 1 of 'strlen' discards 'volatile' qualifier from pointer target type [enabled by default]<br />c:\program files (x86)\atmel\avr tools\avr toolchain\bin\../lib/gcc/avr/4.6.2/../../../../avr/include/string.h:133:15: note: expected 'const char *' but argument is of type 'volatile char *'<br /><br />ale jak wywalilem <br />volatile z char data_in[50];<br /><br />[syntax=c]char data_in&#91;50&#93;; //dane wejsciowe z uart[/syntax]<br />kompiluje sie ok, tylko...<br />bufor ladowany jest w przerwaniu...nie wiem czy to poprawne.<br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 11 minutach ]</span></strong><br /><br />to jak juz to dziala jakos:) porosze o jeszcze jedna rade.<br /><br />potrzebuje z danych odebranych filtrowac &quot;spacje&quot;.<br /><br />mam taki kod:<br /><br />[syntax=c]ISR(USART_RX_vect){<br />check_sign = UDR0;<br /><br />if( (check_sign == 0x3E) || (check_sign == 0x0A) || (check_sign == 0x20) ){ //jesli jest rozny od &quot;&gt;&quot; , \n. 'space'|<br />    data_count--;<br />    }<br />    else<br />    {<br />    data_in&#91;data_count&#93; = check_sign;<br />    }<br />if (data_in&#91;data_count&#93; == '\r') {<br />    data_in&#91;data_count&#93; = '\0';<br />    data_count = 0;<br />    }<br />    else<br />    {<br />    data_count++;<br />    }[/syntax]<br /><br />I działa dla znaków &quot;&gt;&quot; ,&quot;&quot; oraz /n<br /><br />próbuje tak:<br />[syntax=c]ISR(USART_RX_vect){<br />    // Get data from the USART in register<br />check_sign = UDR0;<br /><br /><br />    if (wifi_ready == 5){<br />    if( (check_sign == 0x3E) || (check_sign == 0x0A)){//jesli jest rozny od &quot;&gt;&quot; , \n. spacja ma przechodzic<br />    data_count--;<br />    }<br />    }<br />    else<br />    {<br />    if( (check_sign == 0x3E) || (check_sign == 0x0A) || (check_sign == 0x20) ){ //jesli jest rozny od &quot;&gt;&quot; , \n. 'space'|<br />    data_count--;<br />    }<br />    else<br />    {<br />    data_in&#91;data_count&#93; = check_sign;<br />    }<br />    } <br />    if (data_in&#91;data_count&#93; == '\r') {<br />    data_in&#91;data_count&#93; = '\0';<br />    data_count = 0;<br />    }<br />    else<br />    {<br />    data_count++;<br />    }<br /><br /><br />    }//ISR(USART_RX_vect[/syntax]<br /><br /><br />ale cos nie dziala...<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3859">wchpikus</a> — 11 kwi 2017, o 14:10</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Jarecki]]></name></author>
<updated>2017-04-11T14:06:50+01:00</updated>
<published>2017-04-11T14:06:50+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186889#p186889</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186889#p186889"/>
<title type="html"><![CDATA[Re: pytanie o czyszczenie bufora]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186889#p186889"><![CDATA[
To moze dodaj:<br /><br />[syntax=c]char command_in&#91;50&#93;;<br />             <br />            void clear_buffor( volatile char tab&#91;&#93;){<br />                    uint8_t command_in_length = strlen(tab);<br />                    for(uint8_t i = 0; i &lt; command_in_length;i++){<br />             <br />                            tab&#91;i&#93; = (uint8_t)0;<br />                    }<br />            }<br />             <br />            clear_buffor(command_in);[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=2511">Jarecki</a> — 11 kwi 2017, o 14:06</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[wchpikus]]></name></author>
<updated>2017-04-11T14:03:59+01:00</updated>
<published>2017-04-11T14:03:59+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186888#p186888</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186888#p186888"/>
<title type="html"><![CDATA[Re: pytanie o czyszczenie bufora]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186888#p186888"><![CDATA[
Ok ostatnie dziala, ale jeden bufor mam<br />[syntax=c]volatile char data_in&#91;50&#93;;[/syntax]<br /><br />i wywala warning:<br />../main.c:135:22: warning: passing argument 1 of 'clear_buffor' discards 'volatile' qualifier from pointer target type [enabled by default]<br />../Functions/functions.h:14:6: note: expected 'char *' but argument is of type 'volatile char *'<br /><br />Na drugim dziala chyba ok.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3859">wchpikus</a> — 11 kwi 2017, o 14:03</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Jarecki]]></name></author>
<updated>2017-04-11T13:59:33+01:00</updated>
<published>2017-04-11T13:59:33+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186887#p186887</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186887#p186887"/>
<title type="html"><![CDATA[Re: pytanie o czyszczenie bufora]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186887#p186887"><![CDATA[
Spróbuj tak:<br /><br />[syntax=c]char command_in&#91;50&#93;;<br />         <br />        void clear_buffor(char tab&#91;&#93;){<br />                uint8_t command_in_length = strlen(tab);<br />                for(uint8_t i = 0; i &lt; command_in_length;i++){<br />         <br />                        tab&#91;i&#93; = (uint8_t)0;<br />                }<br />        }<br />         <br />        clear_buffor(command_in);[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=2511">Jarecki</a> — 11 kwi 2017, o 13:59</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[wchpikus]]></name></author>
<updated>2017-04-11T13:58:35+01:00</updated>
<published>2017-04-11T13:58:35+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186886#p186886</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186886#p186886"/>
<title type="html"><![CDATA[Re: pytanie o czyszczenie bufora]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186886#p186886"><![CDATA[
ok, ale mam dwa bufory i chce przekazywac do funkcji wskaznik na bufor..<br />i jedna komenda czyscic jeden wskazany<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3859">wchpikus</a> — 11 kwi 2017, o 13:58</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Jarecki]]></name></author>
<updated>2017-04-11T13:55:11+01:00</updated>
<published>2017-04-11T13:55:11+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186885#p186885</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186885#p186885"/>
<title type="html"><![CDATA[Re: pytanie o czyszczenie bufora]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186885#p186885"><![CDATA[
<div class="quotetitle">wchpikus napisał(a):</div><div class="quotecontent"><br />moze byc tak?<br />[syntax=c]char command_in&#91;50&#93;;<br /><br />void clear_buffor(char tab&#91;&#93;){<br />uint8_t command_in_length = strlen(tab);<br />for(uint8_t i = 0; i &lt; command_in_length;i++){<br /><br />tab&#91;0&#93; = (uint8_t)0;<br />}<br />}<br /><br />clear_buffor(command_in);[/syntax]<br /></div><br /><br />Nie.....<br /><br />tak:<br /><br />[syntax=c]char command_in&#91;50&#93;;<br />     <br />    void clear_buffor(char tab&#91;&#93;){<br />            uint8_t command_in_length = strlen(command_in);<br />            for(uint8_t i = 0; i &lt; command_in_length;i++){<br />     <br />                    tab&#91;i&#93; = (uint8_t)0;<br />            }<br />    }<br />     <br />    clear_buffor(command_in);[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=2511">Jarecki</a> — 11 kwi 2017, o 13:55</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[wchpikus]]></name></author>
<updated>2017-04-11T13:56:39+01:00</updated>
<published>2017-04-11T13:52:25+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186884#p186884</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186884#p186884"/>
<title type="html"><![CDATA[Re: pytanie o czyszczenie bufora]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186884#p186884"><![CDATA[
moze byc tak?<br />main:<br />[syntax=c]char command_in&#91;50&#93;;<br />clear_buffor(command_in);[/syntax]<br /><br />w innym pliku:<br />[syntax=c]void clear_buffor(char tab&#91;&#93;){<br />uint8_t command_in_length = strlen(tab);<br />for(uint8_t i = 0; i &lt; command_in_length;i++){<br /><br />tab&#91;0&#93; = (uint8_t)0;<br />}<br />}[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3859">wchpikus</a> — 11 kwi 2017, o 13:52</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[k_mirek]]></name></author>
<updated>2017-04-11T13:48:01+01:00</updated>
<published>2017-04-11T13:48:01+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186883#p186883</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186883#p186883"/>
<title type="html"><![CDATA[Re: pytanie o czyszczenie bufora]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186883#p186883"><![CDATA[
Witam.<br /><br />Może, pomoże taka funkcja jak memset. Podajesz wskaźnik na bufor, wartość jaka ma być wpisana, oraz rozmiar. <br /><br />[syntax=c]memset(bufor, 0, sizeof(bufor))[/syntax]<br /><br />Pozdrawiam.<br /><br /><strong><span style="color: #808000">------------------------ [ Dodano po: 2 minutach ]</span></strong><br /><br /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=499">k_mirek</a> — 11 kwi 2017, o 13:48</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Jarecki]]></name></author>
<updated>2017-04-11T13:47:45+01:00</updated>
<published>2017-04-11T13:47:45+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186882#p186882</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186882#p186882"/>
<title type="html"><![CDATA[Re: pytanie o czyszczenie bufora]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186882#p186882"><![CDATA[
Chcąc wyczyścić bufor nie możesz wpisywać &quot;0&quot; (zero w cudzysłowie ) tylko samo 0 (zero). Bufor jest pewnie typu char wiec zrób rzutowanie na uint8_t.<br /><br />[syntax=c]sttaic char buff&#91;100&#93;;<br /><br />for( uint8_t i = 0; i &lt; sizeof(buff); i++)<br />{<br />    buff&#91;i&#93; = (uint8_t)0;<br />}[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=2511">Jarecki</a> — 11 kwi 2017, o 13:47</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[wchpikus]]></name></author>
<updated>2017-04-11T13:39:30+01:00</updated>
<published>2017-04-11T13:39:30+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186881#p186881</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186881#p186881"/>
<title type="html"><![CDATA[pytanie o czyszczenie bufora]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=18127&amp;p=186881#p186881"><![CDATA[
Witam<br />Moze mi ktos polecic dobry sposob na czyszczenie bufora?<br />Zapisuje tam dane z uart, niestety zostaja jakies dane po porzedniej ramce.<br />Probowalem zapisac zerami w postaci petli od 0 do rozmiaru tablicy &quot;0&quot;,nie dziala,'/0' tez nie chce.<br />Jak wyczyscic taki bufor?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3859">wchpikus</a> — 11 kwi 2017, o 13:39</p><hr />
]]></content>
</entry>
</feed>