Skip to content

Commit f7d4f40

Browse files
authored
Merge pull request #22 from sensebox/feat/atrai-rotate-display
feat(atrai): rotate display 180
2 parents ac09057 + d6d8c27 commit f7d4f40

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

senseBox-bike-atrai/display.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Adafruit_MAX17048 SBDisplay::maxlipo;
66

77
void SBDisplay::begin() {
88
display.begin(SSD1306_SWITCHCAPVCC, 0x3D);
9+
display.setRotation(2);
910
display.display();
1011
delay(100);
1112
display.clearDisplay();
@@ -65,6 +66,9 @@ void SBDisplay::showSystemStatus() {
6566

6667
void SBDisplay::drawQrCode(const char *qrStr, const char *lines[]) {
6768
display.clearDisplay();
69+
display.setTextSize(1);
70+
71+
6872
uint8_t qrcodeData[qrcode_getBufferSize(3)];
6973
qrcode_initText(&qrcode, qrcodeData, 3, ECC_MEDIUM, qrStr);
7074

senseBox-bike-atrai/senseBox-bike-atrai.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void setMeasurements() {
9494
pm4 = m.mc_4p0;
9595
pm1 = m.mc_1p0;
9696

97-
distance = getVl53l8cxMin();
97+
distance = getVl53l8cxMin() / 10; // mm in cm
9898
}
9999

100100
// starts bluetooth and sets the name according to the Bluetooth Bee

0 commit comments

Comments
 (0)