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

3
.gitignore vendored
View File

@@ -4,10 +4,9 @@
.gcc-flags.json .gcc-flags.json
CMakeListsPrivate.txt CMakeListsPrivate.txt
build_flags_due.sh build_flags_due.sh
build_flags_due_cheb.sh
build_flags_due_riko.sh
build_flags_esp32.sh build_flags_esp32.sh
build_flags_esp8266.sh build_flags_esp8266.sh
build_flags_stm32.sh build_flags_stm32.sh
build_flags_due-5500.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 * 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 * 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 * 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 * RESTART_LAN_ON_MQTT_ERRORS disabled
* DEVICE_NAME disabled * DEVICE_NAME disabled
* SYSLOG_ENABLE 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 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 -DSYSLOG_ENABLE"
#export FLAGS="$FLAGS -DDEVICE_NAME=MYDEVICE" #export FLAGS="$FLAGS -DDEVICE_NAME=MYDEVICE"
#export FLAGS="$FLAGS -DDHT_COUNTER_DISABLE" #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) export FLAGS="$FLAGS -DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
echo $FLAGS echo $FLAGS

View File

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

View File

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

View File

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