mirror of
https://github.com/m5stack/StackChan.git
synced 2026-04-27 11:02:40 +00:00
0cb413697b
Co-authored-by: jyy <jiangyeying@m5stack.com>
37 lines
741 B
C
37 lines
741 B
C
#ifndef UI_IMU_SCREEN_H
|
|
#define UI_IMU_SCREEN_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "lvgl.h"
|
|
#include <math.h>
|
|
#include <stdio.h>
|
|
#include "esp_log.h"
|
|
#include "esp_heap_caps.h"
|
|
|
|
#define MODE_IMU (2)
|
|
|
|
typedef struct {
|
|
float pitch;
|
|
float roll;
|
|
} IMU_Angle_t;
|
|
|
|
extern lv_obj_t *imu_screen;
|
|
extern lv_obj_t *imu_battery_label;
|
|
extern lv_obj_t *imu_channel_info_label;
|
|
extern lv_obj_t *imu_id_info_label;
|
|
extern lv_obj_t *imu_canvas;
|
|
extern lv_obj_t *imu_data_label;
|
|
|
|
void create_imu_screen(void);
|
|
IMU_Angle_t update_imu_screen(float ax, float ay, float az, uint8_t channel, uint8_t id, uint8_t bat);
|
|
void update_imu_cube(float ax, float ay, float az);
|
|
void ui_imu_screen_destory(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif |