Skip to content

Commit

Permalink
Fixes for arduino-m5stack workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
GOB52 committed Dec 13, 2024
1 parent 7f93b98 commit 5ac82df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
4 changes: 2 additions & 2 deletions examples/UnitUnified/GraphicalMeter/src/meter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ void draw_meter(LGFX_Sprite& spr, const int32_t offset, const char* tag, const c
spr.setFont(wid >= 240 ? &fonts::FreeSansBold12pt7b : &fonts::FreeSansBold9pt7b);

spr.setTextDatum(textdatum_t::middle_left);
spr.drawString(tag, x, y + 32 / 2);
spr.drawString(tag, x, y + hgt / 2);

auto s = m5::utility::formatString("%.2f", 0.01f * plotter->latest());
spr.setTextDatum(textdatum_t::middle_right);
spr.drawString(s.c_str(), x + wid, y + 32 / 2);
spr.drawString(s.c_str(), x + wid, y + hgt / 2);

spr.setTextDatum(td);
spr.setFont(f);
Expand Down
15 changes: 3 additions & 12 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -692,19 +692,10 @@ build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterIS
;
[env:GraphicalMeter_Core_Arduino_latest]
extends=Core, option_release, arduino_latest
; Choose unit define
build_flags = ${option_release.build_flags}
-DUSING_VMETER
build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/GraphicalMeter>

[env:GraphicalMeter_Core_Arduino_latest]
extends=Core, option_release, arduino_latest
build_flags = ${option_release.build_flags}
-DUSING_AMETER
build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/GraphicalMeter>

[env:GraphicalMeter_Core_Arduino_latest]
extends=Core, option_release, arduino_latest
build_flags = ${option_release.build_flags}
-DUSING_KMETER_ISO
; -DUSING_AMETER
; -DUSING_KMETER_ISO
build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/GraphicalMeter>

0 comments on commit 5ac82df

Please sign in to comment.