mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-02-27 19:36:58 +00:00
🩹 Fix misc warnings
This commit is contained in:
parent
2cb252da4a
commit
d193c814d3
6 changed files with 13 additions and 14 deletions
|
@ -97,7 +97,7 @@ void core_hook_sysclock_init() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// sysclk is now configured according to F_CPU (i.e., 200MHz PLL output)
|
// sysclk is now configured according to F_CPU (i.e., 200MHz PLL output)
|
||||||
constexpr uint32_t sysclock = F_CPU;
|
const uint32_t sysclock = F_CPU;
|
||||||
|
|
||||||
// Setup clock divisors for sysclk = 200 MHz
|
// Setup clock divisors for sysclk = 200 MHz
|
||||||
// Note: PCLK1 is used for step+temp timers, and need to be kept at 50 MHz (until there is a better solution)
|
// Note: PCLK1 is used for step+temp timers, and need to be kept at 50 MHz (until there is a better solution)
|
||||||
|
|
|
@ -148,7 +148,7 @@ void PCA9632_set_led_color(const LEDColor &color) {
|
||||||
|
|
||||||
#if ENABLED(PCA9632_BUZZER)
|
#if ENABLED(PCA9632_BUZZER)
|
||||||
|
|
||||||
void PCA9632_buzz(const long, const uint16_t=0) {
|
void PCA9632_buzz(const long, const uint16_t/*=0*/) {
|
||||||
uint8_t data[] = PCA9632_BUZZER_DATA;
|
uint8_t data[] = PCA9632_BUZZER_DATA;
|
||||||
Wire.beginTransmission(I2C_ADDRESS(PCA9632_ADDRESS));
|
Wire.beginTransmission(I2C_ADDRESS(PCA9632_ADDRESS));
|
||||||
Wire.write(data, sizeof(data));
|
Wire.write(data, sizeof(data));
|
||||||
|
|
|
@ -833,8 +833,6 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||||
#if HAS_PRINT_PROGRESS
|
#if HAS_PRINT_PROGRESS
|
||||||
|
|
||||||
#define TPOFFSET (LCD_WIDTH - 1)
|
#define TPOFFSET (LCD_WIDTH - 1)
|
||||||
static uint8_t timepos = TPOFFSET - 6;
|
|
||||||
static char buffer[8];
|
|
||||||
|
|
||||||
#if ENABLED(SHOW_PROGRESS_PERCENT)
|
#if ENABLED(SHOW_PROGRESS_PERCENT)
|
||||||
static lcd_uint_t pc = 0, pr = 2;
|
static lcd_uint_t pc = 0, pr = 2;
|
||||||
|
@ -853,8 +851,9 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||||
#if ENABLED(SHOW_REMAINING_TIME)
|
#if ENABLED(SHOW_REMAINING_TIME)
|
||||||
void MarlinUI::drawRemain() {
|
void MarlinUI::drawRemain() {
|
||||||
if (printJobOngoing()) {
|
if (printJobOngoing()) {
|
||||||
|
char buffer[8];
|
||||||
const duration_t remaint = get_remaining_time();
|
const duration_t remaint = get_remaining_time();
|
||||||
timepos = TPOFFSET - remaint.toDigital(buffer);
|
const uint8_t timepos = TPOFFSET - remaint.toDigital(buffer);
|
||||||
IF_DISABLED(LCD_INFO_SCREEN_STYLE, lcd_put_lchar(timepos - 1, 2, 0x20));
|
IF_DISABLED(LCD_INFO_SCREEN_STYLE, lcd_put_lchar(timepos - 1, 2, 0x20));
|
||||||
lcd_put_lchar(TERN(LCD_INFO_SCREEN_STYLE, 11, timepos), 2, 'R');
|
lcd_put_lchar(TERN(LCD_INFO_SCREEN_STYLE, 11, timepos), 2, 'R');
|
||||||
lcd_put_u8str(buffer);
|
lcd_put_u8str(buffer);
|
||||||
|
@ -866,7 +865,8 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||||
void MarlinUI::drawInter() {
|
void MarlinUI::drawInter() {
|
||||||
const duration_t interactt = interaction_time;
|
const duration_t interactt = interaction_time;
|
||||||
if (printingIsActive() && interactt.value) {
|
if (printingIsActive() && interactt.value) {
|
||||||
timepos = TPOFFSET - interactt.toDigital(buffer);
|
char buffer[8];
|
||||||
|
const uint8_t timepos = TPOFFSET - interactt.toDigital(buffer);
|
||||||
IF_DISABLED(LCD_INFO_SCREEN_STYLE, lcd_put_lchar(timepos - 1, 2, 0x20));
|
IF_DISABLED(LCD_INFO_SCREEN_STYLE, lcd_put_lchar(timepos - 1, 2, 0x20));
|
||||||
lcd_put_lchar(TERN(LCD_INFO_SCREEN_STYLE, 11, timepos), 2, 'C');
|
lcd_put_lchar(TERN(LCD_INFO_SCREEN_STYLE, 11, timepos), 2, 'C');
|
||||||
lcd_put_u8str(buffer);
|
lcd_put_u8str(buffer);
|
||||||
|
@ -877,8 +877,9 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||||
#if ENABLED(SHOW_ELAPSED_TIME)
|
#if ENABLED(SHOW_ELAPSED_TIME)
|
||||||
void MarlinUI::drawElapsed() {
|
void MarlinUI::drawElapsed() {
|
||||||
if (printJobOngoing()) {
|
if (printJobOngoing()) {
|
||||||
|
char buffer[8];
|
||||||
const duration_t elapsedt = print_job_timer.duration();
|
const duration_t elapsedt = print_job_timer.duration();
|
||||||
timepos = TPOFFSET - elapsedt.toDigital(buffer);
|
const uint8_t timepos = TPOFFSET - elapsedt.toDigital(buffer);
|
||||||
IF_DISABLED(LCD_INFO_SCREEN_STYLE, lcd_put_lchar(timepos - 1, 2, 0x20));
|
IF_DISABLED(LCD_INFO_SCREEN_STYLE, lcd_put_lchar(timepos - 1, 2, 0x20));
|
||||||
lcd_put_lchar(TERN(LCD_INFO_SCREEN_STYLE, 11, timepos), 2, 'E');
|
lcd_put_lchar(TERN(LCD_INFO_SCREEN_STYLE, 11, timepos), 2, 'E');
|
||||||
lcd_put_u8str(buffer);
|
lcd_put_u8str(buffer);
|
||||||
|
|
|
@ -601,7 +601,6 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
|
||||||
#if HAS_PRINT_PROGRESS // UNTESTED!!!
|
#if HAS_PRINT_PROGRESS // UNTESTED!!!
|
||||||
|
|
||||||
#define TPOFFSET (LCD_WIDTH - 1)
|
#define TPOFFSET (LCD_WIDTH - 1)
|
||||||
static uint8_t timepos = TPOFFSET - 6;
|
|
||||||
|
|
||||||
#if ENABLED(SHOW_PROGRESS_PERCENT)
|
#if ENABLED(SHOW_PROGRESS_PERCENT)
|
||||||
void MarlinUI::drawPercent() {
|
void MarlinUI::drawPercent() {
|
||||||
|
@ -619,7 +618,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
|
||||||
if (printJobOngoing()) {
|
if (printJobOngoing()) {
|
||||||
const duration_t remaint = ui.get_remaining_time();
|
const duration_t remaint = ui.get_remaining_time();
|
||||||
char buffer[10];
|
char buffer[10];
|
||||||
timepos = TPOFFSET - remaint.toDigital(buffer);
|
const uint8_t timepos = TPOFFSET - remaint.toDigital(buffer);
|
||||||
lcd_moveto(timepos, 1);
|
lcd_moveto(timepos, 1);
|
||||||
lcd.write('R');
|
lcd.write('R');
|
||||||
lcd.print(buffer);
|
lcd.print(buffer);
|
||||||
|
@ -631,7 +630,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
|
||||||
const duration_t interactt = ui.interaction_time;
|
const duration_t interactt = ui.interaction_time;
|
||||||
if (printingIsActive() && interactt.value) {
|
if (printingIsActive() && interactt.value) {
|
||||||
char buffer[10];
|
char buffer[10];
|
||||||
timepos = TPOFFSET - interactt.toDigital(buffer);
|
const uint8_t timepos = TPOFFSET - interactt.toDigital(buffer);
|
||||||
lcd_moveto(timepos, 1);
|
lcd_moveto(timepos, 1);
|
||||||
lcd.write('C');
|
lcd.write('C');
|
||||||
lcd.print(buffer);
|
lcd.print(buffer);
|
||||||
|
@ -643,7 +642,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
|
||||||
if (printJobOngoing()) {
|
if (printJobOngoing()) {
|
||||||
const duration_t elapsedt = print_job_timer.duration();
|
const duration_t elapsedt = print_job_timer.duration();
|
||||||
char buffer[10];
|
char buffer[10];
|
||||||
timepos = TPOFFSET - elapsedt.toDigital(buffer);
|
const uint8_t timepos = TPOFFSET - elapsedt.toDigital(buffer);
|
||||||
lcd_moveto(timepos, 1);
|
lcd_moveto(timepos, 1);
|
||||||
lcd.write('E');
|
lcd.write('E');
|
||||||
lcd.print(buffer);
|
lcd.print(buffer);
|
||||||
|
|
|
@ -804,13 +804,13 @@ void DGUSRxHandler::pidSetTemp(DGUS_VP &vp, void *data_ptr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t temp = BE16_P(data_ptr);
|
celsius_t temp = BE16_P(data_ptr);
|
||||||
|
|
||||||
switch (screen.pid_heater) {
|
switch (screen.pid_heater) {
|
||||||
default: return;
|
default: return;
|
||||||
#if HAS_HEATED_BED
|
#if HAS_HEATED_BED
|
||||||
case DGUS_Data::Heater::BED:
|
case DGUS_Data::Heater::BED:
|
||||||
LIMIT(temp, BED_MINTEMP, BED_MAX_TARGET);
|
LIMIT(temp, celsius_t(BED_MINTEMP), celsius_t(BED_MAX_TARGET));
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#if HAS_HOTEND
|
#if HAS_HOTEND
|
||||||
|
|
|
@ -68,7 +68,6 @@ enum {
|
||||||
|
|
||||||
static void disp_key_value() {
|
static void disp_key_value() {
|
||||||
char *temp;
|
char *temp;
|
||||||
TERN_(HAS_TRINAMIC_CONFIG, float milliamps);
|
|
||||||
|
|
||||||
switch (value) {
|
switch (value) {
|
||||||
default: break;
|
default: break;
|
||||||
|
|
Loading…
Reference in a new issue