Skip to content

Commit f5f15d3

Browse files
committed
fix ssd1306 compilation
1 parent b6b7561 commit f5f15d3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

display/ssd1306.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class Display : public MonoFrame<Width, col_t> {
4949
virtual void Page() = 0;
5050
virtual void SB_Top() = 0;
5151
virtual Screen GetScreen() = 0;
52+
virtual void SB_IsOn(bool* on) = 0;
5253
};
5354

5455
template<int Width, class col_t>
@@ -628,10 +629,8 @@ class StandardDisplayController : public DisplayControllerBase<Width, col_t>, Sa
628629
}
629630
}
630631

631-
// TODO: Don't update the display when we don't need to
632-
// and return false here so that we can go into lower power modes.
633632
void SB_IsOn(bool* on) override {
634-
*on = on_;
633+
display_->SB_IsOn(on);
635634
}
636635

637636
void SetScreenNow(Screen screen) {
@@ -984,6 +983,11 @@ class SSD1306Template : public Display<WIDTH, col_t>, I2CDevice, Looper, StateMa
984983
return controller_->GetScreen();
985984
}
986985

986+
// TODO: Don't update the display when we don't need to
987+
// and return false here so that we can go into lower power modes.
988+
void SB_IsOn(bool* on) override {
989+
*on = on_;
990+
}
987991

988992
void Loop() override {
989993
#ifdef USB_CLASS_MSC

0 commit comments

Comments
 (0)