Compare commits
No commits in common. "0d73d112b13ff8114b111c46f46939c15e4fe5b5" and "374fcee02feb8bf34aa7e6319adecf124e77fdb3" have entirely different histories.
0d73d112b1
...
374fcee02f
@ -8,37 +8,17 @@
|
|||||||
; Please visit documentation for the other options and examples
|
; Please visit documentation for the other options and examples
|
||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[basic]
|
[env:esp32dev]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
framework = arduino
|
framework = arduino
|
||||||
lib_deps = https://github.com/adafruit/Adafruit_NeoPixel
|
lib_deps = https://github.com/adafruit/Adafruit_NeoPixel
|
||||||
https://github.com/knolleary/pubsubclient
|
https://github.com/knolleary/pubsubclient
|
||||||
build_flags =
|
build_flags =
|
||||||
|
upload_port = 10.0.0.116
|
||||||
|
upload_protocol = espota
|
||||||
|
;upload_port = /dev/ttyUSB0
|
||||||
|
;upload_speed = 921600
|
||||||
monitor_port = /dev/ttyUSB0
|
monitor_port = /dev/ttyUSB0
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
monitor_filters = esp32_exception_decoder
|
monitor_filters = esp32_exception_decoder
|
||||||
|
|
||||||
[env:RGBMatrixDisplay_USB]
|
|
||||||
platform = ${basic.platform}
|
|
||||||
board = ${basic.board}
|
|
||||||
framework = ${basic.framework}
|
|
||||||
lib_deps = ${basic.lib_deps}
|
|
||||||
build_flags = ${basic.build_flags}
|
|
||||||
monitor_port = ${basic.monitor_port}
|
|
||||||
monitor_speed = ${basic.monitor_speed}
|
|
||||||
monitor_filters = ${basic.monitor_filters}
|
|
||||||
upload_port = /dev/ttyUSB0
|
|
||||||
upload_speed = 921600
|
|
||||||
|
|
||||||
[env:RGBMatrixDisplay_OTA]
|
|
||||||
platform = ${basic.platform}
|
|
||||||
board = ${basic.board}
|
|
||||||
framework = ${basic.framework}
|
|
||||||
lib_deps = ${basic.lib_deps}
|
|
||||||
build_flags = ${basic.build_flags}
|
|
||||||
monitor_port = ${basic.monitor_port}
|
|
||||||
monitor_speed = ${basic.monitor_speed}
|
|
||||||
monitor_filters = ${basic.monitor_filters}
|
|
||||||
upload_port = 10.0.0.116
|
|
||||||
upload_protocol = espota
|
|
||||||
|
|||||||
@ -119,7 +119,7 @@ public:
|
|||||||
const int value = (int) round(abs(valueDbl));
|
const int value = (int) round(abs(valueDbl));
|
||||||
const bool negative = valueDbl < 0;
|
const bool negative = valueDbl < 0;
|
||||||
|
|
||||||
const int digitCount = (int) max(1.0, floor(log10(value)) + 1); // log10 is -inf for value==0, hence the max(1.0, ...)
|
const int digitCount = (int) max(1.0, ceil(log10(value))); // log10 is -inf for value==0, hence the max(1.0, ...)
|
||||||
if (align == RIGHT) {
|
if (align == RIGHT) {
|
||||||
x -= ((negative ? 1 : 0) + digitCount) * (DISPLAY_CHAR_WIDTH + 1) - 1;
|
x -= ((negative ? 1 : 0) + digitCount) * (DISPLAY_CHAR_WIDTH + 1) - 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user