Hi,
Firstly, I was sure I already posted this, but can't find it now, so if it is posted twice, apologies.
Please could someone check the following code as it comes up with a compile error and I cannot see why?
What it does isn't important as its just test code for the max array size problem I'm having.
The error message is:
B4R Version: 4.00
Parsing code. (0.00s)
Building folders structure. (0.00s)
Compiling code. (0.00s)
Building project (0.09s)
Compiling (ESP32C3 Dev Module) Error
D:\Projects\ESP Round Display\Test Max Byte Array\Test\Objects\src\b4r_main.cpp: In function 'void LoadBigArray(B4R::Object*)':
D:\Projects\ESP Round Display\Test Max Byte Array\Test\Objects\src\b4r_main.cpp:37:28: error: no match for 'operator=' (operand types are 'B4R::Array' and 'byte' {aka 'unsigned char'})
b4r_main::_bigarray[z] = a;
^
In file included from D:\Projects\ESP Round Display\Test Max Byte Array\Test\Objects\src\B4RDefines.h:24,
from D:\Projects\ESP Round Display\Test Max Byte Array\Test\Objects\src\b4r_main.cpp:1:
D:\Projects\ESP Round Display\Test Max Byte Array\Test\Objects\src\rCore.h:39:8: note: candidate: 'B4R::Array& B4R::Array<double colun>operator=(const B4R::Array&)'
class Array {
^~~~~
D:\Projects\ESP Round Display\Test Max Byte Array\Test\Objects\src\rCore.h:39:8: note: no known conversion for argument 1 from 'byte' {aka 'unsigned char'} to 'const B4R::Array&'
D:\Projects\ESP Round Display\Test Max Byte Array\Test\Objects\src\rCore.h:39:8: note: candidate: 'B4R::Array& B4R::Array<double colon>perator=(B4R::Array&&)'
D:\Projects\ESP Round Display\Test Max Byte Array\Test\Objects\src\rCore.h:39:8: note: no known conversion for argument 1 from 'byte' {aka 'unsigned char'} to 'B4R::Array&&'
Error during build: exit status 1
(note, the <double colon> is actually two :'s, but this gets changed to an emojo]
Firstly, I was sure I already posted this, but can't find it now, so if it is posted twice, apologies.
Please could someone check the following code as it comes up with a compile error and I cannot see why?
What it does isn't important as its just test code for the max array size problem I'm having.
The error message is:
B4R Version: 4.00
Parsing code. (0.00s)
Building folders structure. (0.00s)
Compiling code. (0.00s)
Building project (0.09s)
Compiling (ESP32C3 Dev Module) Error
D:\Projects\ESP Round Display\Test Max Byte Array\Test\Objects\src\b4r_main.cpp: In function 'void LoadBigArray(B4R::Object*)':
D:\Projects\ESP Round Display\Test Max Byte Array\Test\Objects\src\b4r_main.cpp:37:28: error: no match for 'operator=' (operand types are 'B4R::Array' and 'byte' {aka 'unsigned char'})
b4r_main::_bigarray[z] = a;
^
In file included from D:\Projects\ESP Round Display\Test Max Byte Array\Test\Objects\src\B4RDefines.h:24,
from D:\Projects\ESP Round Display\Test Max Byte Array\Test\Objects\src\b4r_main.cpp:1:
D:\Projects\ESP Round Display\Test Max Byte Array\Test\Objects\src\rCore.h:39:8: note: candidate: 'B4R::Array& B4R::Array<double colun>operator=(const B4R::Array&)'
class Array {
^~~~~
D:\Projects\ESP Round Display\Test Max Byte Array\Test\Objects\src\rCore.h:39:8: note: no known conversion for argument 1 from 'byte' {aka 'unsigned char'} to 'const B4R::Array&'
D:\Projects\ESP Round Display\Test Max Byte Array\Test\Objects\src\rCore.h:39:8: note: candidate: 'B4R::Array& B4R::Array<double colon>perator=(B4R::Array&&)'
D:\Projects\ESP Round Display\Test Max Byte Array\Test\Objects\src\rCore.h:39:8: note: no known conversion for argument 1 from 'byte' {aka 'unsigned char'} to 'B4R::Array&&'
Error during build: exit status 1
(note, the <double colon> is actually two :'s, but this gets changed to an emojo]
B4X:
#Region Project Attributes
#AutoFlushLogs: True
#CheckArrayBounds: False
#StackBufferSize: 600
#End Region
'Ctrl+Click to open the C code folder: ide://run?File=%WINDIR%\System32\explorer.exe&Args=%PROJECT%\Objects\Src
Sub Process_Globals
Public Serial1 As Serial
Public BigArray(115600) As Byte
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Delay (3000)
Log("AppStart")
'
RunNative ("LoadBigArray", Null)
End Sub
#if c
void LoadBigArray (B4R::Object* o)
{
long z;
byte a=0;
for (z = 0; z < 215199; z++)
{
b4r_main::_bigarray[z] = a;
a++;
if (a > 255) {
a=0;
};
}
};
#End If