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

5
.gitignore vendored
View File

@@ -4,10 +4,9 @@
.gcc-flags.json
CMakeListsPrivate.txt
build_flags_due.sh
build_flags_due_cheb.sh
build_flags_due_riko.sh
build_flags_esp32.sh
build_flags_esp8266.sh
build_flags_stm32.sh
build_flags_due-5500.sh
build_flags_mega2560.sh
build_flags_mega2560.sh
build_flags_controllino.sh

View File

@@ -155,6 +155,7 @@ platformio device monitor -b 115200
* RESTART_LAN_ON_MQTT_ERRORS //reinit LAN if many mqtt errors occured
* DEVICE_NAME short handy device name which is used instead of mac for download config http://{MY_CONFIG_SERVER}/{DEVICE_NAME}_config.json
* SYSLOG_ENABLE enable UDP SYSLOG support feature(under DEVELOPMENT) that must be configured through config file
* WITH_PRINTEX_LIB use PrintEx library (develop experimental feature)
@@ -180,5 +181,6 @@ platformio device monitor -b 115200
* RESTART_LAN_ON_MQTT_ERRORS disabled
* DEVICE_NAME disabled
* SYSLOG_ENABLE disabled
* WITH_PRINTEX_LIB diabled, using Streaming library
If you've using Arduino IDE to compile & flash firmware, it will use Default options above and you will not able to configure additional compilers options except edit "options.h" file

View File

@@ -27,5 +27,6 @@
#export FLAGS="$FLAGS -DSYSLOG_ENABLE"
#export FLAGS="$FLAGS -DDEVICE_NAME=MYDEVICE"
#export FLAGS="$FLAGS -DDHT_COUNTER_DISABLE"
#export FLAGS="$FLAGS -DWITH_PRINTEX_LIB"
export FLAGS="$FLAGS -DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
echo $FLAGS

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);

View File

@@ -16,14 +16,14 @@ env_default =
; esp8266
; esp32
; megaatmega2560-5500
; due-5500
controllino
due-5500
; controllino
; stm32
;build_dir = !sh pioenvs.sh ${platformio.env_default}
;libdeps_dir = !sh piolibdeps.sh ${platformio.env_default}
;build_dir = /tmp/pioenvs
;libdeps_dir = /tmp/piolibdeps
build_dir = /tmp/pioenvs
libdeps_dir = /tmp/piolibdeps
[env:esp32]
platform = espressif32
@@ -203,6 +203,7 @@ lib_deps =
DHT sensor library
https://github.com/arcao/Syslog.git
Streaming
https://github.com/livello/PrintEx#is-select-redecl
[env:controllino]
platform = atmelavr
@@ -228,3 +229,4 @@ lib_deps =
Adafruit Unified Sensor
DHT sensor library
Streaming
https://github.com/livello/PrintEx#is-select-redecl