Misc. formatting, serial out
This commit is contained in:
parent
e26eebfb2f
commit
326b1c1225
@ -321,7 +321,7 @@ void hook_cpu_exceptions() {
|
|||||||
// probably break if the flash happens to be more than 128MB, but in this case, we are not magician, we need help from outside.
|
// probably break if the flash happens to be more than 128MB, but in this case, we are not magician, we need help from outside.
|
||||||
|
|
||||||
unsigned long *vecAddr = (unsigned long*)get_vtor();
|
unsigned long *vecAddr = (unsigned long*)get_vtor();
|
||||||
SERIAL_ECHO("Vector table addr: ");
|
SERIAL_ECHOPGM("Vector table addr: ");
|
||||||
SERIAL_PRINTLN(get_vtor(), HEX);
|
SERIAL_PRINTLN(get_vtor(), HEX);
|
||||||
|
|
||||||
#ifdef VECTOR_TABLE_SIZE
|
#ifdef VECTOR_TABLE_SIZE
|
||||||
@ -348,7 +348,7 @@ void hook_cpu_exceptions() {
|
|||||||
// 128 bytes alignement is required for writing the VTOR register
|
// 128 bytes alignement is required for writing the VTOR register
|
||||||
alignas(128) static unsigned long vectable[VECTOR_TABLE_SENTINEL];
|
alignas(128) static unsigned long vectable[VECTOR_TABLE_SENTINEL];
|
||||||
|
|
||||||
SERIAL_ECHO("Detected vector table size: ");
|
SERIAL_ECHOPGM("Detected vector table size: ");
|
||||||
SERIAL_PRINTLN(vec_size, HEX);
|
SERIAL_PRINTLN(vec_size, HEX);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -372,7 +372,7 @@ void hook_cpu_exceptions() {
|
|||||||
|
|
||||||
HW_REG(0xE000ED08) = (unsigned long)vectable | _BV32(29); // 29th bit is for telling the CPU the table is now in SRAM (should be present already)
|
HW_REG(0xE000ED08) = (unsigned long)vectable | _BV32(29); // 29th bit is for telling the CPU the table is now in SRAM (should be present already)
|
||||||
|
|
||||||
SERIAL_ECHOLN("Installed fault handlers");
|
SERIAL_ECHOLNPGM("Installed fault handlers");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,11 +28,11 @@
|
|||||||
// This is used like SERIAL_ECHOPAIR, that is: a key-value call of the local variables you want
|
// This is used like SERIAL_ECHOPAIR, that is: a key-value call of the local variables you want
|
||||||
// to dump to the serial port before stopping the CPU.
|
// to dump to the serial port before stopping the CPU.
|
||||||
// \/ Don't replace by SERIAL_ECHOPAIR since ONLY_FILENAME cannot be transformed to a PGM string on Arduino and it breaks building
|
// \/ Don't replace by SERIAL_ECHOPAIR since ONLY_FILENAME cannot be transformed to a PGM string on Arduino and it breaks building
|
||||||
#define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLN(": "); SERIAL_ECHOLNPAIR(V); SERIAL_FLUSHTX(); *(char*)0 = 42; } while(0)
|
#define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLNPGM(": "); SERIAL_ECHOLNPAIR(V); SERIAL_FLUSHTX(); *(char*)0 = 42; } while(0)
|
||||||
#elif ENABLED(MARLIN_DEV_MODE)
|
#elif ENABLED(MARLIN_DEV_MODE)
|
||||||
// Don't stop the CPU here, but at least dump the bug on the serial port
|
// Don't stop the CPU here, but at least dump the bug on the serial port
|
||||||
// \/ Don't replace by SERIAL_ECHOPAIR since ONLY_FILENAME cannot be transformed to a PGM string on Arduino and it breaks building
|
// \/ Don't replace by SERIAL_ECHOPAIR since ONLY_FILENAME cannot be transformed to a PGM string on Arduino and it breaks building
|
||||||
#define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLN(": BUG!"); SERIAL_ECHOLNPAIR(V); SERIAL_FLUSHTX(); } while(0)
|
#define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLNPGM(": BUG!"); SERIAL_ECHOLNPAIR(V); SERIAL_FLUSHTX(); } while(0)
|
||||||
#else
|
#else
|
||||||
// Release mode, let's ignore the bug
|
// Release mode, let's ignore the bug
|
||||||
#define BUG_ON(V...) NOOP
|
#define BUG_ON(V...) NOOP
|
||||||
|
@ -35,22 +35,27 @@
|
|||||||
using namespace ExtUI;
|
using namespace ExtUI;
|
||||||
|
|
||||||
namespace Anycubic {
|
namespace Anycubic {
|
||||||
|
|
||||||
class FileNavigator {
|
class FileNavigator {
|
||||||
public:
|
public:
|
||||||
FileNavigator();
|
FileNavigator();
|
||||||
void reset();
|
void reset();
|
||||||
void getFiles(uint16_t);
|
void getFiles(uint16_t, panel_type_t, uint8_t filesneeded=4);
|
||||||
void upDIR();
|
void upDIR();
|
||||||
void changeDIR(char *);
|
void changeDIR(const char *);
|
||||||
void sendFile();
|
void sendFile(panel_type_t);
|
||||||
void refresh();
|
void refresh();
|
||||||
char * getCurrentFolderName();
|
void skiptofileindex(uint16_t);
|
||||||
private:
|
|
||||||
static FileList filelist;
|
static FileList filelist;
|
||||||
static char currentfoldername[MAX_PATH_LEN];
|
private:
|
||||||
static uint16_t lastindex;
|
static uint16_t lastpanelindex;
|
||||||
static uint8_t folderdepth;
|
|
||||||
static uint16_t currentindex;
|
static uint16_t currentindex;
|
||||||
|
static uint8_t currentfolderdepth;
|
||||||
|
static uint16_t currentfolderindex[MAX_FOLDER_DEPTH];
|
||||||
|
static char currentfoldername[MAX_PATH_LEN];
|
||||||
};
|
};
|
||||||
|
|
||||||
extern FileNavigator filenavigator;
|
extern FileNavigator filenavigator;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -832,8 +832,8 @@ namespace Anycubic {
|
|||||||
setAxisPosition_mm(currZpos+constrain(Zshift,-0.05,0.05),Z);
|
setAxisPosition_mm(currZpos+constrain(Zshift,-0.05,0.05),Z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} break;
|
}
|
||||||
} // end switch
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case 32: { // A32 clean leveling beep flag
|
case 32: { // A32 clean leveling beep flag
|
||||||
@ -843,7 +843,7 @@ namespace Anycubic {
|
|||||||
//TFTSer.println();
|
//TFTSer.println();
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
// A33 firmware info request seet PanelInfo()
|
// A33 firmware info request see PanelInfo()
|
||||||
|
|
||||||
case 34: { // A34 Adjust single mesh point A34 C/S X1 Y1 V123
|
case 34: { // A34 Adjust single mesh point A34 C/S X1 Y1 V123
|
||||||
if (panel_command[3] == 'C') { // Restore original offsets
|
if (panel_command[3] == 'C') { // Restore original offsets
|
||||||
|
@ -109,19 +109,16 @@
|
|||||||
#define AC_cmnd_power_loss_recovery PSTR("G28XYR5\nG28Z") // Lift, home X and Y then home Z when in 'safe' position
|
#define AC_cmnd_power_loss_recovery PSTR("G28XYR5\nG28Z") // Lift, home X and Y then home Z when in 'safe' position
|
||||||
|
|
||||||
namespace Anycubic {
|
namespace Anycubic {
|
||||||
|
|
||||||
enum heater_state_t : uint8_t {
|
enum heater_state_t : uint8_t {
|
||||||
AC_heater_off,
|
AC_heater_off,
|
||||||
AC_heater_temp_set,
|
AC_heater_temp_set,
|
||||||
AC_heater_temp_reached
|
AC_heater_temp_reached
|
||||||
};
|
};
|
||||||
|
|
||||||
enum paused_state_t : uint8_t {
|
enum paused_state_t : uint8_t {
|
||||||
AC_paused_heater_timed_out,
|
AC_paused_heater_timed_out,
|
||||||
AC_paused_purging_filament,
|
AC_paused_purging_filament,
|
||||||
AC_paused_idle
|
AC_paused_idle
|
||||||
};
|
};
|
||||||
|
|
||||||
enum printer_state_t : uint8_t {
|
enum printer_state_t : uint8_t {
|
||||||
AC_printer_idle,
|
AC_printer_idle,
|
||||||
AC_printer_probing,
|
AC_printer_probing,
|
||||||
@ -131,13 +128,11 @@ namespace Anycubic {
|
|||||||
AC_printer_stopping,
|
AC_printer_stopping,
|
||||||
AC_printer_resuming_from_power_outage
|
AC_printer_resuming_from_power_outage
|
||||||
};
|
};
|
||||||
|
|
||||||
enum timer_event_t : uint8_t {
|
enum timer_event_t : uint8_t {
|
||||||
AC_timer_started,
|
AC_timer_started,
|
||||||
AC_timer_paused,
|
AC_timer_paused,
|
||||||
AC_timer_stopped
|
AC_timer_stopped
|
||||||
};
|
};
|
||||||
|
|
||||||
enum media_event_t : uint8_t {
|
enum media_event_t : uint8_t {
|
||||||
AC_media_inserted,
|
AC_media_inserted,
|
||||||
AC_media_removed,
|
AC_media_removed,
|
||||||
@ -149,5 +144,4 @@ namespace Anycubic {
|
|||||||
AC_menu_change_to_file,
|
AC_menu_change_to_file,
|
||||||
AC_menu_change_to_command
|
AC_menu_change_to_command
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Anycubic
|
} // Anycubic
|
||||||
|
Loading…
Reference in New Issue
Block a user