Skip to content

Commit

Permalink
Fix serial console printer switching
Browse files Browse the repository at this point in the history
  • Loading branch information
suchmememanyskill committed Oct 27, 2024
1 parent 1516b78 commit 69d98a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CYD-Klipper/src/ui/serial/serial_commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,15 @@ void brightness(String argv[])
void printer(String argv[])
{
int ndx = argv[1].toInt();
if(ndx == -1)
if(ndx <= -1)
{
global_config.multi_printer_mode = false;
switch_printer(0);
set_current_printer(0);
}
else if( ndx >=0 && ndx < PRINTER_CONFIG_COUNT)
else if( ndx >= 0 && ndx < get_printer_count())
{
global_config.multi_printer_mode = true;
switch_printer(ndx);
set_current_printer(ndx);
}
else
{
Expand Down

0 comments on commit 69d98a9

Please sign in to comment.