Logging of the S -term values in blackbox for Fixed wings. (#14012)
[betaflight.git] / src / main / io / dashboard.h
blobefc58bf1270592b3fdceae13a73ad14b7336e248
1 /*
2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #pragma once
23 #include "common/time.h"
24 #include "pg/pg.h"
25 #include "drivers/bus_i2c.h"
27 #define ENABLE_DEBUG_DASHBOARD_PAGE
29 #if !defined(DASHBOARD_I2C_INSTANCE)
30 #if defined(I2C_DEVICE)
31 #define DASHBOARD_I2C_INSTANCE I2C_DEVICE
32 #else
33 #define DASHBOARD_I2C_INSTANCE I2C_NONE
34 #endif
35 #endif
37 #define DASHBOARD_I2C_ADDRESS 0x3C // OLED at address 0x3C in 7bit
39 typedef enum {
40 PAGE_WELCOME,
41 PAGE_ARMED,
42 PAGE_BATTERY,
43 PAGE_SENSORS,
44 PAGE_RX,
45 PAGE_PROFILE,
46 PAGE_RPROF,
47 PAGE_TASKS,
48 #ifdef USE_GPS
49 PAGE_GPS,
50 #endif
51 #ifdef ENABLE_DEBUG_DASHBOARD_PAGE
52 PAGE_DEBUG,
53 #endif
54 #ifdef USE_BLACKBOX
55 PAGE_BB,
56 #endif
57 PAGE_COUNT
58 } pageId_e;
60 void dashboardInit(void);
61 void dashboardUpdate(timeUs_t currentTimeUs);
63 void dashboardShowFixedPage(pageId_e pageId);
65 void dashboardEnablePageCycling(void);
66 void dashboardDisablePageCycling(void);
67 void dashboardResetPageCycling(void);
68 void dashboardSetNextPageChangeAt(timeUs_t futureMicros);