Skip to content

Commit

Permalink
Fix GCode prefix formatting in EmscriptenCommunication
Browse files Browse the repository at this point in the history
Ensure the prefix argument is correctly formatted as a string in JavaScript function calls. This change prevents potential issues with GCode prefix handling in the communication module as it starts with ';'

NP-327
  • Loading branch information
saumyaj3 committed Aug 22, 2024
1 parent d5afe4f commit 38c59c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/communication/EmscriptenCommunication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ EmscriptenCommunication::EmscriptenCommunication(const std::vector<std::string>&

void EmscriptenCommunication::sendGCodePrefix(const std::string& prefix) const
{
emscripten_run_script(fmt::format("globalThis[\"{}\"]({})", gcode_prefix_handler_, prefix).c_str());
emscripten_run_script(fmt::format("globalThis[\"{}\"](\"{}\")", gcode_prefix_handler_, prefix).c_str());
}

void EmscriptenCommunication::sendProgress(double progress) const
Expand Down

0 comments on commit 38c59c3

Please sign in to comment.