Browse Source

Fix some compile warnings

pull/1/head
Scott Lahteine 7 years ago
parent
commit
c173a31060
  1. 2
      Marlin/src/HAL/HAL_AVR/endstop_interrupts.h
  2. 24
      Marlin/src/gcode/bedlevel/G26.cpp
  3. 2
      Marlin/src/lcd/ultralcd.cpp
  4. 2
      Marlin/src/pins/pins_ANET_10.h

2
Marlin/src/HAL/HAL_AVR/endstop_interrupts.h

@ -86,7 +86,7 @@ void endstop_ISR(void) { endstop_ISR_worker(); }
// Install Pin change interrupt for a pin. Can be called multiple times. // Install Pin change interrupt for a pin. Can be called multiple times.
void pciSetup(byte pin) { void pciSetup(const int8_t pin) {
SBI(*digitalPinToPCMSK(pin), digitalPinToPCMSKbit(pin)); // enable pin SBI(*digitalPinToPCMSK(pin), digitalPinToPCMSKbit(pin)); // enable pin
SBI(PCIFR, digitalPinToPCICRbit(pin)); // clear any outstanding interrupt SBI(PCIFR, digitalPinToPCICRbit(pin)); // clear any outstanding interrupt
SBI(PCICR, digitalPinToPCICRbit(pin)); // enable interrupt for the group SBI(PCICR, digitalPinToPCICRbit(pin)); // enable interrupt for the group

24
Marlin/src/gcode/bedlevel/G26.cpp

@ -160,7 +160,7 @@ int16_t g26_bed_temp,
int8_t g26_prime_flag; int8_t g26_prime_flag;
#if ENABLED(NEWPANEL) #if ENABLED(ULTIPANEL)
/** /**
* If the LCD is clicked, cancel, wait for release, return true * If the LCD is clicked, cancel, wait for release, return true
@ -331,7 +331,7 @@ inline bool look_for_lines_to_connect() {
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) { for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) { for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
#if ENABLED(NEWPANEL) #if ENABLED(ULTIPANEL)
if (user_canceled()) return true; // Check if the user wants to stop the Mesh Validation if (user_canceled()) return true; // Check if the user wants to stop the Mesh Validation
#endif #endif
@ -422,14 +422,14 @@ inline bool turn_on_heaters() {
if (g26_bed_temp > 25) { if (g26_bed_temp > 25) {
lcd_setstatusPGM(PSTR("G26 Heating Bed."), 99); lcd_setstatusPGM(PSTR("G26 Heating Bed."), 99);
lcd_quick_feedback(true); lcd_quick_feedback(true);
#if ENABLED(NEWPANEL) #if ENABLED(ULTIPANEL)
lcd_external_control = true; lcd_external_control = true;
#endif #endif
#endif #endif
thermalManager.setTargetBed(g26_bed_temp); thermalManager.setTargetBed(g26_bed_temp);
while (ABS(thermalManager.degBed() - g26_bed_temp) > 3) { while (ABS(thermalManager.degBed() - g26_bed_temp) > 3) {
#if ENABLED(NEWPANEL) #if ENABLED(ULTIPANEL)
if (is_lcd_clicked()) return exit_from_g26(); if (is_lcd_clicked()) return exit_from_g26();
#endif #endif
@ -452,7 +452,7 @@ inline bool turn_on_heaters() {
thermalManager.setTargetHotend(g26_hotend_temp, 0); thermalManager.setTargetHotend(g26_hotend_temp, 0);
while (ABS(thermalManager.degHotend(0) - g26_hotend_temp) > 3) { while (ABS(thermalManager.degHotend(0) - g26_hotend_temp) > 3) {
#if ENABLED(NEWPANEL) #if ENABLED(ULTIPANEL)
if (is_lcd_clicked()) return exit_from_g26(); if (is_lcd_clicked()) return exit_from_g26();
#endif #endif
@ -478,7 +478,7 @@ inline bool turn_on_heaters() {
*/ */
inline bool prime_nozzle() { inline bool prime_nozzle() {
#if ENABLED(NEWPANEL) #if ENABLED(ULTIPANEL)
float Total_Prime = 0.0; float Total_Prime = 0.0;
if (g26_prime_flag == -1) { // The user wants to control how much filament gets purged if (g26_prime_flag == -1) { // The user wants to control how much filament gets purged
@ -623,7 +623,7 @@ void GcodeSuite::G26() {
if (parser.seen('P')) { if (parser.seen('P')) {
if (!parser.has_value()) { if (!parser.has_value()) {
#if ENABLED(NEWPANEL) #if ENABLED(ULTIPANEL)
g26_prime_flag = -1; g26_prime_flag = -1;
#else #else
SERIAL_PROTOCOLLNPGM("?Prime length must be specified when not using an LCD."); SERIAL_PROTOCOLLNPGM("?Prime length must be specified when not using an LCD.");
@ -668,7 +668,7 @@ void GcodeSuite::G26() {
} }
int16_t g26_repeats; int16_t g26_repeats;
#if ENABLED(NEWPANEL) #if ENABLED(ULTIPANEL)
g26_repeats = parser.intval('R', GRID_MAX_POINTS + 1); g26_repeats = parser.intval('R', GRID_MAX_POINTS + 1);
#else #else
if (!parser.seen('R')) { if (!parser.seen('R')) {
@ -727,7 +727,7 @@ void GcodeSuite::G26() {
move_to(destination, 0.0); move_to(destination, 0.0);
move_to(destination, g26_ooze_amount); move_to(destination, g26_ooze_amount);
#if ENABLED(NEWPANEL) #if ENABLED(ULTIPANEL)
lcd_external_control = true; lcd_external_control = true;
#endif #endif
@ -835,7 +835,7 @@ void GcodeSuite::G26() {
plan_arc(endpoint, arc_offset, false); // Draw a counter-clockwise arc plan_arc(endpoint, arc_offset, false); // Draw a counter-clockwise arc
feedrate_mm_s = save_feedrate; feedrate_mm_s = save_feedrate;
set_destination_from_current(); set_destination_from_current();
#if ENABLED(NEWPANEL) #if ENABLED(ULTIPANEL)
if (user_canceled()) goto LEAVE; // Check if the user wants to stop the Mesh Validation if (user_canceled()) goto LEAVE; // Check if the user wants to stop the Mesh Validation
#endif #endif
@ -861,7 +861,7 @@ void GcodeSuite::G26() {
for (int8_t ind = start_ind; ind <= end_ind; ind++) { for (int8_t ind = start_ind; ind <= end_ind; ind++) {
#if ENABLED(NEWPANEL) #if ENABLED(ULTIPANEL)
if (user_canceled()) goto LEAVE; // Check if the user wants to stop the Mesh Validation if (user_canceled()) goto LEAVE; // Check if the user wants to stop the Mesh Validation
#endif #endif
@ -910,7 +910,7 @@ void GcodeSuite::G26() {
move_to(destination, 0); // Move back to the starting position move_to(destination, 0); // Move back to the starting position
//debug_current_and_destination(PSTR("done doing X/Y move.")); //debug_current_and_destination(PSTR("done doing X/Y move."));
#if ENABLED(NEWPANEL) #if ENABLED(ULTIPANEL)
lcd_external_control = false; // Give back control of the LCD Panel! lcd_external_control = false; // Give back control of the LCD Panel!
#endif #endif

2
Marlin/src/lcd/ultralcd.cpp

@ -3335,7 +3335,7 @@ void lcd_quick_feedback(const bool clear_buttons) {
lcd_completion_feedback(); lcd_completion_feedback();
} }
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS) && DISABLED(SLIM_LCD_MENUS)
static void lcd_init_eeprom() { static void lcd_init_eeprom() {
lcd_completion_feedback(settings.init_eeprom()); lcd_completion_feedback(settings.init_eeprom());

2
Marlin/src/pins/pins_ANET_10.h

@ -89,7 +89,7 @@
*/ */
#ifndef __AVR_ATmega1284P__ #ifndef __AVR_ATmega1284P__
#error "Oops! Make sure you have 'Anet V1.0', 'Anet V1.0 (Optiboot)' or 'Sanguino' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Anet V1.0', 'Anet V1.0 (Optiboot)' or 'Sanguino' selected in the 'Tools -> Boards' menu and ATmega1284P selected in 'Tools -> Processor' menu."
#endif #endif
#ifndef BOARD_NAME #ifndef BOARD_NAME

Loading…
Cancel
Save