Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sovol SV06 Plus fixes #27531

Open
wants to merge 2 commits into
base: bugfix-2.1.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Marlin/src/lcd/sovol_rts/sovol_rts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ RTS rts;
#include "../../feature/tmc_util.h"
#include "../../gcode/queue.h"
#include "../../gcode/gcode.h"
//#include "../marlinui.h"
#include "../marlinui.h"
//#include "../utf8.h"
#include "../../libs/BL24CXX.h"

Expand Down Expand Up @@ -118,7 +118,7 @@ char commandbuf[30];

static SovolPage change_page_number = ID_Startup;

uint16_t remain_time = 0;
uint32_t remain_time = 0;

static bool last_card_insert_st;
bool card_insert_st;
Expand Down Expand Up @@ -1365,7 +1365,7 @@ void RTS::handleData() {
#if HAS_FILAMENT_SENSOR
case FilamentChange: // Automatic material
switch (recdat.data[0]) {
case 1: if (runout.filament_ran_out) break;
case 1: if (READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_STATE) break;
case 2:
updateTempE0();
wait_for_heatup = wait_for_user = false;
Expand Down Expand Up @@ -1530,7 +1530,7 @@ void RTS::handleData() {

updateFan0();

job_percent = card.percentDone() + 1;
job_percent = ui.get_progress_percent();
if (job_percent <= 100) sendData(uint8_t(job_percent), PRINT_PROCESS_ICON_VP);

sendData(uint8_t(card.percentDone()), PRINT_PROCESS_VP);
Expand Down Expand Up @@ -1626,13 +1626,13 @@ void RTS::onIdle() {

if (card.isPrinting() && (last_cardpercentValue != card.percentDone())) {
if (card.percentDone() > 0) {
job_percent = card.percentDone();
job_percent = ui.get_progress_percent();
if (job_percent <= 100) sendData(uint8_t(job_percent), PRINT_PROCESS_ICON_VP);
// Estimate remaining time every 20 seconds
static millis_t next_remain_time_update = 0;
if (ELAPSED(ms, next_remain_time_update)) {
if (thermalManager.degHotend(0) >= thermalManager.degTargetHotend(0) - 5) {
remain_time = elapsed.value / (job_percent * 0.01f) - elapsed.value;
remain_time = ui.get_remaining_time();
next_remain_time_update += 20 * 1000UL;
sendData(remain_time / 3600, PRINT_SURPLUS_TIME_HOUR_VP);
sendData((remain_time % 3600) / 60, PRINT_SURPLUS_TIME_MIN_VP);
Expand Down