Add setting to define the WIFI_SERIAL
for Davinci it is Serial for RADDS it is Serial1 or change it if you use another onepull/131/head
rodzic
df003782e5
commit
f111cbde00
|
@ -58,7 +58,17 @@
|
|||
#define MODEL 1
|
||||
#endif
|
||||
//to enable communication using wifi module set to 1
|
||||
#define ENABLE_WIFI 0
|
||||
#define ENABLE_WIFI 1
|
||||
//define the wifi serial output
|
||||
//on Davinci use Serial
|
||||
//on RADDS use Serial1
|
||||
#if ENABLE_WIFI
|
||||
#if DAVINCI == 0
|
||||
#define WIFI_SERIAL Serial1
|
||||
#else
|
||||
#define WIFI_SERIAL Serial
|
||||
#endif
|
||||
#endif
|
||||
//if wifi is enabled serial need to slow down a little, this is a delay in ms after a '\n' so normaly after a command or a message
|
||||
#define DELAY_BY_LINE 50
|
||||
#if ENABLE_CLEAN_NOZZLE
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
//Version
|
||||
#define VERSION_MAJOR "1"
|
||||
#define VERSION_MINOR_YEAR "15"
|
||||
#define VERSION_MINOR_MONTH "09"
|
||||
#define VERSION_MINOR_DAY "22"
|
||||
#define VERSION_MINOR_MONTH "10"
|
||||
#define VERSION_MINOR_DAY "30"
|
||||
#define VERSION_BUILD "1"
|
||||
|
||||
//Davinci screen is not standard reprap it is WINSTAR 16x4
|
||||
|
@ -58,7 +58,17 @@
|
|||
#define MODEL 1
|
||||
#endif
|
||||
//to enable communication using wifi module set to 1
|
||||
#define ENABLE_WIFI 0
|
||||
#define ENABLE_WIFI 1
|
||||
//define the wifi serial output
|
||||
//on Davinci use Serial
|
||||
//on RADDS use Serial1
|
||||
#if ENABLE_WIFI
|
||||
#if DAVINCI == 0
|
||||
#define WIFI_SERIAL Serial1
|
||||
#else
|
||||
#define WIFI_SERIAL Serial
|
||||
#endif
|
||||
#endif
|
||||
//if wifi is enabled serial need to slow down a little, this is a delay in ms after a '\n' so normaly after a command or a message
|
||||
#define DELAY_BY_LINE 50
|
||||
#if ENABLE_CLEAN_NOZZLE
|
||||
|
|
|
@ -557,14 +557,14 @@ public:
|
|||
static inline void serialSetBaudrate(long baud)
|
||||
{
|
||||
#if ENABLE_WIFI
|
||||
Serial.begin(baud);
|
||||
WIFI_SERIAL.begin(baud);
|
||||
#endif
|
||||
RFSERIAL.begin(baud);
|
||||
}
|
||||
static inline bool serialByteAvailable()
|
||||
{
|
||||
#if ENABLE_WIFI
|
||||
if(HAL::bwifion) return Serial.available();
|
||||
if(HAL::bwifion) return WIFI_SERIAL.available();
|
||||
else
|
||||
#endif
|
||||
return RFSERIAL.available();
|
||||
|
@ -572,7 +572,7 @@ public:
|
|||
static inline uint8_t serialReadByte()
|
||||
{
|
||||
#if ENABLE_WIFI
|
||||
if(HAL::bwifion) return Serial.read();
|
||||
if(HAL::bwifion) return WIFI_SERIAL.read();
|
||||
else
|
||||
#endif
|
||||
return RFSERIAL.read();
|
||||
|
@ -582,7 +582,7 @@ public:
|
|||
#if ENABLE_WIFI
|
||||
if(HAL::bwifion)
|
||||
{
|
||||
Serial.write(b);
|
||||
WIFI_SERIAL.write(b);
|
||||
if (b=='\n')
|
||||
{
|
||||
HAL::delayMilliseconds(DELAY_BY_LINE);
|
||||
|
@ -595,7 +595,7 @@ public:
|
|||
static inline void serialFlush()
|
||||
{
|
||||
#if ENABLE_WIFI
|
||||
if(HAL::bwifion) Serial.flush();
|
||||
if(HAL::bwifion) WIFI_SERIAL.flush();
|
||||
else
|
||||
#endif
|
||||
RFSERIAL.flush();
|
||||
|
|
Ładowanie…
Reference in New Issue