Example #1
0
void dashboardInit(void)
{
    static busDevice_t dashBoardBus;
    dashBoardBus.i2c.device = I2C_CFG_TO_DEV(dashboardConfig()->device);
    dashBoardBus.i2c.address = dashboardConfig()->address;
    bus = &dashBoardBus;

    delay(200);
    resetDisplay();
    delay(200);

    displayPort = displayPortOledInit(bus);
#if defined(CMS)
    if (dashboardPresent) {
        cmsDisplayPortRegister(displayPort);
    }
#endif

    memset(&pageState, 0, sizeof(pageState));
    dashboardSetPage(PAGE_WELCOME);

    uint32_t now = micros();
    dashboardUpdate(now);

    dashboardSetNextPageChangeAt(now + PAGE_CYCLE_FREQUENCY);
}
Example #2
0
void dashboardInit(void)
{
    delay(200);
    resetDisplay();
    delay(200);

    displayPort = displayPortOledInit();
#if defined(CMS)
    cmsDisplayPortRegister(displayPort);
#endif

    dashboardSetPage(PAGE_WELCOME);
    const timeUs_t now = micros();
    dashboardSetNextPageChangeAt(now + 5 * MICROSECONDS_IN_A_SECOND);

    dashboardUpdate(now);
}