add launch.json for basic test

This commit is contained in:
Newdigate
2023-01-25 18:36:59 +00:00
parent 397e438f09
commit ef013ba73d
3 changed files with 28 additions and 3 deletions
+22
View File
@@ -0,0 +1,22 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "C++ Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/cmake-build-debug/test/first/basic",
"args": [],
"environment": [{ "name": "config", "value": "Debug" }],
"cwd": "${workspaceFolder}",
"externalConsole" :true,
"osx": {
"MIMode": "lldb"
},
}
]
}
+1 -1
View File
@@ -66,7 +66,7 @@ private:
termios t_saved;
#else
unsigned long _consoleMode;
#endif _MSC_VER
#endif
std::queue<char> input;
};
+5 -2
View File
@@ -4,8 +4,11 @@ int main() {
initialize_mock_arduino();
delay(100);
char s[10] = "123123\0";
Serial.printf("Hello %s", s);
Serial.printf("Hello %s\n", s);
int m = millis();
Serial.printf("Hello %d", m);
Serial.printf("Please type a sentance.... %d\n", m);
String s2 = Serial.readStringUntil('\n');
Serial.printf("Thank you for your response '%s' \n", s2.c_str());
return 0;
}