mirror of
https://github.com/suchmememanyskill/CYD-Klipper.git
synced 2026-03-21 05:33:24 +00:00
Fix serial console printer switching
This commit is contained in:
@@ -317,15 +317,15 @@ void brightness(String argv[])
|
|||||||
void printer(String argv[])
|
void printer(String argv[])
|
||||||
{
|
{
|
||||||
int ndx = argv[1].toInt();
|
int ndx = argv[1].toInt();
|
||||||
if(ndx == -1)
|
if(ndx <= -1)
|
||||||
{
|
{
|
||||||
global_config.multi_printer_mode = false;
|
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;
|
global_config.multi_printer_mode = true;
|
||||||
switch_printer(ndx);
|
set_current_printer(ndx);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user