Selaa lähdekoodia

Misc. formatting, serial out

Scott Lahteine 3 vuotta sitten
vanhempi
commit
0e9836649e

+ 4
- 4
Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp Näytä tiedosto

@@ -320,8 +320,8 @@ void hook_cpu_exceptions() {
320 320
     // So we'll simply mask the top 8 bits of the first handler as an hint of being in the flash or not -that's poor and will
321 321
     // probably break if the flash happens to be more than 128MB, but in this case, we are not magician, we need help from outside.
322 322
 
323
-    unsigned long * vecAddr = (unsigned long*)get_vtor();
324
-    SERIAL_ECHO("Vector table addr: ");
323
+    unsigned long *vecAddr = (unsigned long*)get_vtor();
324
+    SERIAL_ECHOPGM("Vector table addr: ");
325 325
     SERIAL_PRINTLN(get_vtor(), HEX);
326 326
 
327 327
     #ifdef VECTOR_TABLE_SIZE
@@ -348,7 +348,7 @@ void hook_cpu_exceptions() {
348 348
       // 128 bytes alignement is required for writing the VTOR register
349 349
       alignas(128) static unsigned long vectable[VECTOR_TABLE_SENTINEL];
350 350
 
351
-      SERIAL_ECHO("Detected vector table size: ");
351
+      SERIAL_ECHOPGM("Detected vector table size: ");
352 352
       SERIAL_PRINTLN(vec_size, HEX);
353 353
     #endif
354 354
 
@@ -372,7 +372,7 @@ void hook_cpu_exceptions() {
372 372
 
373 373
     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)
374 374
 
375
-    SERIAL_ECHOLN("Installed fault handlers");
375
+    SERIAL_ECHOLNPGM("Installed fault handlers");
376 376
   #endif
377 377
 }
378 378
 

+ 2
- 2
Marlin/src/core/bug_on.h Näytä tiedosto

@@ -28,11 +28,11 @@
28 28
   // This is used like SERIAL_ECHOPAIR, that is: a key-value call of the local variables you want
29 29
   // to dump to the serial port before stopping the CPU.
30 30
                           // \/ Don't replace by SERIAL_ECHOPAIR since ONLY_FILENAME cannot be transformed to a PGM string on Arduino and it breaks building
31
-  #define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLN(": "); SERIAL_ECHOLNPAIR(V); SERIAL_FLUSHTX(); *(char*)0 = 42; } while(0)
31
+  #define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLNPGM(": "); SERIAL_ECHOLNPAIR(V); SERIAL_FLUSHTX(); *(char*)0 = 42; } while(0)
32 32
 #elif ENABLED(MARLIN_DEV_MODE)
33 33
   // Don't stop the CPU here, but at least dump the bug on the serial port
34 34
                           // \/ Don't replace by SERIAL_ECHOPAIR since ONLY_FILENAME cannot be transformed to a PGM string on Arduino and it breaks building
35
-  #define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLN(": BUG!"); SERIAL_ECHOLNPAIR(V); SERIAL_FLUSHTX(); } while(0)
35
+  #define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLNPGM(": BUG!"); SERIAL_ECHOLNPAIR(V); SERIAL_FLUSHTX(); } while(0)
36 36
 #else
37 37
   // Release mode, let's ignore the bug
38 38
   #define BUG_ON(V...) NOOP

+ 1
- 1
Marlin/src/lcd/dogm/u8g_dev_ssd1309_12864.cpp Näytä tiedosto

@@ -88,7 +88,7 @@ static const uint8_t u8g_dev_ssd13xx_sleep_off[] PROGMEM = {
88 88
 };
89 89
 
90 90
 uint8_t u8g_dev_ssd1309_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
91
-  switch(msg) {
91
+  switch (msg) {
92 92
     case U8G_DEV_MSG_INIT:
93 93
       u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_300NS);
94 94
       u8g_WriteEscSeqP(u8g, dev, u8g_dev_ssd1309_128x64_init_seq);

+ 23
- 18
Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.h Näytä tiedosto

@@ -35,22 +35,27 @@
35 35
 using namespace ExtUI;
36 36
 
37 37
 namespace Anycubic {
38
-  class FileNavigator {
39
-    public:
40
-      FileNavigator();
41
-      void   reset();
42
-      void   getFiles(uint16_t);
43
-      void   upDIR();
44
-      void   changeDIR(char *);
45
-      void   sendFile();
46
-      void   refresh();
47
-      char * getCurrentFolderName();
48
-    private:
49
-      static FileList  filelist;
50
-      static char      currentfoldername[MAX_PATH_LEN];
51
-      static uint16_t  lastindex;
52
-      static uint8_t   folderdepth;
53
-      static uint16_t  currentindex;
54
-  };
55
-  extern FileNavigator filenavigator;
38
+
39
+class FileNavigator {
40
+  public:
41
+    FileNavigator();
42
+    void reset();
43
+    void getFiles(uint16_t, panel_type_t, uint8_t filesneeded=4);
44
+    void upDIR();
45
+    void changeDIR(const char *);
46
+    void sendFile(panel_type_t);
47
+    void refresh();
48
+    void skiptofileindex(uint16_t);
49
+
50
+    static FileList filelist;
51
+  private:
52
+    static uint16_t lastpanelindex;
53
+    static uint16_t currentindex;
54
+    static uint8_t  currentfolderdepth;
55
+    static uint16_t currentfolderindex[MAX_FOLDER_DEPTH];
56
+    static char     currentfoldername[MAX_PATH_LEN];
57
+};
58
+
59
+extern FileNavigator filenavigator;
60
+
56 61
 }

+ 747
- 747
Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.cpp
File diff suppressed because it is too large
Näytä tiedosto


+ 38
- 38
Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.h Näytä tiedosto

@@ -35,46 +35,46 @@
35 35
 
36 36
 namespace Anycubic {
37 37
 
38
-  class ChironTFT {
39
-    private:
40
-      static printer_state_t  printer_state;
41
-      static paused_state_t   pause_state;
42
-      static heater_state_t   hotend_state;
43
-      static heater_state_t   hotbed_state;
44
-      static xy_uint8_t       selectedmeshpoint;
45
-      static char             panel_command[MAX_CMND_LEN];
46
-      static uint8_t          command_len;
47
-      static char             selectedfile[MAX_PATH_LEN];
48
-      static float            live_Zoffset;
49
-      static file_menu_t      file_menu;
38
+class ChironTFT {
39
+  private:
40
+    static printer_state_t  printer_state;
41
+    static paused_state_t   pause_state;
42
+    static heater_state_t   hotend_state;
43
+    static heater_state_t   hotbed_state;
44
+    static xy_uint8_t       selectedmeshpoint;
45
+    static char             panel_command[MAX_CMND_LEN];
46
+    static uint8_t          command_len;
47
+    static char             selectedfile[MAX_PATH_LEN];
48
+    static float            live_Zoffset;
49
+    static file_menu_t      file_menu;
50 50
 
51
-    public:
52
-      ChironTFT();
53
-      static void Startup();
54
-      static void IdleLoop();
55
-      static void PrinterKilled(PGM_P,PGM_P);
56
-      static void MediaEvent(media_event_t);
57
-      static void TimerEvent(timer_event_t);
58
-      static void FilamentRunout();
59
-      static void ConfirmationRequest(const char * const );
60
-      static void StatusChange(const char * const );
61
-      static void PowerLossRecovery();
51
+  public:
52
+    ChironTFT();
53
+    static void Startup();
54
+    static void IdleLoop();
55
+    static void PrinterKilled(PGM_P,PGM_P);
56
+    static void MediaEvent(media_event_t);
57
+    static void TimerEvent(timer_event_t);
58
+    static void FilamentRunout();
59
+    static void ConfirmationRequest(const char * const );
60
+    static void StatusChange(const char * const );
61
+    static void PowerLossRecovery();
62 62
 
63
-    private:
64
-      static void SendtoTFT(PGM_P);
65
-      static void SendtoTFTLN(PGM_P);
66
-      static bool ReadTFTCommand();
67
-      static int8_t Findcmndpos(const char *, char);
68
-      static void CheckHeaters();
69
-      static void SendFileList(int8_t);
70
-      static void SelectFile();
71
-      static void InjectCommandandWait(PGM_P);
72
-      static void ProcessPanelRequest();
73
-      static void PanelInfo(uint8_t);
74
-      static void PanelAction(uint8_t);
75
-      static void PanelProcess(uint8_t);
76
-  };
63
+  private:
64
+    static void SendtoTFT(PGM_P);
65
+    static void SendtoTFTLN(PGM_P);
66
+    static bool ReadTFTCommand();
67
+    static int8_t Findcmndpos(const char *, char);
68
+    static void CheckHeaters();
69
+    static void SendFileList(int8_t);
70
+    static void SelectFile();
71
+    static void InjectCommandandWait(PGM_P);
72
+    static void ProcessPanelRequest();
73
+    static void PanelInfo(uint8_t);
74
+    static void PanelAction(uint8_t);
75
+    static void PanelProcess(uint8_t);
76
+};
77 77
 
78
-  extern ChironTFT Chiron;
78
+extern ChironTFT Chiron;
79 79
 
80 80
 } // Anycubic

+ 0
- 6
Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft_defs.h Näytä tiedosto

@@ -109,19 +109,16 @@
109 109
 #define AC_cmnd_power_loss_recovery    PSTR("G28XYR5\nG28Z")           // Lift, home X and Y then home Z when in 'safe' position
110 110
 
111 111
 namespace Anycubic {
112
-
113 112
   enum heater_state_t : uint8_t {
114 113
     AC_heater_off,
115 114
     AC_heater_temp_set,
116 115
     AC_heater_temp_reached
117 116
   };
118
-
119 117
   enum paused_state_t : uint8_t {
120 118
     AC_paused_heater_timed_out,
121 119
     AC_paused_purging_filament,
122 120
     AC_paused_idle
123 121
   };
124
-
125 122
   enum printer_state_t : uint8_t {
126 123
     AC_printer_idle,
127 124
     AC_printer_probing,
@@ -131,13 +128,11 @@ namespace Anycubic {
131 128
     AC_printer_stopping,
132 129
     AC_printer_resuming_from_power_outage
133 130
   };
134
-
135 131
   enum timer_event_t : uint8_t {
136 132
     AC_timer_started,
137 133
     AC_timer_paused,
138 134
     AC_timer_stopped
139 135
   };
140
-
141 136
   enum media_event_t : uint8_t {
142 137
     AC_media_inserted,
143 138
     AC_media_removed,
@@ -149,5 +144,4 @@ namespace Anycubic {
149 144
     AC_menu_change_to_file,
150 145
     AC_menu_change_to_command
151 146
   };
152
-
153 147
 } // Anycubic

Loading…
Peruuta
Tallenna