Apply pointer formatting

This commit is contained in:
Scott Lahteine
2021-03-29 20:36:37 -05:00
parent 71e789943e
commit 3b73b115ca
102 changed files with 364 additions and 364 deletions

View File

@ -62,7 +62,7 @@ void (*DGUSScreenHandler::confirm_action_cb)() = nullptr;
filament_data_t filament_data;
#endif
void DGUSScreenHandler::sendinfoscreen(const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool l4inflash) {
void DGUSScreenHandler::sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool l4inflash) {
DGUS_VP_Variable ramcopy;
if (populate_VPVar(VP_MSGSTR1, &ramcopy)) {
ramcopy.memadr = (void*) line1;
@ -82,7 +82,7 @@ void DGUSScreenHandler::sendinfoscreen(const char* line1, const char* line2, con
}
}
void DGUSScreenHandler::HandleUserConfirmationPopUp(uint16_t VP, const char* line1, const char* line2, const char* line3, const char* line4, bool l1, bool l2, bool l3, bool l4) {
void DGUSScreenHandler::HandleUserConfirmationPopUp(uint16_t VP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1, bool l2, bool l3, bool l4) {
if (current_screen == DGUSLCD_SCREEN_CONFIRM) // Already showing a pop up, so we need to cancel that first.
PopToOldScreen();

View File

@ -37,12 +37,12 @@ public:
// Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
// The bools specifing whether the strings are in RAM or FLASH.
static void sendinfoscreen(const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
// "M117" Message -- msg is a RAM ptr.
static void setstatusmessage(const char* msg);
static void setstatusmessage(const char *msg);
// The same for messages from Flash
static void setstatusmessagePGM(PGM_P const msg);
// Callback for VP "Display wants to change screen on idle printer"

View File

@ -37,12 +37,12 @@ public:
// Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
// The bools specifing whether the strings are in RAM or FLASH.
static void sendinfoscreen(const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
// "M117" Message -- msg is a RAM ptr.
static void setstatusmessage(const char* msg);
static void setstatusmessage(const char *msg);
// The same for messages from Flash
static void setstatusmessagePGM(PGM_P const msg);
// Callback for VP "Display wants to change screen on idle printer"

View File

@ -61,14 +61,14 @@ uint8_t DGUSLanguageSwitch = 0; // Switch language for MKS DGUS
uint32_t swap32(const uint32_t value) { return (value & 0x000000FFU) << 24U | (value & 0x0000FF00U) << 8U | (value & 0x00FF0000U) >> 8U | (value & 0xFF000000U) >> 24U; }
#if 0
void DGUSScreenHandler::sendinfoscreen_ch_mks(const uint16_t* line1, const uint16_t* line2, const uint16_t* line3, const uint16_t* line4) {
void DGUSScreenHandler::sendinfoscreen_ch_mks(const uint16_t *line1, const uint16_t *line2, const uint16_t *line3, const uint16_t *line4) {
dgusdisplay.WriteVariable(VP_MSGSTR1, line1, 32, true);
dgusdisplay.WriteVariable(VP_MSGSTR2, line2, 32, true);
dgusdisplay.WriteVariable(VP_MSGSTR3, line3, 32, true);
dgusdisplay.WriteVariable(VP_MSGSTR4, line4, 32, true);
}
void DGUSScreenHandler::sendinfoscreen_en_mks(const char* line1, const char* line2, const char* line3, const char* line4) {
void DGUSScreenHandler::sendinfoscreen_en_mks(const char *line1, const char *line2, const char *line3, const char *line4) {
dgusdisplay.WriteVariable(VP_MSGSTR1, line1, 32, true);
dgusdisplay.WriteVariable(VP_MSGSTR2, line2, 32, true);
dgusdisplay.WriteVariable(VP_MSGSTR3, line3, 32, true);

View File

@ -37,18 +37,18 @@ public:
// Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
// The bools specifing whether the strings are in RAM or FLASH.
static void sendinfoscreen(const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
#if 0
static void sendinfoscreen_ch_mks(const uint16_t* line1, const uint16_t* line2, const uint16_t* line3, const uint16_t* line4);
static void sendinfoscreen_en_mks(const char* line1, const char* line2, const char* line3, const char* line4) ;
static void sendinfoscreen_ch_mks(const uint16_t *line1, const uint16_t *line2, const uint16_t *line3, const uint16_t *line4);
static void sendinfoscreen_en_mks(const char *line1, const char *line2, const char *line3, const char *line4) ;
static void sendinfoscreen_mks(const void* line1, const void* line2, const void* line3, const void* line4,uint16_t language);
#endif
// "M117" Message -- msg is a RAM ptr.
static void setstatusmessage(const char* msg);
static void setstatusmessage(const char *msg);
// The same for messages from Flash
static void setstatusmessagePGM(PGM_P const msg);
// Callback for VP "Display wants to change screen on idle printer"

View File

@ -37,12 +37,12 @@ public:
// Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
// The bools specifing whether the strings are in RAM or FLASH.
static void sendinfoscreen(const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
// "M117" Message -- msg is a RAM ptr.
static void setstatusmessage(const char* msg);
static void setstatusmessage(const char *msg);
// The same for messages from Flash
static void setstatusmessagePGM(PGM_P const msg);
// Callback for VP "Display wants to change screen on idle printer"

View File

@ -26,7 +26,7 @@
#include "media_file_reader.h"
#if ENABLED(SDSUPPORT)
bool MediaFileReader::open(const char* filename) {
bool MediaFileReader::open(const char *filename) {
card.init(SD_SPI_SPEED, SDSS);
volume.init(&card);
root.openRoot(&volume);

View File

@ -38,7 +38,7 @@ class MediaFileReader {
#endif
public:
bool open(const char* filename);
bool open(const char *filename);
int16_t read(void *buff, size_t bytes);
uint32_t size();
void rewind();

View File

@ -103,12 +103,12 @@ namespace FTDI {
#endif
void SPI::spi_read_bulk(void *data, uint16_t len) {
uint8_t* p = (uint8_t *)data;
uint8_t *p = (uint8_t *)data;
while (len--) *p++ = spi_recv();
}
bool SPI::spi_verify_bulk(const void *data, uint16_t len) {
const uint8_t* p = (const uint8_t *)data;
const uint8_t *p = (const uint8_t *)data;
while (len--) if (*p++ != spi_recv()) return false;
return true;
}

View File

@ -116,14 +116,14 @@ namespace FTDI {
template<bulk_write_op byte_op>
void spi_write_bulk(const void *data, uint16_t len, uint8_t padding) {
const uint8_t* p = (const uint8_t *)data;
const uint8_t *p = (const uint8_t *)data;
while (len--) spi_send(byte_op(p++));
while (padding--) spi_send(0);
}
template<bulk_write_op byte_op>
void spi_write_bulk(const void *data, uint16_t len) {
const uint8_t* p = (const uint8_t *)data;
const uint8_t *p = (const uint8_t *)data;
while (len--) spi_send(byte_op(p++));
}

View File

@ -24,7 +24,7 @@
class SoundList {
private:
static PROGMEM const struct list_t {
const char *const PROGMEM name;
const char * const PROGMEM name;
const FTDI::SoundPlayer::sound_t* data;
} list[];
public:

View File

@ -62,7 +62,7 @@ namespace FTDI {
timer.start();
}
void SoundPlayer::play(const sound_t* seq, play_mode_t mode) {
void SoundPlayer::play(const sound_t *seq, play_mode_t mode) {
sequence = seq;
wait = 250; // Adding this delay causes the note to not be clipped, not sure why.
timer.start();

View File

@ -55,7 +55,7 @@ namespace FTDI {
static void play(effect_t effect, note_t note = NOTE_C4);
static bool is_sound_playing();
void play(const sound_t* seq, play_mode_t mode = PLAY_SYNCHRONOUS);
void play(const sound_t *seq, play_mode_t mode = PLAY_SYNCHRONOUS);
void play_tone(const uint16_t frequency_hz, const uint16_t duration_ms);
bool has_more_notes() {return sequence != 0;};

View File

@ -47,7 +47,7 @@ namespace FTDI {
break;
}
#else
for (char* c = str; *c; c++) {
for (char *c = str; *c; c++) {
lineWidth += fm.get_char_width(*c);
if (lineWidth + ellipsisWidth < w)
breakPoint = c;

View File

@ -71,7 +71,7 @@ namespace ExtUI {
AlertDialogBox::showError(F("Unable to read media."));
}
void onStatusChanged(const char* lcd_msg) {
void onStatusChanged(const char *lcd_msg) {
StatusScreen::setStatusMessage(lcd_msg);
}

View File

@ -34,7 +34,7 @@ using namespace Theme;
#define GRID_COLS 2
#define GRID_ROWS 9
void BioPrintingDialogBox::draw_status_message(draw_mode_t what, const char* message) {
void BioPrintingDialogBox::draw_status_message(draw_mode_t what, const char *message) {
if (what & BACKGROUND) {
CommandProcessor cmd;
cmd.cmd(COLOR_RGB(bg_text_enabled))
@ -113,7 +113,7 @@ void BioPrintingDialogBox::setStatusMessage(progmem_str message) {
setStatusMessage(buff);
}
void BioPrintingDialogBox::setStatusMessage(const char* message) {
void BioPrintingDialogBox::setStatusMessage(const char *message) {
CommandProcessor cmd;
cmd.cmd(CMD_DLSTART)
.cmd(CLEAR_COLOR_RGB(bg_color))

View File

@ -56,7 +56,7 @@ void ConfirmUserRequestAlertBox::onIdle() {
}
}
void ConfirmUserRequestAlertBox::show(const char* msg) {
void ConfirmUserRequestAlertBox::show(const char *msg) {
drawMessage(msg);
storeBackground();
screen_data.AlertDialogBox.isError = false;

View File

@ -76,7 +76,7 @@ uint16_t FilesScreen::getFileForTag(uint8_t tag) {
#define GRID_ROWS (files_per_page + header_h + footer_h)
#endif
void FilesScreen::drawFileButton(const char* filename, uint8_t tag, bool is_dir, bool is_highlighted) {
void FilesScreen::drawFileButton(const char *filename, uint8_t tag, bool is_dir, bool is_highlighted) {
const uint8_t line = getLineForTag(tag)+1;
CommandProcessor cmd;
cmd.tag(tag);

View File

@ -60,7 +60,7 @@ class FilesScreen : public BaseScreen, public CachedScreen<FILES_SCREEN_CACHE, F
inline static const char *getSelectedLongFilename() {return getSelectedFilename(true);}
static const char *getSelectedFilename(bool longName);
static void drawFileButton(const char* filename, uint8_t tag, bool is_dir, bool is_highlighted);
static void drawFileButton(const char *filename, uint8_t tag, bool is_dir, bool is_highlighted);
static void drawFileList();
static void drawHeader();
static void drawFooter();

View File

@ -324,7 +324,7 @@ void StatusScreen::draw_interaction_buttons(draw_mode_t what) {
#undef GRID_COLS
}
void StatusScreen::draw_status_message(draw_mode_t what, const char* message) {
void StatusScreen::draw_status_message(draw_mode_t what, const char *message) {
#define GRID_COLS 1
#if ENABLED(TOUCH_UI_PORTRAIT)
@ -350,7 +350,7 @@ void StatusScreen::setStatusMessage(progmem_str message) {
setStatusMessage((const char *) buff);
}
void StatusScreen::setStatusMessage(const char* message) {
void StatusScreen::setStatusMessage(const char *message) {
if (CommandProcessor::is_processing()) {
#if ENABLED(TOUCH_UI_DEBUG)
SERIAL_ECHO_MSG("Cannot update status message, command processor busy");

View File

@ -167,7 +167,7 @@ void SPIFlashStorage::endWrite() {
#endif
}
void SPIFlashStorage::savePage(uint8_t* buffer) {
void SPIFlashStorage::savePage(uint8_t *buffer) {
W25QXX.SPI_FLASH_BufferWrite(buffer, m_startAddress + (SPI_FLASH_PageSize * m_currentPage), SPI_FLASH_PageSize);
// Test env
// char fname[256];
@ -177,7 +177,7 @@ void SPIFlashStorage::savePage(uint8_t* buffer) {
// fclose(fp);
}
void SPIFlashStorage::loadPage(uint8_t* buffer) {
void SPIFlashStorage::loadPage(uint8_t *buffer) {
W25QXX.SPI_FLASH_BufferRead(buffer, m_startAddress + (SPI_FLASH_PageSize * m_currentPage), SPI_FLASH_PageSize);
// Test env
// char fname[256];
@ -256,7 +256,7 @@ void SPIFlashStorage::readPage() {
#endif
}
uint16_t SPIFlashStorage::inData(uint8_t* data, uint16_t size) {
uint16_t SPIFlashStorage::inData(uint8_t *data, uint16_t size) {
// Don't write more than we can
NOMORE(size, pageDataFree());
memcpy(m_pageData + m_pageDataUsed, data, size);
@ -264,7 +264,7 @@ uint16_t SPIFlashStorage::inData(uint8_t* data, uint16_t size) {
return size;
}
void SPIFlashStorage::writeData(uint8_t* data, uint16_t size) {
void SPIFlashStorage::writeData(uint8_t *data, uint16_t size) {
// Flush a page if needed
if (pageDataFree() == 0) flushPage();
@ -289,7 +289,7 @@ void SPIFlashStorage::beginRead(uint32_t startAddress) {
#endif
}
uint16_t SPIFlashStorage::outData(uint8_t* data, uint16_t size) {
uint16_t SPIFlashStorage::outData(uint8_t *data, uint16_t size) {
// Don't read more than we have
NOMORE(size, pageDataFree());
memcpy(data, m_pageData + m_pageDataUsed, size);
@ -297,7 +297,7 @@ uint16_t SPIFlashStorage::outData(uint8_t* data, uint16_t size) {
return size;
}
void SPIFlashStorage::readData(uint8_t* data, uint16_t size) {
void SPIFlashStorage::readData(uint8_t *data, uint16_t size) {
// Read a page if needed
if (pageDataFree() == 0) readPage();

View File

@ -77,21 +77,21 @@ public:
// Write operation
static void beginWrite(uint32_t startAddress);
static void endWrite();
static void writeData(uint8_t* data, uint16_t size);
static void writeData(uint8_t *data, uint16_t size);
// Read operation
static void beginRead(uint32_t startAddress);
static void readData(uint8_t* data, uint16_t size);
static void readData(uint8_t *data, uint16_t size);
static uint32_t getCurrentPage() { return m_currentPage; }
private:
static void flushPage();
static void savePage(uint8_t* buffer);
static void loadPage(uint8_t* buffer);
static void savePage(uint8_t *buffer);
static void loadPage(uint8_t *buffer);
static void readPage();
static uint16_t inData(uint8_t* data, uint16_t size);
static uint16_t outData(uint8_t* data, uint16_t size);
static uint16_t inData(uint8_t *data, uint16_t size);
static uint16_t outData(uint8_t *data, uint16_t size);
static uint8_t m_pageData[SPI_FLASH_PageSize];
static uint32_t m_currentPage;

View File

@ -649,7 +649,7 @@ char *creat_title_text() {
if (gPicturePreviewStart <= 0) {
while (1) {
uint32_t br = card.read(public_buf, 400);
uint32_t* p1 = (uint32_t *)strstr((char *)public_buf, ";gimage:");
uint32_t *p1 = (uint32_t *)strstr((char *)public_buf, ";gimage:");
if (p1) {
gPicturePreviewStart += (uint32_t)p1 - (uint32_t)((uint32_t *)(&public_buf[0]));
break;
@ -1173,7 +1173,7 @@ void lv_btn_set_style_both(lv_obj_t *btn, lv_style_t *style) {
}
// Create a screen
lv_obj_t* lv_screen_create(DISP_STATE newScreenType, const char* title) {
lv_obj_t* lv_screen_create(DISP_STATE newScreenType, const char *title) {
lv_obj_t *scr = lv_obj_create(nullptr, nullptr);
lv_obj_set_style(scr, &tft_style_scr);
lv_scr_load(scr);
@ -1348,19 +1348,19 @@ lv_obj_t* lv_screen_menu_item(lv_obj_t *par, const char *text, lv_coord_t x, lv_
}
lv_obj_t* lv_screen_menu_item_1_edit(lv_obj_t *par, const char *text, lv_coord_t x, lv_coord_t y, lv_event_cb_t cb, const int id, const int index, const char *editValue) {
lv_obj_t* btn = lv_screen_menu_item(par, text, x, y, cb, -1, index, false);
lv_obj_t* btnValue = lv_btn_create(par, PARA_UI_VALUE_POS_X, y + PARA_UI_VALUE_V, PARA_UI_VALUE_BTN_X_SIZE, PARA_UI_VALUE_BTN_Y_SIZE, cb, id);
lv_obj_t* labelValue = lv_label_create_empty(btnValue);
lv_obj_t *btn = lv_screen_menu_item(par, text, x, y, cb, -1, index, false);
lv_obj_t *btnValue = lv_btn_create(par, PARA_UI_VALUE_POS_X, y + PARA_UI_VALUE_V, PARA_UI_VALUE_BTN_X_SIZE, PARA_UI_VALUE_BTN_Y_SIZE, cb, id);
lv_obj_t *labelValue = lv_label_create_empty(btnValue);
lv_label_set_text(labelValue, editValue);
lv_obj_align(labelValue, btnValue, LV_ALIGN_CENTER, 0, 0);
return btn;
}
lv_obj_t* lv_screen_menu_item_2_edit(lv_obj_t *par, const char *text, lv_coord_t x, lv_coord_t y, lv_event_cb_t cb, const int id, const int index, const char *editValue, const int idEdit2, const char *editValue2) {
lv_obj_t* btn = lv_screen_menu_item(par, text, x, y, cb, -1, index, false);
lv_obj_t *btn = lv_screen_menu_item(par, text, x, y, cb, -1, index, false);
lv_obj_t* btnValue = lv_btn_create(par, PARA_UI_VALUE_POS_X_2, y + PARA_UI_VALUE_V_2, PARA_UI_VALUE_BTN_X_SIZE, PARA_UI_VALUE_BTN_Y_SIZE, cb, idEdit2);
lv_obj_t* labelValue = lv_label_create_empty(btnValue);
lv_obj_t *btnValue = lv_btn_create(par, PARA_UI_VALUE_POS_X_2, y + PARA_UI_VALUE_V_2, PARA_UI_VALUE_BTN_X_SIZE, PARA_UI_VALUE_BTN_Y_SIZE, cb, idEdit2);
lv_obj_t *labelValue = lv_label_create_empty(btnValue);
lv_label_set_text(labelValue, editValue2);
lv_obj_align(labelValue, btnValue, LV_ALIGN_CENTER, 0, 0);
@ -1374,8 +1374,8 @@ lv_obj_t* lv_screen_menu_item_2_edit(lv_obj_t *par, const char *text, lv_coord_t
lv_obj_t* lv_screen_menu_item_onoff(lv_obj_t *par, const char *text, lv_coord_t x, lv_coord_t y, lv_event_cb_t cb, const int id, const int index, const bool curValue) {
lv_screen_menu_item(par, text, x, y, cb, -1, index, false);
lv_obj_t* btnValue = lv_imgbtn_create(par, curValue ? "F:/bmp_enable.bin" : "F:/bmp_disable.bin", PARA_UI_STATE_POS_X, y + PARA_UI_STATE_V, cb, id);
lv_obj_t* labelValue = lv_label_create_empty(btnValue);
lv_obj_t *btnValue = lv_imgbtn_create(par, curValue ? "F:/bmp_enable.bin" : "F:/bmp_disable.bin", PARA_UI_STATE_POS_X, y + PARA_UI_STATE_V, cb, id);
lv_obj_t *labelValue = lv_label_create_empty(btnValue);
lv_label_set_text(labelValue, curValue ? machine_menu.enable : machine_menu.disable);
lv_obj_align(labelValue, btnValue, LV_ALIGN_CENTER, 0, 0);
return btnValue;

View File

@ -482,7 +482,7 @@ void lv_btn_use_label_style(lv_obj_t *btn);
void lv_btn_set_style_both(lv_obj_t *btn, lv_style_t *style);
// Create a screen
lv_obj_t* lv_screen_create(DISP_STATE newScreenType, const char* title = nullptr);
lv_obj_t* lv_screen_create(DISP_STATE newScreenType, const char *title = nullptr);
// Create an empty label
lv_obj_t* lv_label_create_empty(lv_obj_t *par);

View File

@ -370,7 +370,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) {
#if ENABLED(SDSUPPORT)
static void dosName2LongName(const char dosName[11], char* longName) {
static void dosName2LongName(const char dosName[11], char *longName) {
uint8_t j = 0;
LOOP_L_N(i, 11) {
if (i == 8) longName[j++] = '.';
@ -380,7 +380,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) {
longName[j] = '\0';
}
static int8_t arrayFindStr(const char arr[][LONG_FILENAME_LENGTH], uint8_t arraySize, const char* str) {
static int8_t arrayFindStr(const char arr[][LONG_FILENAME_LENGTH], uint8_t arraySize, const char *str) {
for (uint8_t a = 0; a < arraySize; a++) {
if (strcasecmp(arr[a], str) == 0)
return a;

View File

@ -53,7 +53,7 @@
#define WIFI_IO1_SET() WRITE(WIFI_IO1_PIN, HIGH);
#define WIFI_IO1_RESET() WRITE(WIFI_IO1_PIN, LOW);
extern uint8_t Explore_Disk (char* path , uint8_t recu_level);
extern uint8_t Explore_Disk (char *path , uint8_t recu_level);
extern uint8_t commands_in_queue;
extern uint8_t sel_id;
@ -566,7 +566,7 @@ static int cut_msg_head(uint8_t *msg, uint16_t msgLen, uint16_t cutLen) {
return msgLen - cutLen;
}
uint8_t Explore_Disk(char* path , uint8_t recu_level) {
uint8_t Explore_Disk(char *path , uint8_t recu_level) {
char tmp[200];
char Fstream[200];

View File

@ -101,14 +101,14 @@ void NextionTFT::PrintFinished() {
SEND_TXT_END("page printfinished");
}
void NextionTFT::ConfirmationRequest(const char *const msg) {
void NextionTFT::ConfirmationRequest(const char * const msg) {
SEND_VALasTXT("tmppage.M117", msg);
#if NEXDEBUG(N_MARLIN)
DEBUG_ECHOLNPAIR("ConfirmationRequest() ", msg, " printer_state:", printer_state);
#endif
}
void NextionTFT::StatusChange(const char *const msg) {
void NextionTFT::StatusChange(const char * const msg) {
#if NEXDEBUG(N_MARLIN)
DEBUG_ECHOLNPAIR("StatusChange() ", msg, "\nprinter_state:", printer_state);
#endif

View File

@ -118,7 +118,7 @@ void set_lcd_error_P(PGM_P const error, PGM_P const component=nullptr) {
*
* the command portion begins after the :
*/
void process_lcd_c_command(const char* command) {
void process_lcd_c_command(const char *command) {
const int target_val = command[1] ? atoi(command + 1) : -1;
if (target_val < 0) {
DEBUG_ECHOLNPAIR("UNKNOWN C COMMAND ", command);
@ -153,7 +153,7 @@ void process_lcd_c_command(const char* command) {
* time remaining (HH:MM:SS). The UI can't handle displaying a second hotend,
* but the stock firmware always sends it, and it's always zero.
*/
void process_lcd_eb_command(const char* command) {
void process_lcd_eb_command(const char *command) {
char elapsed_buffer[10];
static uint8_t iteration = 0;
duration_t elapsed;
@ -203,12 +203,12 @@ void process_lcd_eb_command(const char* command) {
* X, Y, Z, A (extruder)
*/
template<typename T>
void j_move_axis(const char* command, const T axis) {
void j_move_axis(const char *command, const T axis) {
const float dist = atof(command + 1) / 10.0;
ExtUI::setAxisPosition_mm(ExtUI::getAxisPosition_mm(axis) + dist, axis);
};
void process_lcd_j_command(const char* command) {
void process_lcd_j_command(const char *command) {
switch (command[0]) {
case 'E': break;
case 'A': j_move_axis<ExtUI::extruder_t>(command, ExtUI::extruder_t::E0); break;
@ -241,7 +241,7 @@ void process_lcd_j_command(const char* command) {
* T:-2537.4 E:0
* Note only the curly brace stuff matters.
*/
void process_lcd_p_command(const char* command) {
void process_lcd_p_command(const char *command) {
switch (command[0]) {
case 'P':
@ -301,7 +301,7 @@ void process_lcd_p_command(const char* command) {
* {FILE:fcupdate.flg}
* {SYS:OK}
*/
void process_lcd_s_command(const char* command) {
void process_lcd_s_command(const char *command) {
switch (command[0]) {
case 'I': {
// temperature information
@ -348,7 +348,7 @@ void process_lcd_s_command(const char* command) {
* Currently {E:0} is not handled. Its function is unknown,
* but it occurs during the temp window after a sys build.
*/
void process_lcd_command(const char* command) {
void process_lcd_command(const char *command) {
const char *current = command;
byte command_code = *current++;