I use the following Arduino extension for VS Code:
https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-arduino
Before I updated, I used to have the following code which compiled without problems:
void toggleLedsOnSuspendResume(kaleidoscope::plugin::HostPowerManagement::Event event) {
switch (event) {
case kaleidoscope::plugin::HostPowerManagement::Suspend:
LEDControl.set_all_leds_to({0, 0, 0});
LEDControl.syncLeds();
LEDControl.paused = true;
break;
case kaleidoscope::plugin::HostPowerManagement::Resume:
LEDControl.paused = false;
LEDControl.refreshAll();
break;
case kaleidoscope::plugin::HostPowerManagement::Sleep:
break;
}
}
However, after using the new API below, I keep getting the compile error [Error] Exit with code=1
in Visual Studio Code:
void toggleLedsOnSuspendResume(kaleidoscope::plugin::HostPowerManagement::Event event) {
switch (event) {
case kaleidoscope::plugin::HostPowerManagement::Suspend:
LEDControl.disable();
break;
case kaleidoscope::plugin::HostPowerManagement::Resume:
LEDControl.enable();
break;
case kaleidoscope::plugin::HostPowerManagement::Sleep:
break;
}
}
I cloned the GitHub Kaleidoscope source files to the following folder:
C:/repos/Model01-Firmware/Kaleidoscope/
And then added them to the include paths in VS Code in the c_cpp_properties.json.
But I think it’s still using the older version of Kaleidoscope.
So then I tried to delete the Kaleidoscope source folder which I think gets used during compilation located at:
C:\Users\Jorge\AppData\Local\Arduino15\packages\keyboardio\hardware\avr\1.96.0\libraries\Kaleidoscope
And then I tried copying the newer Kaleidoscope folder I cloned from GitHub to the folder above to replace the deleted folder. However, I still got the same compilation error.
Any ideas on how to setup VS Code with the latest version of Kaleidoscope on GitHub?