+flip oled support
This commit is contained in:
parent
d6a32a0529
commit
51ebef6d1b
|
|
@ -449,7 +449,7 @@ struct st_configitems config_list[] = {
|
||||||
{"oled_rst", "OLED RST/TFT RST (needs reboot)", 0, &sonde.config.oled_rst},
|
{"oled_rst", "OLED RST/TFT RST (needs reboot)", 0, &sonde.config.oled_rst},
|
||||||
{"tft_rs", "TFT RS", 0, &sonde.config.tft_rs},
|
{"tft_rs", "TFT RS", 0, &sonde.config.tft_rs},
|
||||||
{"tft_cs", "TFT CS", 0, &sonde.config.tft_cs},
|
{"tft_cs", "TFT CS", 0, &sonde.config.tft_cs},
|
||||||
{"tft_orient", "TFT orientation (0/1/2/3)", 0, &sonde.config.tft_orient},
|
{"tft_orient", "TFT orientation (0/1/2/3), OLED flip: 3", 0, &sonde.config.tft_orient},
|
||||||
{"button_pin", "Button input port", -4, &sonde.config.button_pin},
|
{"button_pin", "Button input port", -4, &sonde.config.button_pin},
|
||||||
{"button2_pin", "Button 2 input port", -4, &sonde.config.button2_pin},
|
{"button2_pin", "Button 2 input port", -4, &sonde.config.button2_pin},
|
||||||
{"touch_thresh", "Touch button threshold", 0, &sonde.config.touch_thresh},
|
{"touch_thresh", "Touch button threshold", 0, &sonde.config.touch_thresh},
|
||||||
|
|
|
||||||
|
|
@ -212,6 +212,7 @@ void U8x8Display::begin() {
|
||||||
u8x8 = new U8X8_SSD1306_128X64_NONAME_HW_I2C(/* reset=*/ sonde.config.oled_rst, /* clock=*/ sonde.config.oled_scl, /* data=*/ sonde.config.oled_sda); // Unbuffered, basic graphics, software I2C
|
u8x8 = new U8X8_SSD1306_128X64_NONAME_HW_I2C(/* reset=*/ sonde.config.oled_rst, /* clock=*/ sonde.config.oled_scl, /* data=*/ sonde.config.oled_sda); // Unbuffered, basic graphics, software I2C
|
||||||
}
|
}
|
||||||
u8x8->begin();
|
u8x8->begin();
|
||||||
|
if(sonde.config.tft_orient==3) u8x8->setFlipMode(true);
|
||||||
|
|
||||||
fontlist = fl;
|
fontlist = fl;
|
||||||
nfonts = sizeof(fl)/sizeof(uint8_t *);
|
nfonts = sizeof(fl)/sizeof(uint8_t *);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue