Display git revision information on MateCard terminal
This commit is contained in:
parent
82a677eacc
commit
1a1dab926f
|
@ -26,3 +26,4 @@ lib_deps =
|
|||
check_tool = clangtidy
|
||||
check_flags =
|
||||
clangtidy: --checks=*,-cppcoreguidelines-avoid-magic-numbers,-readability-magic-numbers,-modernize-macro-to-enum
|
||||
build_flags = !echo '-DAFRAPAY_REVISION=\\"'$(git describe --long --always --dirty --exclude=* --abbrev=8)'\\"'
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "U8g2lib.h"
|
||||
#include "logos.h"
|
||||
#include "utils.h"
|
||||
#include "vars.h"
|
||||
|
||||
void drawCurvedLineV(U8G2 u8g2, int xStart, int yStart, int vert, int horiz) {
|
||||
u8g2.drawVLine(xStart, yStart + 1, vert);
|
||||
|
@ -126,5 +127,8 @@ void updateOLED(U8G2 u8g2, e_state state, String statusText, String statusTextRi
|
|||
|
||||
void updateOLED(U8G2 u8g2, e_state state) {
|
||||
String time = DateTime.format(DateFormatter::TIME_ONLY);
|
||||
updateOLED(u8g2, state, time, WiFi.localIP().toString());
|
||||
if (!digitalRead(PIN_INTERRUPT_CANCEL) || millis()%10000 < 5000)
|
||||
updateOLED(u8g2, state, time, AFRAPAY_REVISION);
|
||||
else
|
||||
updateOLED(u8g2, state, time, WiFi.localIP().toString());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue