Skip to content

Commit

Permalink
changes, fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
classicrocker883 committed Apr 1, 2024
1 parent 015bfcb commit c273079
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 23 deletions.
10 changes: 4 additions & 6 deletions Marlin/src/feature/pause.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ enum PauseMessage : char {
};

#if M600_PURGE_MORE_RESUMABLE
/**
* Input methods can Purge More, Resume, or request input
*/
// Input methods can Purge More, Resume, or request input
enum PauseMenuResponse : char {
PAUSE_RESPONSE_WAIT_FOR,
PAUSE_RESPONSE_EXTRUDE_MORE,
Expand Down Expand Up @@ -109,7 +107,7 @@ void wait_for_confirmation(
void resume_print(
const_float_t slow_load_length=0, // (mm) Slow Load Length for finishing move
const_float_t fast_load_length=0, // (mm) Fast Load Length for initial move
const_float_t extrude_length=ADVANCED_PAUSE_PURGE_LENGTH, // (mm) Purge length
const_float_t purge_length=ADVANCED_PAUSE_PURGE_LENGTH, // (mm) Purge length
const int8_t max_beep_count=0, // Beep alert for attention
const celsius_t targetTemp=0 // (°C) A target temperature for the hotend
DXC_PARAMS // Dual-X-Carriage extruder index
Expand All @@ -118,7 +116,7 @@ void resume_print(
bool load_filament(
const_float_t slow_load_length=0, // (mm) Slow Load Length for finishing move
const_float_t fast_load_length=0, // (mm) Fast Load Length for initial move
const_float_t extrude_length=0, // (mm) Purge length
const_float_t purge_length=0, // (mm) Purge length
const int8_t max_beep_count=0, // Beep alert for attention
const bool show_lcd=false, // Set LCD status messages?
const bool pause_for_user=false, // Pause for user before returning?
Expand All @@ -139,4 +137,4 @@ bool unload_filament(

constexpr uint8_t did_pause_print = 0;

#endif // !ADVANCED_PAUSE_FEATURE
#endif // ADVANCED_PAUSE_FEATURE
14 changes: 7 additions & 7 deletions Marlin/src/lcd/e3v2/common/encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ EncoderState encoderReceiveAnalyze() {
#if PIN_EXISTS(LCD_LED)

// Take the low 24 valid bits 24Bit: G7 G6 G5 G4 G3 G2 G1 G0 R7 R6 R5 R4 R3 R2 R1 R0 B7 B6 B5 B4 B3 B2 B1 B0
uint16_t LED_DataArray[LED_NUM];
uint32_t LED_DataArray[LED_NUM];

// LED light operation
void LED_Action() {
Expand Down Expand Up @@ -212,9 +212,9 @@ EncoderState encoderReceiveAnalyze() {
for (uint8_t i = 0; i < LED_NUM; i++) {
LED_DataArray[i] = 0;
switch (RGB_Scale) {
case RGB_SCALE_R10_G7_B5: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 7/10) << 16 | luminance * 5/10; break;
case RGB_SCALE_R10_G7_B4: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 7/10) << 16 | luminance * 4/10; break;
case RGB_SCALE_R10_G8_B7: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 8/10) << 16 | luminance * 7/10; break;
case RGB_SCALE_R10_G7_B5: LED_DataArray[i] = uint32_t(luminance * 10/10) << 8 | uint32_t(luminance * 7/10) << 16 | uint8_t(luminance * 5/10); break;
case RGB_SCALE_R10_G7_B4: LED_DataArray[i] = uint32_t(luminance * 10/10) << 8 | uint32_t(luminance * 7/10) << 16 | uint8_t(luminance * 4/10); break;
case RGB_SCALE_R10_G8_B7: LED_DataArray[i] = uint32_t(luminance * 10/10) << 8 | uint32_t(luminance * 8/10) << 16 | uint8_t(luminance * 7/10); break;
}
}
LED_WriteData();
Expand All @@ -229,13 +229,13 @@ EncoderState encoderReceiveAnalyze() {
for (uint8_t i = 0; i < LED_NUM; i++) {
switch (RGB_Scale) {
case RGB_SCALE_R10_G7_B5:
led_data[i] = { luminance * 7/10, luminance * 10/10, luminance * 5/10 };
led_data[i] = { uint8_t(luminance * 7/10), uint8_t(luminance * 10/10), uint8_t(luminance * 5/10) };
break;
case RGB_SCALE_R10_G7_B4:
led_data[i] = { luminance * 7/10, luminance * 10/10, luminance * 4/10 };
led_data[i] = { uint8_t(luminance * 7/10), uint8_t(luminance * 10/10), uint8_t(luminance * 4/10) };
break;
case RGB_SCALE_R10_G8_B7:
led_data[i] = { luminance * 8/10, luminance * 10/10, luminance * 7/10 };
led_data[i] = { uint8_t(luminance * 8/10), uint8_t(luminance * 10/10), uint8_t(luminance * 7/10) };
break;
}
}
Expand Down
12 changes: 3 additions & 9 deletions Marlin/src/lcd/extui/ui_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,9 @@ namespace ExtUI {
enum extruder_t : uint8_t { E0, E1, E2, E3, E4, E5, E6, E7 };
enum heater_t : uint8_t { H0, H1, H2, H3, H4, H5, BED, CHAMBER, COOLER };
enum fan_t : uint8_t { FAN0, FAN1, FAN2, FAN3, FAN4, FAN5, FAN6, FAN7 };
enum result_t : uint8_t {
OPTITEM(HAS_PID_HEATING, PID_STARTED)
OPTITEM(HAS_PID_HEATING, PID_BED_STARTED)
OPTITEM(HAS_PID_HEATING, PID_BAD_HEATER_ID)
OPTITEM(HAS_PID_HEATING, PID_TEMP_TOO_HIGH)
OPTITEM(HAS_PID_HEATING, PID_TUNING_TIMEOUT)
OPTITEM(HAS_PID_HEATING, PID_DONE)
};

#if HAS_PID_HEATING
enum result_t : uint8_t { PID_STARTED, PID_BED_STARTED, PID_BAD_HEATER_ID, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, PID_DONE };
#endif
constexpr uint8_t extruderCount = EXTRUDERS;
constexpr uint8_t hotendCount = HOTENDS;
constexpr uint8_t fanCount = FAN_COUNT;
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/marlinui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,7 @@ void MarlinUI::host_notify(const char * const cstr) {
card.abortFilePrintSoon();
else if (card.isMounted())
card.closefile();
#endif
#endif
#ifdef ACTION_ON_CANCEL
hostui.cancel();
#endif
Expand Down

0 comments on commit c273079

Please sign in to comment.