Mercurial > hg > beaglert
comparison core/WriteFile.cpp @ 301:e4392164b458 prerelease
RENAMED BeagleRT to Bela AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA, scripts probably not working
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Fri, 27 May 2016 14:34:41 +0100 |
parents | 1e7db6610600 |
children | a4e49a3d9948 |
comparison
equal
deleted
inserted
replaced
300:dbeed520b014 | 301:e4392164b458 |
---|---|
18 if(staticConstructed==true) | 18 if(staticConstructed==true) |
19 return; | 19 return; |
20 staticConstructed=true; | 20 staticConstructed=true; |
21 threadIsExiting=false; | 21 threadIsExiting=false; |
22 threadRunning=false; | 22 threadRunning=false; |
23 writeAllFilesTask = BeagleRT_createAuxiliaryTask(WriteFile::run, 60, "writeAllFilesTask"); | 23 writeAllFilesTask = Bela_createAuxiliaryTask(WriteFile::run, 60, "writeAllFilesTask"); |
24 } | 24 } |
25 | 25 |
26 WriteFile::WriteFile(){ | 26 WriteFile::WriteFile(){ |
27 buffer = NULL; | 27 buffer = NULL; |
28 format = NULL; | 28 format = NULL; |
43 sleepTimeMs = 1; | 43 sleepTimeMs = 1; |
44 stringBufferLength = 1000; | 44 stringBufferLength = 1000; |
45 stringBuffer = (char*)malloc(sizeof(char) * (stringBufferLength)); | 45 stringBuffer = (char*)malloc(sizeof(char) * (stringBufferLength)); |
46 setHeader("variable=[\n"); | 46 setHeader("variable=[\n"); |
47 setFooter("];\n"); | 47 setFooter("];\n"); |
48 staticConstructor(); //TODO: this line should be in the constructor, but cannot be because of a bug in BeagleRT | 48 staticConstructor(); //TODO: this line should be in the constructor, but cannot be because of a bug in Bela |
49 objAddrs.push_back(this); | 49 objAddrs.push_back(this); |
50 echoedLines = 0; | 50 echoedLines = 0; |
51 echoPeriod = 1; | 51 echoPeriod = 1; |
52 } | 52 } |
53 | 53 |
168 int WriteFile::getNumInstances(){ | 168 int WriteFile::getNumInstances(){ |
169 return objAddrs.size(); | 169 return objAddrs.size(); |
170 } | 170 } |
171 | 171 |
172 void WriteFile::startThread(){ | 172 void WriteFile::startThread(){ |
173 BeagleRT_scheduleAuxiliaryTask(writeAllFilesTask); | 173 Bela_scheduleAuxiliaryTask(writeAllFilesTask); |
174 } | 174 } |
175 | 175 |
176 void WriteFile::stopThread(){ | 176 void WriteFile::stopThread(){ |
177 threadIsExiting=true; | 177 threadIsExiting=true; |
178 } | 178 } |