1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-30 07:17:59 +00:00

🩹 Fix misc warnings

This commit is contained in:
Scott Lahteine 2024-08-24 23:59:04 -05:00
parent 2cb252da4a
commit d193c814d3
6 changed files with 13 additions and 14 deletions

View File

@ -97,7 +97,7 @@ void core_hook_sysclock_init() {
#endif
// 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
// Note: PCLK1 is used for step+temp timers, and need to be kept at 50 MHz (until there is a better solution)

View File

@ -148,7 +148,7 @@ void PCA9632_set_led_color(const LEDColor &color) {
#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;
Wire.beginTransmission(I2C_ADDRESS(PCA9632_ADDRESS));
Wire.write(data, sizeof(data));

View File

@ -833,8 +833,6 @@ void MarlinUI::draw_status_message(const bool blink) {
#if HAS_PRINT_PROGRESS
#define TPOFFSET (LCD_WIDTH - 1)
static uint8_t timepos = TPOFFSET - 6;
static char buffer[8];
#if ENABLED(SHOW_PROGRESS_PERCENT)
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)
void MarlinUI::drawRemain() {
if (printJobOngoing()) {
char buffer[8];
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));
lcd_put_lchar(TERN(LCD_INFO_SCREEN_STYLE, 11, timepos), 2, 'R');
lcd_put_u8str(buffer);
@ -866,7 +865,8 @@ void MarlinUI::draw_status_message(const bool blink) {
void MarlinUI::drawInter() {
const duration_t interactt = interaction_time;
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));
lcd_put_lchar(TERN(LCD_INFO_SCREEN_STYLE, 11, timepos), 2, 'C');
lcd_put_u8str(buffer);
@ -877,8 +877,9 @@ void MarlinUI::draw_status_message(const bool blink) {
#if ENABLED(SHOW_ELAPSED_TIME)
void MarlinUI::drawElapsed() {
if (printJobOngoing()) {
char buffer[8];
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));
lcd_put_lchar(TERN(LCD_INFO_SCREEN_STYLE, 11, timepos), 2, 'E');
lcd_put_u8str(buffer);

View File

@ -601,7 +601,6 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
#if HAS_PRINT_PROGRESS // UNTESTED!!!
#define TPOFFSET (LCD_WIDTH - 1)
static uint8_t timepos = TPOFFSET - 6;
#if ENABLED(SHOW_PROGRESS_PERCENT)
void MarlinUI::drawPercent() {
@ -619,7 +618,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
if (printJobOngoing()) {
const duration_t remaint = ui.get_remaining_time();
char buffer[10];
timepos = TPOFFSET - remaint.toDigital(buffer);
const uint8_t timepos = TPOFFSET - remaint.toDigital(buffer);
lcd_moveto(timepos, 1);
lcd.write('R');
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;
if (printingIsActive() && interactt.value) {
char buffer[10];
timepos = TPOFFSET - interactt.toDigital(buffer);
const uint8_t timepos = TPOFFSET - interactt.toDigital(buffer);
lcd_moveto(timepos, 1);
lcd.write('C');
lcd.print(buffer);
@ -643,7 +642,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
if (printJobOngoing()) {
const duration_t elapsedt = print_job_timer.duration();
char buffer[10];
timepos = TPOFFSET - elapsedt.toDigital(buffer);
const uint8_t timepos = TPOFFSET - elapsedt.toDigital(buffer);
lcd_moveto(timepos, 1);
lcd.write('E');
lcd.print(buffer);

View File

@ -804,13 +804,13 @@ void DGUSRxHandler::pidSetTemp(DGUS_VP &vp, void *data_ptr) {
return;
}
uint16_t temp = BE16_P(data_ptr);
celsius_t temp = BE16_P(data_ptr);
switch (screen.pid_heater) {
default: return;
#if HAS_HEATED_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;
#endif
#if HAS_HOTEND

View File

@ -68,7 +68,6 @@ enum {
static void disp_key_value() {
char *temp;
TERN_(HAS_TRINAMIC_CONFIG, float milliamps);
switch (value) {
default: break;