mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-29 23:07:42 +00:00
🩹 Fix some minor issues
This commit is contained in:
parent
c484228c56
commit
bd6eb83250
@ -175,7 +175,7 @@ uint8_t MarlinHAL::get_reset_source() { return rtc_get_reset_reason(1); }
|
||||
|
||||
void MarlinHAL::reboot() { ESP.restart(); }
|
||||
|
||||
void _delay_ms(int delay_ms) { delay(delay_ms); }
|
||||
void _delay_ms(const int ms) { delay(ms); }
|
||||
|
||||
// return free memory between end of heap (or end bss) and whatever is current
|
||||
int MarlinHAL::freeMemory() { return ESP.getFreeHeap(); }
|
||||
|
@ -47,27 +47,27 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define GET_TEMP_0_ADC() TERN(HAS_TEMP_ADC_0, PIN_TO_ADC(TEMP_0_PIN), -1)
|
||||
#define GET_TEMP_1_ADC() TERN(HAS_TEMP_ADC_1, PIN_TO_ADC(TEMP_1_PIN), -1)
|
||||
#define GET_TEMP_2_ADC() TERN(HAS_TEMP_ADC_2, PIN_TO_ADC(TEMP_2_PIN), -1)
|
||||
#define GET_TEMP_3_ADC() TERN(HAS_TEMP_ADC_3, PIN_TO_ADC(TEMP_3_PIN), -1)
|
||||
#define GET_TEMP_4_ADC() TERN(HAS_TEMP_ADC_4, PIN_TO_ADC(TEMP_4_PIN), -1)
|
||||
#define GET_TEMP_5_ADC() TERN(HAS_TEMP_ADC_5, PIN_TO_ADC(TEMP_5_PIN), -1)
|
||||
#define GET_TEMP_6_ADC() TERN(HAS_TEMP_ADC_6, PIN_TO_ADC(TEMP_6_PIN), -1)
|
||||
#define GET_TEMP_7_ADC() TERN(HAS_TEMP_ADC_7, PIN_TO_ADC(TEMP_7_PIN), -1)
|
||||
#define GET_BED_ADC() TERN(HAS_TEMP_ADC_BED, PIN_TO_ADC(TEMP_BED_PIN), -1)
|
||||
#define GET_CHAMBER_ADC() TERN(HAS_TEMP_ADC_CHAMBER, PIN_TO_ADC(TEMP_CHAMBER_PIN), -1)
|
||||
#define GET_PROBE_ADC() TERN(HAS_TEMP_ADC_PROBE, PIN_TO_ADC(TEMP_PROBE_PIN), -1)
|
||||
#define GET_COOLER_ADC() TERN(HAS_TEMP_ADC_COOLER, PIN_TO_ADC(TEMP_COOLER_PIN), -1)
|
||||
#define GET_BOARD_ADC() TERN(HAS_TEMP_ADC_BOARD, PIN_TO_ADC(TEMP_BOARD_PIN), -1)
|
||||
#define GET_SOC_ADC() TERN(HAS_TEMP_ADC_SOC, PIN_TO_ADC(TEMP_SOC_PIN), -1)
|
||||
#define GET_FILAMENT_WIDTH_ADC() TERN(FILAMENT_WIDTH_SENSOR, PIN_TO_ADC(FILWIDTH_PIN), -1)
|
||||
#define GET_BUTTONS_ADC() TERN(HAS_ADC_BUTTONS, PIN_TO_ADC(ADC_KEYPAD_PIN), -1)
|
||||
#define GET_JOY_ADC_X() TERN(HAS_JOY_ADC_X, PIN_TO_ADC(JOY_X_PIN), -1)
|
||||
#define GET_JOY_ADC_Y() TERN(HAS_JOY_ADC_Y, PIN_TO_ADC(JOY_Y_PIN), -1)
|
||||
#define GET_JOY_ADC_Z() TERN(HAS_JOY_ADC_Z, PIN_TO_ADC(JOY_Z_PIN), -1)
|
||||
#define GET_POWERMON_ADC_CURRENT() TERN(POWER_MONITOR_CURRENT, PIN_TO_ADC(POWER_MONITOR_CURRENT_PIN), -1)
|
||||
#define GET_POWERMON_ADC_VOLTS() TERN(POWER_MONITOR_VOLTAGE, PIN_TO_ADC(POWER_MONITOR_VOLTAGE_PIN), -1)
|
||||
#define GET_TEMP_0_ADC() TERN(HAS_TEMP_ADC_0, PIN_TO_ADC(TEMP_0_PIN), -1)
|
||||
#define GET_TEMP_1_ADC() TERN(HAS_TEMP_ADC_1, PIN_TO_ADC(TEMP_1_PIN), -1)
|
||||
#define GET_TEMP_2_ADC() TERN(HAS_TEMP_ADC_2, PIN_TO_ADC(TEMP_2_PIN), -1)
|
||||
#define GET_TEMP_3_ADC() TERN(HAS_TEMP_ADC_3, PIN_TO_ADC(TEMP_3_PIN), -1)
|
||||
#define GET_TEMP_4_ADC() TERN(HAS_TEMP_ADC_4, PIN_TO_ADC(TEMP_4_PIN), -1)
|
||||
#define GET_TEMP_5_ADC() TERN(HAS_TEMP_ADC_5, PIN_TO_ADC(TEMP_5_PIN), -1)
|
||||
#define GET_TEMP_6_ADC() TERN(HAS_TEMP_ADC_6, PIN_TO_ADC(TEMP_6_PIN), -1)
|
||||
#define GET_TEMP_7_ADC() TERN(HAS_TEMP_ADC_7, PIN_TO_ADC(TEMP_7_PIN), -1)
|
||||
#define GET_BED_ADC() TERN(HAS_TEMP_ADC_BED, PIN_TO_ADC(TEMP_BED_PIN), -1)
|
||||
#define GET_CHAMBER_ADC() TERN(HAS_TEMP_ADC_CHAMBER, PIN_TO_ADC(TEMP_CHAMBER_PIN), -1)
|
||||
#define GET_PROBE_ADC() TERN(HAS_TEMP_ADC_PROBE, PIN_TO_ADC(TEMP_PROBE_PIN), -1)
|
||||
#define GET_COOLER_ADC() TERN(HAS_TEMP_ADC_COOLER, PIN_TO_ADC(TEMP_COOLER_PIN), -1)
|
||||
#define GET_BOARD_ADC() TERN(HAS_TEMP_ADC_BOARD, PIN_TO_ADC(TEMP_BOARD_PIN), -1)
|
||||
#define GET_SOC_ADC() TERN(HAS_TEMP_ADC_BOARD, PIN_TO_ADC(TEMP_BOARD_PIN), -1)
|
||||
#define GET_FILAMENT_WIDTH_ADC() TERN(FILAMENT_WIDTH_SENSOR, PIN_TO_ADC(FILWIDTH_PIN), -1)
|
||||
#define GET_BUTTONS_ADC() TERN(HAS_ADC_BUTTONS, PIN_TO_ADC(ADC_KEYPAD_PIN), -1)
|
||||
#define GET_JOY_ADC_X() TERN(HAS_JOY_ADC_X, PIN_TO_ADC(JOY_X_PIN), -1)
|
||||
#define GET_JOY_ADC_Y() TERN(HAS_JOY_ADC_Y, PIN_TO_ADC(JOY_Y_PIN), -1)
|
||||
#define GET_JOY_ADC_Z() TERN(HAS_JOY_ADC_Z, PIN_TO_ADC(JOY_Z_PIN), -1)
|
||||
#define GET_POWERMON_ADC_CURRENT() TERN(POWER_MONITOR_CURRENT, PIN_TO_ADC(POWER_MONITOR_CURRENT_PIN), -1)
|
||||
#define GET_POWERMON_ADC_VOLTS() TERN(POWER_MONITOR_VOLTAGE, PIN_TO_ADC(POWER_MONITOR_VOLTAGE_PIN), -1)
|
||||
|
||||
#define IS_ADC_REQUIRED(n) ( \
|
||||
GET_TEMP_0_ADC() == n || GET_TEMP_1_ADC() == n || GET_TEMP_2_ADC() == n || GET_TEMP_3_ADC() == n \
|
||||
@ -162,10 +162,10 @@ enum ADCIndex {
|
||||
POWERMON_CURRENT,
|
||||
#endif
|
||||
#if GET_POWERMON_ADC_VOLTS() == 0
|
||||
POWERMON_VOLTS,
|
||||
POWERMON_VOLTAGE,
|
||||
#endif
|
||||
|
||||
// Use later indexes for ADC index 1
|
||||
// Indexes for ADC1 after those for ADC0
|
||||
|
||||
#if GET_TEMP_0_ADC() == 1
|
||||
TEMP_0,
|
||||
@ -228,9 +228,8 @@ enum ADCIndex {
|
||||
POWERMON_CURRENT,
|
||||
#endif
|
||||
#if GET_POWERMON_ADC_VOLTS() == 1
|
||||
POWERMON_VOLTS,
|
||||
POWERMON_VOLTAGE,
|
||||
#endif
|
||||
|
||||
ADC_COUNT
|
||||
};
|
||||
|
||||
@ -351,10 +350,10 @@ enum ADCIndex {
|
||||
POWER_MONITOR_CURRENT_PIN,
|
||||
#endif
|
||||
#if GET_POWERMON_ADC_VOLTS() == 0
|
||||
POWER_MONITOR_VOLTS_PIN,
|
||||
POWER_MONITOR_VOLTAGE_PIN,
|
||||
#endif
|
||||
|
||||
// ADC1 pins
|
||||
// Pins for ADC1 after ADC0
|
||||
|
||||
#if GET_TEMP_0_ADC() == 1
|
||||
TEMP_0_PIN,
|
||||
@ -417,7 +416,7 @@ enum ADCIndex {
|
||||
POWER_MONITOR_CURRENT_PIN,
|
||||
#endif
|
||||
#if GET_POWERMON_ADC_VOLTS() == 1
|
||||
POWER_MONITOR_VOLTS_PIN,
|
||||
POWER_MONITOR_VOLTAGE_PIN,
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -488,7 +487,7 @@ enum ADCIndex {
|
||||
{ PIN_TO_INPUTCTRL(POWER_MONITOR_CURRENT_PIN) },
|
||||
#endif
|
||||
#if GET_POWERMON_ADC_VOLTS() == 0
|
||||
{ PIN_TO_INPUTCTRL(POWER_MONITOR_VOLTS_PIN) },
|
||||
{ PIN_TO_INPUTCTRL(POWER_MONITOR_VOLTAGE_PIN) },
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -560,7 +559,7 @@ enum ADCIndex {
|
||||
{ PIN_TO_INPUTCTRL(POWER_MONITOR_CURRENT_PIN) },
|
||||
#endif
|
||||
#if GET_POWERMON_ADC_VOLTS() == 1
|
||||
{ PIN_TO_INPUTCTRL(POWER_MONITOR_VOLTS_PIN) },
|
||||
{ PIN_TO_INPUTCTRL(POWER_MONITOR_VOLTAGE_PIN) },
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -313,7 +313,7 @@ enum ADCIndex : uint8_t {
|
||||
OPTITEM(HAS_JOY_ADC_Y, JOY_Y)
|
||||
OPTITEM(HAS_JOY_ADC_Z, JOY_Z)
|
||||
OPTITEM(POWER_MONITOR_CURRENT, POWERMON_CURRENT)
|
||||
OPTITEM(POWER_MONITOR_VOLTAGE, POWERMON_VOLTS)
|
||||
OPTITEM(POWER_MONITOR_VOLTAGE, POWERMON_VOLTAGE)
|
||||
ADC_COUNT
|
||||
};
|
||||
|
||||
@ -381,7 +381,7 @@ void MarlinHAL::adc_start(const pin_t pin) {
|
||||
_TCASE(FILAMENT_WIDTH_SENSOR, FILWIDTH_PIN, FILWIDTH)
|
||||
_TCASE(HAS_ADC_BUTTONS, ADC_KEYPAD_PIN, ADC_KEY)
|
||||
_TCASE(POWER_MONITOR_CURRENT, POWER_MONITOR_CURRENT_PIN, POWERMON_CURRENT)
|
||||
_TCASE(POWER_MONITOR_VOLTAGE, POWER_MONITOR_VOLTAGE_PIN, POWERMON_VOLTS)
|
||||
_TCASE(POWER_MONITOR_VOLTAGE, POWER_MONITOR_VOLTAGE_PIN, POWERMON_VOLTAGE)
|
||||
}
|
||||
adc_result = (adc_results[(int)pin_index] & 0xFFF) >> (12 - HAL_ADC_RESOLUTION); // shift out unused bits
|
||||
}
|
||||
|
@ -221,8 +221,6 @@ void flashFirmware(const int16_t);
|
||||
// Memory related
|
||||
#define __bss_end __bss_end__
|
||||
|
||||
void _delay_ms(const int ms);
|
||||
|
||||
extern "C" char* _sbrk(int incr);
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
|
@ -5,9 +5,6 @@
|
||||
* Copyright (c) 2019 BigTreeTech [https://github.com/bigtreetech]
|
||||
* Copyright (C) 2015, ChaN, all right reserved.
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This software is a free software and there is NO WARRANTY.
|
||||
* No restriction on use. You can use, modify and redistribute it for
|
||||
* personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY.
|
||||
|
@ -1256,7 +1256,7 @@
|
||||
* currently HAL.h must be included ahead of pins.h.
|
||||
*/
|
||||
#if LCD_IS_SERIAL_HOST && !defined(LCD_SERIAL_PORT)
|
||||
#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0, BTT_SKR_E3_TURBO, BTT_OCTOPUS_V1_1, AQUILA_V101)
|
||||
#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0, BTT_SKR_MINI_E3_V3_0_1, BTT_SKR_E3_TURBO, BTT_OCTOPUS_V1_1, AQUILA_V101)
|
||||
#define LCD_SERIAL_PORT 1
|
||||
#elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_F401RE, CREALITY_V423, MKS_ROBIN, PANOWIN_CUTLASS, KODAMA_BARDO)
|
||||
#define LCD_SERIAL_PORT 2
|
||||
|
@ -707,7 +707,7 @@
|
||||
/**
|
||||
* Maple environment
|
||||
*/
|
||||
#ifdef __STM32F1__
|
||||
#if defined(__STM32F1__) && DISABLED(NO_MAPLE_WARNING)
|
||||
#warning "Maple build environments are deprecated. Please use a non-Maple build environment. Report issues to the Marlin Firmware project."
|
||||
#endif
|
||||
|
||||
|
@ -45,7 +45,7 @@ typedef enum {
|
||||
ENCODER_DIFF_ENTER = 3 // click
|
||||
} EncoderState;
|
||||
|
||||
#define ENCODER_WAIT_MS 20
|
||||
#define ENCODER_WAIT_MS TERN(DWIN_LCD_PROUI, 10, 20)
|
||||
|
||||
// Encoder initialization
|
||||
void encoderConfiguration();
|
||||
|
@ -127,7 +127,7 @@ void dwinWriteToMem(uint8_t mem, uint16_t addr, uint16_t length, uint8_t *data)
|
||||
dwinWord(i, addr + indx); // start address of the data block
|
||||
++i;
|
||||
for (uint8_t j = 0; j < i; ++j) { LCD_SERIAL.write(dwinSendBuf[j]); delayMicroseconds(1); } // Buf header
|
||||
for (uint16_t j = indx; j <= indx + to_send - 1; j++) LCD_SERIAL.write(*(data + j)); delayMicroseconds(1); // write block of data
|
||||
for (uint16_t j = indx; j <= indx + to_send - 1; j++) { LCD_SERIAL.write(*(data + j)); delayMicroseconds(1); } // write block of data
|
||||
for (uint8_t j = 0; j < 4; ++j) { LCD_SERIAL.write(dwinBufTail[j]); delayMicroseconds(1); }
|
||||
block++;
|
||||
pending -= to_send;
|
||||
|
@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* lcd/extui/dgus_e3s1pro/dgus_e3s1pro_extui.cpp
|
||||
* lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp
|
||||
*/
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
@ -138,7 +138,7 @@
|
||||
//
|
||||
void _lcd_level_bed_moving() {
|
||||
if (ui.should_draw()) {
|
||||
MString<9> msg;
|
||||
MString<10> msg;
|
||||
msg.setf(F(" %i / %u"), int(manual_probe_index + 1), total_probe_points);
|
||||
MenuItem_static::draw(LCD_HEIGHT / 2, GET_TEXT_F(MSG_LEVEL_BED_NEXT_POINT), SS_CENTER, msg);
|
||||
}
|
||||
|
@ -135,7 +135,7 @@
|
||||
|
||||
#define FAN0_PIN PB14 // FAN
|
||||
#define FAN1_PIN PB12 // FAN
|
||||
#define FAN_SOFT_PWM
|
||||
#define FAN_SOFT_PWM_REQUIRED
|
||||
|
||||
//
|
||||
// SD Card
|
||||
|
@ -157,7 +157,7 @@
|
||||
#define FAN2_PIN PG9 // FAN2
|
||||
#define FAN3_PIN PF10 // FAN3
|
||||
#define CONTROLLER_FAN_PIN PD7 // BOARD FAN
|
||||
#define FAN_SOFT_PWM
|
||||
#define FAN_SOFT_PWM_REQUIRED
|
||||
|
||||
//
|
||||
// Laser / Spindle
|
||||
|
@ -30,6 +30,7 @@
|
||||
"ensure_newline_at_eof_on_save": true,
|
||||
"tab_size": 2,
|
||||
"translate_tabs_to_spaces": true,
|
||||
"trim_trailing_white_space_on_save": true
|
||||
"trim_trailing_white_space_on_save": true,
|
||||
"uncrustify_config" : "${project_dir}/../extras/uncrustify.cfg"
|
||||
}
|
||||
}
|
||||
|
@ -399,8 +399,6 @@ build_flags = ${STM32F1_maple.build_flags} -DTEMP_TIMER_CHAN=4
|
||||
board_build.address = 0x08007000
|
||||
board_build.ldscript = sovol.ld
|
||||
board_build.rename = firmware-{date}-{time}.bin
|
||||
extra_scripts = ${STM32F1_maple.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/custom_board.py
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user