Skip to content

WiFiS3 Modem: change write and write_nowait format argument to const char * #285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libraries/WiFiS3/src/Modem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ bool ModemClass::passthrough(const uint8_t *data, size_t size) {
}

/* -------------------------------------------------------------------------- */
void ModemClass::write_nowait(const string &cmd, string &str, char * fmt, ...) {
void ModemClass::write_nowait(const string &cmd, string &str, const char * fmt, ...) {
/* -------------------------------------------------------------------------- */
memset(tx_buff,0x00,MAX_BUFF_SIZE);
va_list va;
Expand All @@ -106,7 +106,7 @@ void ModemClass::write_nowait(const string &cmd, string &str, char * fmt, ...) {


/* -------------------------------------------------------------------------- */
bool ModemClass::write(const string &prompt, string &data_res, char * fmt, ...){
bool ModemClass::write(const string &prompt, string &data_res, const char * fmt, ...){
/* -------------------------------------------------------------------------- */
data_res.clear();
memset(tx_buff,0x00,MAX_BUFF_SIZE);
Expand Down
4 changes: 2 additions & 2 deletions libraries/WiFiS3/src/Modem.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class ModemClass {

void begin(int badurate = 115200);
void end();
bool write(const std::string &cmd, std::string &str, char * fmt, ...);
void write_nowait(const std::string &cmd, std::string &str, char * fmt, ...);
bool write(const std::string &cmd, std::string &str, const char * fmt, ...);
void write_nowait(const std::string &cmd, std::string &str, const char * fmt, ...);

bool passthrough(const uint8_t *data, size_t size);
void avoid_trim_results() {
Expand Down
Loading