Skip to content
Snippets Groups Projects
Commit f12221b8 authored by francois's avatar francois
Browse files

workaround for Serial2 error when compiling for esp8266

parent dd25b333
Branches
Tags
No related merge requests found
...@@ -699,8 +699,15 @@ boolean pm_serial::_init( void ) { ...@@ -699,8 +699,15 @@ boolean pm_serial::_init( void ) {
log_error(F("\n[pm_serial] inappropriate serial link number "));log_error(_link);log_flush(); log_error(F("\n[pm_serial] inappropriate serial link number "));log_error(_link);log_flush();
return false; return false;
} }
#warning "esp8266 hack: Serial2 is not known ... correct me!"
#ifndef ESP8266
Serial2.begin( _link_speed ); Serial2.begin( _link_speed );
_stream = &Serial2; // TODO pointer to stream according to link number specified ... maybe later ;) _stream = &Serial2; // TODO pointer to stream according to link number specified ... maybe later ;)
#else
return false;
#endif /* ESP8266 */
if( !_stream ) return false; if( !_stream ) return false;
// switch to passive mode (if any) // switch to passive mode (if any)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment