return WITH_PRINTEX_LIB and still has compilation problems

This commit is contained in:
livello
2018-10-18 08:49:39 +03:00
parent 4101f7bd2e
commit 321e4843ba
6 changed files with 24 additions and 9 deletions

View File

@@ -69,8 +69,6 @@ PWM Out
#include "options.h"
#include "utils.h"
#if defined(__SAM3X8E__)
DueFlashStorage EEPROM;
EthernetClient ethClient;
@@ -204,13 +202,21 @@ void mqttCallback(char *topic, byte *payload, unsigned int length) {
void printIPAddress(IPAddress ipAddress) {
for (byte i = 0; i < 4; i++)
#ifdef WITH_PRINTEX_LIB
(i < 3) ? debugSerial << (ipAddress[i]) << F(".") : debugSerial << (ipAddress[i])<<F(", ");
#else
(i < 3) ? debugSerial << _DEC(ipAddress[i]) << F(".") : debugSerial << _DEC(ipAddress[i]) << F(", ");
#endif
}
void printMACAddress() {
debugSerial<<F("Configured MAC:");
for (byte i = 0; i < 6; i++)
#ifdef WITH_PRINTEX_LIB
(i < 5) ?debugSerial<<hex <<(mac[i])<<F(":"):debugSerial<<hex<<(mac[i])<<endl;
#else
(i < 5) ?debugSerial<<_HEX(mac[i])<<F(":"):debugSerial<<_HEX(mac[i])<<endl;
#endif
}
void restoreState() {

View File

@@ -25,7 +25,12 @@ e-mail anklimov@gmail.com
#include <Arduino.h>
#include "options.h"
#ifdef WITH_PRINTEX_LIB
#include "PrintEx.h"
using namespace ios;
#else
#include "Streaming.h"
#endif
void PrintBytes(uint8_t* addr, uint8_t count, bool newline);
void SetBytes(uint8_t* addr, uint8_t count, char * out);