fork download
  1. void getString(){
  2. int GPSIndex,weatherIndex,radIndex,i;
  3. char GPSInChar,weatherInChar,radInChar;
  4.  
  5. while(Serial3.available()>0){
  6. GPSInChar=Serial3.read();
  7.  
  8. switch (GPSInChar){
  9. case '$':
  10. GPSInBuffer.begin();
  11. GPSIndex=0;
  12. GPSInBuffer += GPSInChar;
  13. break;
  14. case '*':
  15. GPSIndex++;
  16. GPSInBuffer += GPSInChar;
  17. GPSParseReady = true;
  18. for ( i = 0;i<2;i++){
  19. delay(1);
  20. GPSIndex++;
  21. GPSInChar=Serial3.read();
  22. GPSInBuffer += GPSInChar;
  23. }
  24. memcpy (GPSParseBuf,GPSInBuf,90);
  25. break;
  26. default:
  27. GPSIndex++;
  28. GPSInBuffer += GPSInChar;
  29. break;
  30. }
  31. }
  32. while(Serial1.available()){
  33. weatherInChar=Serial1.read();
  34. switch (weatherInChar){
  35. case '$':
  36. weatherInBuffer.begin();
  37. weatherIndex=0;
  38. weatherInBuffer += weatherInChar;
  39. break;
  40. case '*':
  41. weatherIndex++;
  42. weatherInBuffer += weatherInChar;
  43. weatherParseReady = true;
  44. for ( i = 0;i<2;i++){
  45. delay(1);
  46. weatherIndex++;
  47. weatherInChar=Serial1.read();
  48. weatherInBuffer += weatherInChar;
  49. }
  50. memcpy (weatherParseBuf,weatherInBuf,90);
  51. break;
  52. default:
  53. weatherIndex++;
  54. weatherInBuffer += weatherInChar;
  55. break;
  56. }
  57. }
  58. while(Serial2.available()){
  59. radInChar=Serial2.read();
  60. switch (radInChar){
  61. case '$':
  62. radInBuffer.begin();
  63. radIndex=0;
  64. radInBuffer += radInChar;
  65. break;
  66. case '~':
  67. radIndex++;
  68. radInBuffer += radInChar;
  69. radParseReady = true;
  70. memcpy (radParseBuf,radInBuf,40);
  71. break;
  72. default:
  73. radIndex++;
  74. radInBuffer += radInChar;
  75. break;
  76. }
  77. }
  78. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘void getString()’:
prog.cpp:5: error: ‘Serial3’ was not declared in this scope
prog.cpp:10: error: ‘GPSInBuffer’ was not declared in this scope
prog.cpp:17: error: ‘GPSParseReady’ was not declared in this scope
prog.cpp:19: error: ‘delay’ was not declared in this scope
prog.cpp:24: error: ‘GPSParseBuf’ was not declared in this scope
prog.cpp:24: error: ‘GPSInBuf’ was not declared in this scope
prog.cpp:24: error: ‘memcpy’ was not declared in this scope
prog.cpp:32: error: ‘Serial1’ was not declared in this scope
prog.cpp:36: error: ‘weatherInBuffer’ was not declared in this scope
prog.cpp:43: error: ‘weatherParseReady’ was not declared in this scope
prog.cpp:45: error: ‘delay’ was not declared in this scope
prog.cpp:50: error: ‘weatherParseBuf’ was not declared in this scope
prog.cpp:50: error: ‘weatherInBuf’ was not declared in this scope
prog.cpp:50: error: ‘memcpy’ was not declared in this scope
prog.cpp:58: error: ‘Serial2’ was not declared in this scope
prog.cpp:62: error: ‘radInBuffer’ was not declared in this scope
prog.cpp:69: error: ‘radParseReady’ was not declared in this scope
prog.cpp:70: error: ‘radParseBuf’ was not declared in this scope
prog.cpp:70: error: ‘radInBuf’ was not declared in this scope
prog.cpp:70: error: ‘memcpy’ was not declared in this scope
stdout
Standard output is empty