113
edits
Cesardaher (talk | contribs) |
Cesardaher (talk | contribs) |
||
Line 208: | Line 208: | ||
</pre> | </pre> | ||
To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up | To deal with the duplicate tweets, in this version I also changed the code in a way that each tweet collected is reassigned as another variable right before the next search. That way, if the new tweets are equal to the previous ones, the lit up LED is not changed. | ||
<pre> | <pre> | ||
Line 220: | Line 220: | ||
columnIndex(findDirHor(search_msg.c_str())); | columnIndex(findDirHor(search_msg.c_str())); | ||
} | } | ||
</pre> | |||
This version is almost perfect in terms of what I expected to achieve. The only problem found is that certain tweets containing the directional words would not cause the LED to change. | |||
<pre> | |||
//previous | |||
else if (check.indexOf("right") != std::string::npos) { | |||
//new | |||
else if (check.toLowerCase().indexOf("right") != std::string::npos) { | |||
</pre> | </pre> |
edits