<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Belt tensioner - Encountering RingBuffer errors using FlowSerialRead.h - Simhub General				            </title>
            <link>https://www.simhubdash.com/community-2/simhub-support/encountering-ringbuffers-errors-using-custom-serial-device/</link>
            <description>All about SimHub!</description>
            <language>en-US</language>
            <lastBuildDate>Sun, 19 Jul 2026 04:03:42 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: Belt tensioner - Encountering RingBuffer errors using FlowSerialRead.h</title>
                        <link>https://www.simhubdash.com/community-2/simhub-support/encountering-ringbuffers-errors-using-custom-serial-device/#post-9197</link>
                        <pubDate>Fri, 12 Jul 2024 11:23:41 +0000</pubDate>
                        <description><![CDATA[SolvedI download the last version from Arduino IDEThe new declaration is &quot;RingBuf&lt;uint8_t, 8&gt; DataBuffer;&quot; instead of &quot;RingBuffer&lt;uint8_t, 8&gt; DataBuffer;&quot;]]></description>
                        <content:encoded><![CDATA[<p>Solved<br />I download the last version from Arduino IDE<br />The new declaration is "RingBuf&lt;uint8_t, 8&gt; DataBuffer;" instead of "RingBuffer&lt;uint8_t, 8&gt; DataBuffer;"</p>]]></content:encoded>
						                            <category domain="https://www.simhubdash.com/community-2/simhub-support/">Simhub General</category>                        <dc:creator>drv3r</dc:creator>
                        <guid isPermaLink="true">https://www.simhubdash.com/community-2/simhub-support/encountering-ringbuffers-errors-using-custom-serial-device/#post-9197</guid>
                    </item>
				                    <item>
                        <title>Belt tensioner - Encountering RingBuffer errors using FlowSerialRead.h</title>
                        <link>https://www.simhubdash.com/community-2/simhub-support/encountering-ringbuffers-errors-using-custom-serial-device/#post-9164</link>
                        <pubDate>Mon, 01 Jul 2024 11:20:31 +0000</pubDate>
                        <description><![CDATA[Hello,I am trying to control a belt tensioner via an Arduino Due using a custom serial device. My difficulty is &quot;listening&quot; to SimHub data.I have included some SimHub add-ons in my Arduino f...]]></description>
                        <content:encoded><![CDATA[<p>Hello,<br /><br />I am trying to control a belt tensioner via an Arduino Due using a custom serial device. My difficulty is "listening" to SimHub data.<br /><br />I have included some SimHub add-ons in my Arduino folder: ArqSerial.h, FlowSerialRead.h, and RingBuffer.h. I have also made a simple code for debugging :</p>
<pre contenteditable="false">#include "simhub <span style="color: #aaa">removed link</span> "
ARQSerial arqserial;

void setup() {
		Serial.begin(115200);
}


void loop() {
			
	String message = arqserial.ReadStringUntil('\n');
	arqserial.DebugPrintLn("Message received : " + message);

}
</pre>
<p>But I am encountering many errors, especially in the RingBuffer file :</p>
<p>In file included from C:\Users\BST\Downloads\debug_get_data\simhub\ArqSerial.h:6:0,<br />from C:\Users\BST\Downloads\debug_get_data\debug_get_data.ino:1:<br />C:\Users\BST\Downloads\debug_get_data\simhub\RingBuffer.h:51:7: error: 'RingBuffer' is not a template type<br />class RingBuffer<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\RingBuffer.h:93:19: error: expected initializer before '&lt;' token<br />uint8_t RingBuffer&lt;rg_element_t, __maxSize__&gt;::writeIndex()<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\RingBuffer.h:101:1: error: 'RingBuffer' is not a template<br />RingBuffer&lt;rg_element_t, __maxSize__&gt;::RingBuffer() :<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\RingBuffer.h:101:51: error: explicit qualification in declaration of 'RingBuffer RingBuffer()'<br />RingBuffer&lt;rg_element_t, __maxSize__&gt;::RingBuffer() :<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\RingBuffer.h: In function 'RingBuffer RingBuffer()':<br />C:\Users\BST\Downloads\debug_get_data\simhub\RingBuffer.h:102:1: error: only constructors take member initializers<br />mReadIndex(0),<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\RingBuffer.h: At global scope:<br />C:\Users\BST\Downloads\debug_get_data\simhub\RingBuffer.h:108:43: error: expected initializer before '::' token<br />bool RingBuffer&lt;rg_element_t, __maxSize__&gt;::push(const rg_element_t inElement)<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\RingBuffer.h:117:43: error: expected initializer before '::' token<br />bool RingBuffer&lt;rg_element_t, __maxSize__&gt;::push(const rg_element_t* inElements, uint8_t length)<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\RingBuffer.h:126:43: error: expected initializer before '::' token<br />bool RingBuffer&lt;rg_element_t, __maxSize__&gt;::push(const rg_element_t * const inElement)<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\RingBuffer.h:135:43: error: expected initializer before '::' token<br />bool RingBuffer&lt;rg_element_t, __maxSize__&gt;::lockedPush(const rg_element_t inElement)<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\RingBuffer.h:144:43: error: expected initializer before '::' token<br />bool RingBuffer&lt;rg_element_t, __maxSize__&gt;::lockedPush(const rg_element_t * const inElement)<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\RingBuffer.h:153:43: error: expected initializer before '::' token<br />bool RingBuffer&lt;rg_element_t, __maxSize__&gt;::pop(rg_element_t &amp;outElement)<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\RingBuffer.h:164:43: error: expected initializer before '::' token<br />bool RingBuffer&lt;rg_element_t, __maxSize__&gt;::pop()<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\RingBuffer.h:174:43: error: expected initializer before '::' token<br />bool RingBuffer&lt;rg_element_t, __maxSize__&gt;::lockedPop(rg_element_t &amp;outElement)<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\RingBuffer.h:183:52: error: expected initializer before '::' token<br />rg_element_t &amp;RingBuffer&lt;rg_element_t, __maxSize__&gt;::operator[](uint8_t inIndex)<br />^<br />In file included from C:\Users\BST\Downloads\debug_get_data\debug_get_data.ino:1:0:<br />C:\Users\BST\Downloads\debug_get_data\simhub\ArqSerial.h:19:2: error: 'RingBuffer&lt;uint8_t, 32&gt;' does not name a type<br />RingBuffer&lt;uint8_t, 32&gt; DataBuffer;<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\ArqSerial.h: In member function 'void ARQSerial::ProcessIncomingData()':<br />C:\Users\BST\Downloads\debug_get_data\simhub\ArqSerial.h:113:8: error: 'DataBuffer' was not declared in this scope<br />DataBuffer.push(partialdatabuffer);<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\ArqSerial.h: In member function 'int ARQSerial::read()':<br />C:\Users\BST\Downloads\debug_get_data\simhub\ArqSerial.h:174:8: error: 'DataBuffer' was not declared in this scope<br />if (DataBuffer.size() &gt; 0) {<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\ArqSerial.h:181:48: error: 'DataBuffer' was not declared in this scope<br />} while (millis() - fsr_startMillis &lt; 400 || DataBuffer.size() &gt; 0);<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\ArqSerial.h: In member function 'int ARQSerial::Available()':<br />C:\Users\BST\Downloads\debug_get_data\simhub\ArqSerial.h:189:7: error: 'DataBuffer' was not declared in this scope<br />if (DataBuffer.size() == 0) {<br />^<br />C:\Users\BST\Downloads\debug_get_data\simhub\ArqSerial.h:192:10: error: 'DataBuffer' was not declared in this scope<br />return DataBuffer.size();<br />^<br /><br />exit status 1<br /><br />Compilation error: 'RingBuffer' is not a template type</p>
<p>However, addons are vanilla</p>
<p>Thank you for your help</p>]]></content:encoded>
						                            <category domain="https://www.simhubdash.com/community-2/simhub-support/">Simhub General</category>                        <dc:creator>drv3r</dc:creator>
                        <guid isPermaLink="true">https://www.simhubdash.com/community-2/simhub-support/encountering-ringbuffers-errors-using-custom-serial-device/#post-9164</guid>
                    </item>
							        </channel>
        </rss>
		