diff --git a/display/ssd1306.h b/display/ssd1306.h index de53009e0..1ca7772d5 100644 --- a/display/ssd1306.h +++ b/display/ssd1306.h @@ -49,6 +49,7 @@ class Display : public MonoFrame { virtual void Page() = 0; virtual void SB_Top() = 0; virtual Screen GetScreen() = 0; + virtual void SB_IsOn(bool* on) = 0; }; template @@ -628,10 +629,8 @@ class StandardDisplayController : public DisplayControllerBase, Sa } } - // TODO: Don't update the display when we don't need to - // and return false here so that we can go into lower power modes. void SB_IsOn(bool* on) override { - *on = on_; + display_->SB_IsOn(on); } void SetScreenNow(Screen screen) { @@ -984,6 +983,11 @@ class SSD1306Template : public Display, I2CDevice, Looper, StateMa return controller_->GetScreen(); } + // TODO: Don't update the display when we don't need to + // and return false here so that we can go into lower power modes. + void SB_IsOn(bool* on) override { + *on = on_; + } void Loop() override { #ifdef USB_CLASS_MSC