You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.7 KiB
63 lines
1.7 KiB
#pragma once |
|
|
|
#include "NotifyDevice.h" |
|
|
|
#define ROW(Y) ((Y * 10) + 6) |
|
#define COLUMN(X) ((X * 7) + 0) |
|
|
|
#define DISPLAY_MESSAGE_SIZE 19 |
|
|
|
class Display_Backend; |
|
|
|
class Display: public NotifyDevice { |
|
public: |
|
friend class Display_Backend; |
|
|
|
bool init(void) override; |
|
void update() override; |
|
|
|
void update_display_manual(); |
|
|
|
private: |
|
void draw_char(uint16_t x, uint16_t y, const char c); |
|
void draw_text(uint16_t x, uint16_t y, const char *c); |
|
void update_all(); |
|
void update_arm(uint8_t r); |
|
void update_prearm(uint8_t r); |
|
void update_gps(uint8_t r); |
|
void update_gps_sats(uint8_t r); |
|
void update_ekf(uint8_t r); |
|
void update_battery(uint8_t r); |
|
void update_mode(uint8_t r); |
|
void update_text(uint8_t r); |
|
void update_text_empty(uint8_t r); |
|
|
|
|
|
void draw_chinese(uint8_t x,uint8_t y,unsigned char hz[][32],uint8_t no); |
|
void update_chinese(uint8_t r); |
|
void update_camera(uint8_t r); |
|
void display_clear(void); |
|
void draw_BMP(uint8_t x0,uint8_t y0,uint8_t x1,uint8_t y1,unsigned char BMP[]); |
|
|
|
|
|
|
|
Display_Backend *_driver; |
|
|
|
uint8_t _mstartpos; // ticker shift position |
|
uint8_t _movedelay; // ticker delay before shifting after new message displayed |
|
uint8_t _screenpage; |
|
|
|
// stop showing text in display after this many millis: |
|
const uint16_t _send_text_valid_millis = 20000; |
|
|
|
|
|
/////////////////// @Brown /////////////////// |
|
// void trigger_pin_timer(void); |
|
// AP_Int8 _feedback_pin; |
|
// AP_Int8 _feedback_polarity; |
|
// uint8_t _last_pin_state; |
|
// bool _page_turn; |
|
// bool _timer_installed = false; |
|
///////////////////////////////////////////// |
|
}; |
|
|
|
|